[all-commits] [llvm/llvm-project] 91332c: [CGSCC][NewPM] Fix adding mutually recursive new f...

aeubanks via All-commits all-commits at lists.llvm.org
Tue Sep 15 16:44:55 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 91332c4dbb033f7d1ffa1a9632012d88b08661c4
      https://github.com/llvm/llvm-project/commit/91332c4dbb033f7d1ffa1a9632012d88b08661c4
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2020-09-15 (Tue, 15 Sep 2020)

  Changed paths:
    M llvm/lib/Analysis/LazyCallGraph.cpp
    M llvm/unittests/Analysis/CGSCCPassManagerTest.cpp

  Log Message:
  -----------
  [CGSCC][NewPM] Fix adding mutually recursive new functions

When adding a new function via addNewFunctionIntoRefSCC(), it creates a
new node and immediately populates the edges. Since populateSlow() calls
G->get() on all referenced functions, it will create a node (but not
populate it) for functions that haven't yet been added. If we add two
mutually recursive functions, the assert that the node should never have
been created will fire when the second function is added. So here we
remove that assert since the node may have already been created (but not
yet populated).

createNode() is only called from addNewFunctionInto{,Ref}SCC().

https://bugs.llvm.org/show_bug.cgi?id=47502

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D87623




More information about the All-commits mailing list