From 18961504fc2b299578dba817900a0696cf3ccc4d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 25 Jun 2002 16:12:52 +0000 Subject: *** empty log message *** git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/DataStructure.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'lib/Analysis/DataStructure/DataStructure.cpp') diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 248ed918bb..8d53b41186 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -6,7 +6,6 @@ #include "llvm/Analysis/DataStructure.h" #include "llvm/Module.h" -#include "llvm/Function.h" #include #include @@ -42,9 +41,9 @@ void DataStructure::print(std::ostream &O, Module *M) const { timeval TV1, TV2; gettimeofday(&TV1, 0); for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) - if (!(*I)->isExternal()) { - getDSGraph(*I); - getClosedDSGraph(*I); + if (!I->isExternal() && I->getName() == "main") { + //getDSGraph(*I); + getClosedDSGraph(I); } gettimeofday(&TV2, 0); cerr << "Analysis took " @@ -53,9 +52,9 @@ void DataStructure::print(std::ostream &O, Module *M) const { } for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) - if (!(*I)->isExternal()) { + if (!I->isExternal()) { - string Filename = "ds." + (*I)->getName() + ".dot"; + string Filename = "ds." + I->getName() + ".dot"; O << "Writing '" << Filename << "'..."; ofstream F(Filename.c_str()); if (F.good()) { @@ -65,8 +64,8 @@ void DataStructure::print(std::ostream &O, Module *M) const { << "\tsize=\"10,7.5\";\n" << "\trotate=\"90\";\n"; - getDSGraph(*I).printFunction(F, "Local"); - getClosedDSGraph(*I).printFunction(F, "Closed"); + getDSGraph(I).printFunction(F, "Local"); + getClosedDSGraph(I).printFunction(F, "Closed"); F << "}\n"; } else { @@ -74,8 +73,8 @@ void DataStructure::print(std::ostream &O, Module *M) const { } if (Time) - O << " [" << getDSGraph(*I).getGraphSize() << ", " - << getClosedDSGraph(*I).getGraphSize() << "]\n"; + O << " [" << getDSGraph(I).getGraphSize() << ", " + << getClosedDSGraph(I).getGraphSize() << "]\n"; else O << "\n"; } -- cgit v1.2.3-18-g5258