[PATCH] D29381: [PM/LCG] Remove the lazy RefSCC formation from the LazyCallGraph during iteration.

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 5 11:49:15 PST 2017


dberlin added inline comments.


================
Comment at: lib/Analysis/LazyCallGraph.cpp:1690
           // node onto the stack.
           DFSStack.push_back({N, I});
 
----------------
Just to note, you don't actually have to push the stack here.

This will push every node onto the stack.
it's possible to push only the root nodes onto the stack.

This is more memory efficient, and about 25% faster.

This is  nuutila's variant, which is easy to implement:

http://www.cse.tkk.fi/~enu/ps/ipl-scc.ps
or
http://www.cse.tkk.fi/~enu/ps/tko-b94-scc.ps
or 
the tarjan scc part of https://reviews.llvm.org/D28934

(For the papers, you want algorithm 1, not 2)



https://reviews.llvm.org/D29381





More information about the llvm-commits mailing list