[PATCH] D87798: [NewPM][CGSCC] Handle newly added functions in updateCGAndAnalysisManagerForPass

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 14:35:40 PDT 2020


aeubanks created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aeubanks requested review of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87798

Files:
  llvm/include/llvm/Analysis/LazyCallGraph.h
  llvm/lib/Analysis/CGSCCPassManager.cpp
  llvm/lib/Analysis/LazyCallGraph.cpp
  llvm/lib/Transforms/Coroutines/CoroSplit.cpp
  llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
  llvm/unittests/Analysis/CGSCCPassManagerTest.cpp
  llvm/unittests/Analysis/LazyCallGraphTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87798.292352.patch
Type: text/x-patch
Size: 14522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200916/9f9b96ef/attachment.bin>


More information about the llvm-commits mailing list