[all-commits] [llvm/llvm-project] b55953: [NewPM] Avoid redundant CGSCC run for updated SCC
WenleiHe via All-commits
all-commits at lists.llvm.org
Sun Jun 14 20:06:48 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b559535a3a21fa1f3ee20fbcd4bad4bc840d0a49
https://github.com/llvm/llvm-project/commit/b559535a3a21fa1f3ee20fbcd4bad4bc840d0a49
Author: Wenlei He <aktoon at gmail.com>
Date: 2020-06-14 (Sun, 14 Jun 2020)
Changed paths:
M llvm/include/llvm/Analysis/CGSCCPassManager.h
A llvm/test/Transforms/Inline/cgscc-cycle-debug.ll
M llvm/unittests/Analysis/CGSCCPassManagerTest.cpp
Log Message:
-----------
[NewPM] Avoid redundant CGSCC run for updated SCC
Summary:
When an SCC got split due to inlining, we have two mechanisms for reprocessing the updated SCC, first is UR.UpdatedC
that repeatedly rerun the new, current SCC; second is a worklist for all newly split SCCs. We can avoid rerun of
the same SCC when the SCC is set to be processed by both mechanisms *back to back*. In pathological cases, such redundant
rerun could cause exponential size growth due to inlining along cycles, even when there's no SCC mutation and hence
convergence is not a problem.
Note that it's ok to have SCC updated and rerun immediately, and also in the work list if we have actually moved an SCC
to be topologically "below" the current one due to merging. In that case, we will need to revisit the current SCC after
those moved SCCs. For that reason, the redundant avoidance here only targets back to back rerun of the same SCC - the
case described by the now removed FIXME comment.
Reviewers: chandlerc, wmi
Subscribers: llvm-commits, hoy
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80589
More information about the All-commits
mailing list