From: Chris Lattner Date: Sun, 10 Nov 2002 06:53:59 +0000 (+0000) Subject: Honor the shouldPrintAuxCalls flag X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4f7815f68449fae2f21bc10ce89479346ba995d1;p=oota-llvm.git Honor the shouldPrintAuxCalls flag git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4678 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index 8d345a93e96..483d2235350 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -112,7 +112,9 @@ struct DOTGraphTraits : public DefaultDOTGraphTraits { } // Output all of the call nodes... - const std::vector &FCs = G->getFunctionCalls(); + const std::vector &FCs = + G->shouldPrintAuxCalls() ? G->getAuxFunctionCalls() + : G->getFunctionCalls(); for (unsigned i = 0, e = FCs.size(); i != e; ++i) { const DSCallSite &Call = FCs[i]; GW.emitSimpleNode(&Call, "shape=record", "call", Call.getNumPtrArgs()+2); @@ -169,15 +171,18 @@ static void printCollection(const Collection &C, std::ostream &O, unsigned TotalNumNodes = 0, TotalCallNodes = 0; for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) - if (!I->isExternal()) { + if (C.hasGraph(*I)) { DSGraph &Gr = C.getDSGraph((Function&)*I); TotalNumNodes += Gr.getGraphSize(); - TotalCallNodes += Gr.getFunctionCalls().size(); + unsigned NumCalls = Gr.shouldPrintAuxCalls() ? + Gr.getAuxFunctionCalls().size() : Gr.getFunctionCalls().size(); + + TotalCallNodes += NumCalls; if (I->getName() == "main" || !OnlyPrintMain) Gr.writeGraphToFile(O, Prefix+I->getName()); else { O << "Skipped Writing '" << Prefix+I->getName() << ".dot'... [" - << Gr.getGraphSize() << "+" << Gr.getFunctionCalls().size() << "]\n"; + << Gr.getGraphSize() << "+" << NumCalls << "]\n"; } }