diff options
author | Chris Lattner <sabre@nondot.org> | 2002-06-25 16:12:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-06-25 16:12:52 +0000 |
commit | fda72b1aad8c70686418b2a7dfa8adbc20435b0e (patch) | |
tree | 38f0e80982c981aa44c29edb9103c02f01d7d121 /llvm/lib/Analysis/DataStructure/DataStructure.cpp | |
parent | 6e3c5fada642c209d476042115cf03df6b48b4ea (diff) | |
download | bcm5719-llvm-fda72b1aad8c70686418b2a7dfa8adbc20435b0e.tar.gz bcm5719-llvm-fda72b1aad8c70686418b2a7dfa8adbc20435b0e.zip |
*** empty log message ***
llvm-svn: 2777
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/DataStructure.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp index 248ed918bb6..8d53b411863 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp @@ -6,7 +6,6 @@ #include "llvm/Analysis/DataStructure.h" #include "llvm/Module.h" -#include "llvm/Function.h" #include <fstream> #include <algorithm> @@ -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"; } |