summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-10 06:53:59 +0000
committerChris Lattner <sabre@nondot.org>2002-11-10 06:53:59 +0000
commite79ce7d35970fff2bbea37b0a27228766adcc1c5 (patch)
tree8da1fa081f4786883b14fc590059aee8a0ba3ee8 /llvm/lib/Analysis
parent17da287408f5dac11d761b7936855c06c74283c0 (diff)
downloadbcm5719-llvm-e79ce7d35970fff2bbea37b0a27228766adcc1c5.tar.gz
bcm5719-llvm-e79ce7d35970fff2bbea37b0a27228766adcc1c5.zip
Honor the shouldPrintAuxCalls flag
llvm-svn: 4678
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/DataStructure/Printer.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Printer.cpp b/llvm/lib/Analysis/DataStructure/Printer.cpp
index 8d345a93e96..483d2235350 100644
--- a/llvm/lib/Analysis/DataStructure/Printer.cpp
+++ b/llvm/lib/Analysis/DataStructure/Printer.cpp
@@ -112,7 +112,9 @@ struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
}
// Output all of the call nodes...
- const std::vector<DSCallSite> &FCs = G->getFunctionCalls();
+ const std::vector<DSCallSite> &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";
}
}
OpenPOWER on IntegriCloud