diff options
author | Arthur Eubanks <aeubanks@google.com> | 2020-09-16 13:49:31 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2020-09-23 15:22:18 -0700 |
commit | 6b1ce83a1238815899cf18f69bbc0eb37679a410 (patch) | |
tree | 58f8a7d2b979e1c63c87dba01956f6ea90c52b22 /llvm/lib/Transforms/Utils/CallGraphUpdater.cpp | |
parent | 6700b9de1637fd9888dfe9628157d2aeb6d9f526 (diff) | |
download | llvm-6b1ce83a1238815899cf18f69bbc0eb37679a410.zip llvm-6b1ce83a1238815899cf18f69bbc0eb37679a410.tar.gz llvm-6b1ce83a1238815899cf18f69bbc0eb37679a410.tar.bz2 |
[NewPM][CGSCC] Handle newly added functions in updateCGAndAnalysisManagerForPass
This seems to fit the CGSCC updates model better than calling
addNewFunctionInto{Ref,}SCC() on newly created/outlined functions.
Now addNewFunctionInto{Ref,}SCC() are no longer necessary.
However, this doesn't work on newly outlined functions that aren't
referenced by the original function. e.g. if a() was outlined into b()
and c(), but c() is only referenced by b() and not by a(), this will
trigger an assert.
This also fixes an issue I was seeing with newly created functions not
having passes run on them.
Ran check-llvm with expensive checks.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D87798
Diffstat (limited to 'llvm/lib/Transforms/Utils/CallGraphUpdater.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CallGraphUpdater.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp b/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp index 52e8593..50d1a1f6 100644 --- a/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp +++ b/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp @@ -99,8 +99,6 @@ void CallGraphUpdater::reanalyzeFunction(Function &Fn) { void CallGraphUpdater::registerOutlinedFunction(Function &NewFn) { if (CG) CG->addToCallGraph(&NewFn); - else if (LCG) - LCG->addNewFunctionIntoSCC(NewFn, *SCC); } void CallGraphUpdater::removeFunction(Function &DeadFn) { |