summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-02-14 04:55:58 +0000
committerChris Lattner <sabre@nondot.org>2003-02-14 04:55:58 +0000
commitddd3b7fa545ee72a48f3203f4e0e05fb77233ed3 (patch)
treec266f6b10b05c3c97b04dd65f64138f49d3226e7 /llvm/lib/Analysis/DataStructure/Local.cpp
parentc0bda0d45e8bcbd2efb71cdfc01717bac017fffa (diff)
downloadbcm5719-llvm-ddd3b7fa545ee72a48f3203f4e0e05fb77233ed3.tar.gz
bcm5719-llvm-ddd3b7fa545ee72a48f3203f4e0e05fb77233ed3.zip
Don't put integer pointers (longs) into the scalar map.
This speeds stuff up by 10% on some tests, woot! llvm-svn: 5564
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/Local.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp
index 32d7aea42fa..ffc80e73a6a 100644
--- a/llvm/lib/Analysis/DataStructure/Local.cpp
+++ b/llvm/lib/Analysis/DataStructure/Local.cpp
@@ -143,6 +143,16 @@ DSGraph::DSGraph(Function &F, DSGraph *GG) : Func(&F), GlobalsGraph(GG) {
#ifndef NDEBUG
Timer::addPeakMemoryMeasurement();
#endif
+
+ // Remove all integral constants from the scalarmap!
+ for (hash_map<Value*, DSNodeHandle>::iterator I = ScalarMap.begin();
+ I != ScalarMap.end();)
+ if (isa<ConstantIntegral>(I->first)) {
+ hash_map<Value*, DSNodeHandle>::iterator J = I++;
+ ScalarMap.erase(J);
+ } else
+ ++I;
+
markIncompleteNodes(DSGraph::MarkFormalArgs);
// Remove any nodes made dead due to merging...
OpenPOWER on IntegriCloud