[llvm-commits] CVS: llvm/lib/Analysis/LoadValueNumbering.cpp

Owen Anderson resistor at mac.com
Fri Apr 6 21:43:26 PDT 2007



Changes in directory llvm/lib/Analysis:

LoadValueNumbering.cpp updated: 1.37 -> 1.38
---
Log message:

Expunge DomSet from LoadValueNumbering.  This is part of the continuing 
work on PR1171: http://llvm.org/PR1171 .



---
Diffs of the changes:  (+9 -9)

 LoadValueNumbering.cpp |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)


Index: llvm/lib/Analysis/LoadValueNumbering.cpp
diff -u llvm/lib/Analysis/LoadValueNumbering.cpp:1.37 llvm/lib/Analysis/LoadValueNumbering.cpp:1.38
--- llvm/lib/Analysis/LoadValueNumbering.cpp:1.37	Mon Feb  5 17:42:17 2007
+++ llvm/lib/Analysis/LoadValueNumbering.cpp	Fri Apr  6 23:43:07 2007
@@ -98,7 +98,7 @@
   AU.setPreservesAll();
   AU.addRequiredTransitive<AliasAnalysis>();
   AU.addRequired<ValueNumbering>();
-  AU.addRequiredTransitive<DominatorSet>();
+  AU.addRequiredTransitive<ETForest>();
   AU.addRequiredTransitive<TargetData>();
 }
 
@@ -198,20 +198,20 @@
   // ANY memory.
   //
   if (MRB == AliasAnalysis::OnlyReadsMemory) {
-    DominatorSet &DomSetInfo = getAnalysis<DominatorSet>();
+    ETForest &EF = getAnalysis<ETForest>();
     BasicBlock *CIBB = CI->getParent();
     for (unsigned i = 0; i != IdenticalCalls.size(); ++i) {
       CallInst *C = IdenticalCalls[i];
       bool CantEqual = false;
 
-      if (DomSetInfo.dominates(CIBB, C->getParent())) {
+      if (EF.dominates(CIBB, C->getParent())) {
         // FIXME: we currently only handle the case where both calls are in the
         // same basic block.
         if (CIBB != C->getParent()) {
           CantEqual = true;
         } else {
           Instruction *First = CI, *Second = C;
-          if (!DomSetInfo.dominates(CI, C))
+          if (!EF.dominates(CI, C))
             std::swap(First, Second);
 
           // Scan the instructions between the calls, checking for stores or
@@ -236,7 +236,7 @@
           }
         }
 
-      } else if (DomSetInfo.dominates(C->getParent(), CIBB)) {
+      } else if (EF.dominates(C->getParent(), CIBB)) {
         // FIXME: We could implement this, but we don't for now.
         CantEqual = true;
       } else {
@@ -374,7 +374,7 @@
     }
 
   // Get dominators.
-  DominatorSet &DomSetInfo = getAnalysis<DominatorSet>();
+  ETForest &EF = getAnalysis<ETForest>();
 
   // TransparentBlocks - For each basic block the load/store is alive across,
   // figure out if the pointer is invalidated or not.  If it is invalidated, the
@@ -393,12 +393,12 @@
     // Right now we only can handle cases where one load dominates the other.
     // FIXME: generalize this!
     BasicBlock *BB1 = I->first, *BB2 = LoadBB;
-    if (DomSetInfo.dominates(BB1, BB2)) {
+    if (EF.dominates(BB1, BB2)) {
       // The other load dominates LI.  If the loaded value is killed entering
       // the LoadBB block, we know the load is not live.
       if (LoadInvalidatedInBBBefore)
         CantEqual = true;
-    } else if (DomSetInfo.dominates(BB2, BB1)) {
+    } else if (EF.dominates(BB2, BB1)) {
       std::swap(BB1, BB2);          // Canonicalize
       // LI dominates the other load.  If the loaded value is killed exiting
       // the LoadBB block, we know the load is not live.
@@ -480,7 +480,7 @@
 
   for (std::set<BasicBlock*>::iterator I = CandidateStores.begin(),
          E = CandidateStores.end(); I != E; ++I)
-    if (DomSetInfo.dominates(*I, LoadBB)) {
+    if (EF.dominates(*I, LoadBB)) {
       BasicBlock *StoreBB = *I;
 
       // Check to see if the path from the store to the load is transparent






More information about the llvm-commits mailing list