diff --git a/docs/Passes.html b/docs/Passes.html index 4d465108e7d..d79da12c08b 100644 --- a/docs/Passes.html +++ b/docs/Passes.html @@ -649,7 +649,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

This pass, only available in opt, prints the call graph to - standard output in a human-readable form. + standard error in a human-readable form.

@@ -660,7 +660,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

This pass, only available in opt, prints the SCCs of the call - graph to standard output in a human-readable form. + graph to standard error in a human-readable form.

@@ -671,7 +671,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

This pass, only available in opt, prints the SCCs of each - function CFG to standard output in a human-readable form. + function CFG to standard error in a human-readable form.

diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp index ba58a43d3b6..533f49ec2a8 100644 --- a/tools/opt/PrintSCC.cpp +++ b/tools/opt/PrintSCC.cpp @@ -73,18 +73,18 @@ Z("print-callgraph-sccs", "Print SCCs of the Call Graph"); bool CFGSCC::runOnFunction(Function &F) { unsigned sccNum = 0; - outs() << "SCCs for Function " << F.getName() << " in PostOrder:"; + errs() << "SCCs for Function " << F.getName() << " in PostOrder:"; for (scc_iterator SCCI = scc_begin(&F), E = scc_end(&F); SCCI != E; ++SCCI) { std::vector &nextSCC = *SCCI; - outs() << "\nSCC #" << ++sccNum << " : "; + errs() << "\nSCC #" << ++sccNum << " : "; for (std::vector::const_iterator I = nextSCC.begin(), E = nextSCC.end(); I != E; ++I) - outs() << (*I)->getName() << ", "; + errs() << (*I)->getName() << ", "; if (nextSCC.size() == 1 && SCCI.hasLoop()) - outs() << " (Has self-loop)."; + errs() << " (Has self-loop)."; } - outs() << "\n"; + errs() << "\n"; return true; } @@ -94,19 +94,19 @@ bool CFGSCC::runOnFunction(Function &F) { bool CallGraphSCC::runOnModule(Module &M) { CallGraphNode* rootNode = getAnalysis().getRoot(); unsigned sccNum = 0; - outs() << "SCCs for the program in PostOrder:"; + errs() << "SCCs for the program in PostOrder:"; for (scc_iterator SCCI = scc_begin(rootNode), E = scc_end(rootNode); SCCI != E; ++SCCI) { const std::vector &nextSCC = *SCCI; - outs() << "\nSCC #" << ++sccNum << " : "; + errs() << "\nSCC #" << ++sccNum << " : "; for (std::vector::const_iterator I = nextSCC.begin(), E = nextSCC.end(); I != E; ++I) - outs() << ((*I)->getFunction() ? (*I)->getFunction()->getNameStr() + errs() << ((*I)->getFunction() ? (*I)->getFunction()->getNameStr() : std::string("external node")) << ", "; if (nextSCC.size() == 1 && SCCI.hasLoop()) - outs() << " (Has self-loop)."; + errs() << " (Has self-loop)."; } - outs() << "\n"; + errs() << "\n"; return true; }