diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-14 04:55:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-14 04:55:58 +0000 |
commit | 1a1a85d5144a2ef13bb14663babe47a8ee1f2f00 (patch) | |
tree | f72f1c412c4c98f4417e7817661c3bfc7732bf76 /lib/Analysis/DataStructure/Local.cpp | |
parent | 96768ea1ca9b1ecc680e870340302cc219187c3e (diff) |
Don't put integer pointers (longs) into the scalar map.
This speeds stuff up by 10% on some tests, woot!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 10 |
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... |