diff options
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/BreakCriticalEdges.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LoopSimplify.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/Mem2Reg.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index c44f9d324e..a87dbce2a0 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -85,7 +85,7 @@ void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) { // 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); } diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 5a68dda1af..d5988b1652 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -132,7 +132,7 @@ BasicBlock *Preheaders::SplitBlockPredecessors(BasicBlock *BB, // if (!Preds.empty()) { // Is the loop not obviously dead? for (BasicBlock::iterator I = BB->begin(); - PHINode *PN = dyn_cast<PHINode>(&*I); ++I) { + PHINode *PN = dyn_cast<PHINode>(I); ++I) { // Create the new PHI node, insert it into NewBB at the end of the block PHINode *NewPHI = new PHINode(PN->getType(), PN->getName()+".ph", BI); @@ -160,7 +160,7 @@ BasicBlock *Preheaders::SplitBlockPredecessors(BasicBlock *BB, } else { // Otherwise the loop is dead... for (BasicBlock::iterator I = BB->begin(); - PHINode *PN = dyn_cast<PHINode>(&*I); ++I) + PHINode *PN = dyn_cast<PHINode>(I); ++I) // Insert dummy values as the incoming value... PN->addIncoming(Constant::getNullValue(PN->getType()), NewBB); } diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 0148134d03..68fb74efaf 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -85,7 +85,7 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { // Loop over all of the instructions, looking for malloc or free instructions for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I) { - if (MallocInst *MI = dyn_cast<MallocInst>(&*I)) { + if (MallocInst *MI = dyn_cast<MallocInst>(I)) { const Type *AllocTy = MI->getType()->getElementType(); // Get the number of bytes to be allocated for one element of the @@ -114,7 +114,7 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { I = --BBIL.erase(I); // remove and delete the malloc instr... Changed = true; ++NumLowered; - } else if (FreeInst *FI = dyn_cast<FreeInst>(&*I)) { + } else if (FreeInst *FI = dyn_cast<FreeInst>(I)) { // Cast the argument to free into a ubyte*... CastInst *MCast = new CastInst(FI->getOperand(0), PointerType::get(Type::UByteTy), "", I); diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index 848c4d6706..6bd859a403 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -43,7 +43,7 @@ bool PromotePass::runOnFunction(Function &F) { // Find allocas that are safe to promote, by looking at all instructions in // the entry node for (BasicBlock::iterator I = BB.begin(), E = --BB.end(); I != E; ++I) - if (AllocaInst *AI = dyn_cast<AllocaInst>(&*I)) // Is it an alloca? + if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) // Is it an alloca? if (isAllocaPromotable(AI, TD)) Allocas.push_back(AI); diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 25d835684b..e1910446de 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -40,7 +40,7 @@ static bool PropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) { // 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 @@ static bool PropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) { // 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!"); |