[llvm-commits] [poolalloc] r57600 - /poolalloc/trunk/lib/DSA/DataStructure.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Wed Oct 15 13:42:10 PDT 2008
Author: alenhar2
Date: Wed Oct 15 15:42:07 2008
New Revision: 57600
URL: http://llvm.org/viewvc/llvm-project?rev=57600&view=rev
Log:
cbu now can expand GlobalEC sets
Modified:
poolalloc/trunk/lib/DSA/DataStructure.cpp
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=57600&r1=57599&r2=57600&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Wed Oct 15 15:42:07 2008
@@ -2779,8 +2779,11 @@
if (I->getGlobalsList().size() <= 1) continue;
// First, build up the equivalence set for this block of globals.
- DSNode::globals_iterator i = I->globals_begin();
- const GlobalValue *First = *i++;
+ DSNode::globals_iterator i = I->globals_begin();
+ const GlobalValue *First = *i;
+ if (GlobalECs.findValue(*i) != GlobalECs.end())
+ First = GlobalECs.getLeaderValue(*i);
+ if (*i == First) ++i;
for( ; i != I->globals_end(); ++i) {
GlobalECs.unionSets(First, *i);
ECGlobals.insert(*i);
More information about the llvm-commits
mailing list