[llvm-commits] CVS: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp SimplifyCFG.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Apr 23 11:38:14 PDT 2003


Changes in directory llvm/lib/Transforms/Utils:

BreakCriticalEdges.cpp updated: 1.8 -> 1.9
SimplifyCFG.cpp updated: 1.10 -> 1.11

---
Log message:

Remove unnecesary &*'s


---
Diffs of the changes:

Index: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
diff -u llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.8 llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.9
--- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.8	Wed Oct 30 20:44:36 2002
+++ llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp	Wed Apr 23 11:37:43 2003
@@ -85,7 +85,7 @@
   // merge incoming values from NewBB instead of from TIBB.
   //
   for (BasicBlock::iterator I = DestBB->begin();
-       PHINode *PN = dyn_cast<PHINode>(&*I); ++I) {
+       PHINode *PN = dyn_cast<PHINode>(I); ++I) {
     // We no longer enter through TIBB, now we come in through NewBB.
     PN->replaceUsesOfWith(TIBB, NewBB);
   }


Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.10 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.11
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.10	Fri Mar  7 12:13:41 2003
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp	Wed Apr 23 11:37:44 2003
@@ -40,7 +40,7 @@
       // Loop over all of the PHI nodes checking to see if there are
       // incompatible values coming in.
       for (BasicBlock::iterator I = Succ->begin();
-           PHINode *PN = dyn_cast<PHINode>(&*I); ++I) {
+           PHINode *PN = dyn_cast<PHINode>(I); ++I) {
         // Loop up the entries in the PHI node for BB and for *PI if the values
         // coming in are non-equal, we cannot merge these two blocks (instead we
         // should insert a conditional move or something, then merge the
@@ -56,7 +56,7 @@
 
   // Loop over all of the PHI nodes in the successor BB
   for (BasicBlock::iterator I = Succ->begin();
-       PHINode *PN = dyn_cast<PHINode>(&*I); ++I) {
+       PHINode *PN = dyn_cast<PHINode>(I); ++I) {
     Value *OldVal = PN->removeIncomingValue(BB, false);
     assert(OldVal && "No entry in PHI for Pred BB!");
 





More information about the llvm-commits mailing list