aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 32d7aea42f..ffc80e73a6 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/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...