mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
[PM] Remove the underspecified 'getRoot' method from CallGraph. It's
only user was an ancient SCC printing bit of the opt tool which really should be walking the call graph the same way the CGSCC pass manager does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195800 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -92,11 +92,11 @@ bool CFGSCC::runOnFunction(Function &F) {
|
||||
|
||||
// run - Print out SCCs in the call graph for the specified module.
|
||||
bool CallGraphSCC::runOnModule(Module &M) {
|
||||
CallGraphNode *rootNode = getAnalysis<CallGraphWrapperPass>().getRoot();
|
||||
CallGraph &CG = getAnalysis<CallGraphWrapperPass>().getCallGraph();
|
||||
unsigned sccNum = 0;
|
||||
errs() << "SCCs for the program in PostOrder:";
|
||||
for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode),
|
||||
E = scc_end(rootNode); SCCI != E; ++SCCI) {
|
||||
for (scc_iterator<CallGraph*> SCCI = scc_begin(&CG),
|
||||
E = scc_end(&CG); SCCI != E; ++SCCI) {
|
||||
const std::vector<CallGraphNode*> &nextSCC = *SCCI;
|
||||
errs() << "\nSCC #" << ++sccNum << " : ";
|
||||
for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(),
|
||||
|
Reference in New Issue
Block a user