summaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/DataStructure.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-06-25 16:12:52 +0000
committerChris Lattner <sabre@nondot.org>2002-06-25 16:12:52 +0000
commit18961504fc2b299578dba817900a0696cf3ccc4d (patch)
treec34853ffc064b841932d0897e25305c81c3a7338 /lib/Analysis/DataStructure/DataStructure.cpp
parenta2204e1ff25265a1da00ecbb3ebb22c05acf7194 (diff)
downloadllvm-18961504fc2b299578dba817900a0696cf3ccc4d.tar.gz
llvm-18961504fc2b299578dba817900a0696cf3ccc4d.tar.bz2
llvm-18961504fc2b299578dba817900a0696cf3ccc4d.tar.xz
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp19
1 files changed, 9 insertions, 10 deletions
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 <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";
}