CallGraphSCCPass: iterate over all functions.
authorTim Northover <tnorthover@apple.com>
Fri, 6 Jul 2018 08:04:47 +0000 (08:04 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 6 Jul 2018 08:04:47 +0000 (08:04 +0000)
commit7ee46ed992690294cfe984366370cb4787fcf0f3
tree37b0e44b38f68e4da6712151011a0168e6b1c506
parent2a57b357a3a0de2202a3fb0272d2648a205bcdfa
CallGraphSCCPass: iterate over all functions.

Previously we only iterated over functions reachable from the set of
external functions in the module. But since some of the passes under
this (notably the always-inliner and coroutine lowerer) are required for
correctness, they need to run over everything.

This just adds an extra layer of iteration over the CallGraph to keep
track of which functions we've already visited and get the next batch of
SCCs.

Should fix PR38029.

llvm-svn: 336419
llvm/include/llvm/ADT/SCCIterator.h
llvm/lib/Analysis/CallGraphSCCPass.cpp
llvm/test/Transforms/Inline/always-inline.ll