[llvm-branch-commits] [llvm-branch] r109609 - in /llvm/branches/Apple/williamson/lib: Analysis/ CodeGen/ CodeGen/SelectionDAG/ Transforms/IPO/ Transforms/InstCombine/ Transforms/Scalar/ Transforms/Utils/
Daniel Dunbar
daniel at zuster.org
Wed Jul 28 11:40:38 PDT 2010
Author: ddunbar
Date: Wed Jul 28 13:40:38 2010
New Revision: 109609
URL: http://llvm.org/viewvc/llvm-project?rev=109609&view=rev
Log:
Merge r109103:
--
Author: Gabor Greif <ggreif at gmail.com>
Date: Thu Jul 22 13:36:47 2010 +0000
mass elimination of reliance on automatic iterator dereferencing
Added:
llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp.orig
- copied, changed from r109516, llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp
llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp.orig
- copied, changed from r109516, llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp
Modified:
llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp
llvm/branches/Apple/williamson/lib/CodeGen/DwarfEHPrepare.cpp
llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/branches/Apple/williamson/lib/Transforms/IPO/StructRetPromotion.cpp
llvm/branches/Apple/williamson/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp
llvm/branches/Apple/williamson/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/branches/Apple/williamson/lib/Transforms/Scalar/LoopIndexSplit.cpp
llvm/branches/Apple/williamson/lib/Transforms/Scalar/SimplifyLibCalls.cpp
llvm/branches/Apple/williamson/lib/Transforms/Utils/BreakCriticalEdges.cpp
llvm/branches/Apple/williamson/lib/Transforms/Utils/SSI.cpp
Modified: llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp Wed Jul 28 13:40:38 2010
@@ -2584,7 +2584,7 @@
// Push the def-use children onto the Worklist stack.
for (Value::use_iterator UI = I->use_begin(), UE = I->use_end();
UI != UE; ++UI)
- Worklist.push_back(cast<Instruction>(UI));
+ Worklist.push_back(cast<Instruction>(*UI));
}
/// ForgetSymbolicValue - This looks up computed SCEV values for all
Copied: llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp.orig (from r109516, llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp)
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp.orig?p2=llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp.orig&p1=llvm/branches/Apple/williamson/lib/Analysis/ScalarEvolution.cpp&r1=109516&r2=109609&rev=109609&view=diff
==============================================================================
(empty)
Modified: llvm/branches/Apple/williamson/lib/CodeGen/DwarfEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/CodeGen/DwarfEHPrepare.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/CodeGen/DwarfEHPrepare.cpp (original)
+++ llvm/branches/Apple/williamson/lib/CodeGen/DwarfEHPrepare.cpp Wed Jul 28 13:40:38 2010
@@ -144,7 +144,7 @@
SI = 0;
for (Value::use_iterator
I = II->use_begin(), E = II->use_end(); I != E; ++I) {
- SI = dyn_cast<StoreInst>(I);
+ SI = dyn_cast<StoreInst>(*I);
if (SI) break;
}
@@ -207,7 +207,7 @@
for (Value::use_iterator
I = SelectorIntrinsic->use_begin(),
E = SelectorIntrinsic->use_end(); I != E; ++I) {
- IntrinsicInst *II = cast<IntrinsicInst>(I);
+ IntrinsicInst *II = cast<IntrinsicInst>(*I);
if (II->getParent()->getParent() != F)
continue;
@@ -225,7 +225,7 @@
for (Value::use_iterator
I = URoR->use_begin(),
E = URoR->use_end(); I != E; ++I) {
- if (InvokeInst *II = dyn_cast<InvokeInst>(I))
+ if (InvokeInst *II = dyn_cast<InvokeInst>(*I))
URoRInvokes.insert(II);
}
}
@@ -271,7 +271,7 @@
restart:
for (Value::use_iterator
I = Inst->use_begin(), E = Inst->use_end(); I != E; ++I) {
- Instruction *II = dyn_cast<Instruction>(I);
+ Instruction *II = dyn_cast<Instruction>(*I);
if (!II || II->getParent()->getParent() != F) continue;
if (IntrinsicInst *Sel = dyn_cast<IntrinsicInst>(II)) {
@@ -360,7 +360,7 @@
for (Value::use_iterator
I = ExceptionValueIntrinsic->use_begin(),
E = ExceptionValueIntrinsic->use_end(); I != E; ++I) {
- IntrinsicInst *EHPtr = dyn_cast<IntrinsicInst>(I);
+ IntrinsicInst *EHPtr = dyn_cast<IntrinsicInst>(*I);
if (!EHPtr || EHPtr->getParent()->getParent() != F) continue;
Changed |= PromoteEHPtrStore(EHPtr);
Modified: llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/FastISel.cpp Wed Jul 28 13:40:38 2010
@@ -94,7 +94,7 @@
!(I->getOpcode() == Instruction::BitCast ||
I->getOpcode() == Instruction::PtrToInt ||
I->getOpcode() == Instruction::IntToPtr) &&
- cast<Instruction>(I->use_begin())->getParent() == I->getParent();
+ cast<Instruction>(*I->use_begin())->getParent() == I->getParent();
}
unsigned FastISel::getRegForValue(const Value *V) {
Modified: llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/branches/Apple/williamson/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jul 28 13:40:38 2010
@@ -216,7 +216,7 @@
for (Value::const_use_iterator
I = Callee->use_begin(), E = Callee->use_end();
I != E; ++I)
- if (const CallInst *CI = dyn_cast<CallInst>(I))
+ if (const CallInst *CI = dyn_cast<CallInst>(*I))
if (CI->getParent()->getParent() == F)
return true;
}
Modified: llvm/branches/Apple/williamson/lib/Transforms/IPO/StructRetPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Transforms/IPO/StructRetPromotion.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Transforms/IPO/StructRetPromotion.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Transforms/IPO/StructRetPromotion.cpp Wed Jul 28 13:40:38 2010
@@ -187,7 +187,7 @@
return false;
for (Value::use_iterator GEPI = GEP->use_begin(), GEPE = GEP->use_end();
GEPI != GEPE; ++GEPI)
- if (!isa<LoadInst>(GEPI))
+ if (!isa<LoadInst>(*GEPI))
return false;
}
// Any other FirstArg users make this function unsuitable for sret
Modified: llvm/branches/Apple/williamson/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp Wed Jul 28 13:40:38 2010
@@ -369,7 +369,7 @@
if (DbgDeclareInst *DI = dyn_cast<DbgDeclareInst>(U))
return DI;
if (isa<BitCastInst>(U) && U->hasOneUse()) {
- if (DbgDeclareInst *DI = dyn_cast<DbgDeclareInst>(U->use_begin()))
+ if (DbgDeclareInst *DI = dyn_cast<DbgDeclareInst>(*U->use_begin()))
return DI;
}
}
Modified: llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp Wed Jul 28 13:40:38 2010
@@ -735,7 +735,7 @@
for (Instruction::use_iterator UI = p->use_begin(), E = p->use_end();
UI != E; ++UI)
- if (PHINode* use_phi = dyn_cast<PHINode>(UI))
+ if (PHINode* use_phi = dyn_cast<PHINode>(*UI))
if (use_phi->getParent() == inst->getParent())
return false;
Copied: llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp.orig (from r109516, llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp)
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp.orig?p2=llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp.orig&p1=llvm/branches/Apple/williamson/lib/Transforms/Scalar/GVN.cpp&r1=109516&r2=109609&rev=109609&view=diff
==============================================================================
(empty)
Modified: llvm/branches/Apple/williamson/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Jul 28 13:40:38 2010
@@ -862,9 +862,9 @@
// Check Incr uses. One user is PN and the other user is an exit condition
// used by the conditional terminator.
Value::use_iterator IncrUse = Incr->use_begin();
- Instruction *U1 = cast<Instruction>(IncrUse++);
+ Instruction *U1 = cast<Instruction>(*IncrUse++);
if (IncrUse == Incr->use_end()) return;
- Instruction *U2 = cast<Instruction>(IncrUse++);
+ Instruction *U2 = cast<Instruction>(*IncrUse++);
if (IncrUse != Incr->use_end()) return;
// Find exit condition, which is an fcmp. If it doesn't exist, or if it isn't
Modified: llvm/branches/Apple/williamson/lib/Transforms/Scalar/LoopIndexSplit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Transforms/Scalar/LoopIndexSplit.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Transforms/Scalar/LoopIndexSplit.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Transforms/Scalar/LoopIndexSplit.cpp Wed Jul 28 13:40:38 2010
@@ -1183,7 +1183,7 @@
bool usedOutsideBB = false;
for (Value::use_iterator UI = I->use_begin(), UE = I->use_end();
UI != UE; ++UI) {
- Instruction *U = cast<Instruction>(UI);
+ Instruction *U = cast<Instruction>(*UI);
if (U->getParent() != BB)
usedOutsideBB = true;
}
Modified: llvm/branches/Apple/williamson/lib/Transforms/Scalar/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Transforms/Scalar/SimplifyLibCalls.cpp Wed Jul 28 13:40:38 2010
@@ -532,7 +532,7 @@
StrLen, B, TD);
for (Value::use_iterator UI = CI->use_begin(), UE = CI->use_end();
UI != UE; ) {
- ICmpInst *Old = cast<ICmpInst>(UI++);
+ ICmpInst *Old = cast<ICmpInst>(*UI++);
Value *Cmp = B.CreateICmp(Old->getPredicate(), StrNCmp,
ConstantInt::getNullValue(StrNCmp->getType()),
"cmp");
Modified: llvm/branches/Apple/williamson/lib/Transforms/Utils/BreakCriticalEdges.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Transforms/Utils/BreakCriticalEdges.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Transforms/Utils/BreakCriticalEdges.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Transforms/Utils/BreakCriticalEdges.cpp Wed Jul 28 13:40:38 2010
@@ -225,7 +225,7 @@
for (Value::use_iterator UI = TIBB->use_begin(), E = TIBB->use_end();
UI != E; ) {
Value::use_iterator Use = UI++;
- if (PHINode *PN = dyn_cast<PHINode>(Use)) {
+ if (PHINode *PN = dyn_cast<PHINode>(*Use)) {
// Remove one entry from each PHI.
if (PN->getParent() == DestBB && UpdatedPHIs.insert(PN))
PN->setOperand(Use.getOperandNo(), NewBB);
Modified: llvm/branches/Apple/williamson/lib/Transforms/Utils/SSI.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Transforms/Utils/SSI.cpp?rev=109609&r1=109608&r2=109609&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Transforms/Utils/SSI.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Transforms/Utils/SSI.cpp Wed Jul 28 13:40:38 2010
@@ -80,12 +80,12 @@
for (Value::use_iterator begin = (*I)->use_begin(),
end = (*I)->use_end(); begin != end; ++begin) {
// Test if the Use of the Value is in a comparator
- if (CmpInst *CI = dyn_cast<CmpInst>(begin)) {
+ if (CmpInst *CI = dyn_cast<CmpInst>(*begin)) {
// Iterates through all uses of CmpInst
for (Value::use_iterator begin_ci = CI->use_begin(),
end_ci = CI->use_end(); begin_ci != end_ci; ++begin_ci) {
// Test if any use of CmpInst is in a Terminator
- if (TerminatorInst *TI = dyn_cast<TerminatorInst>(begin_ci)) {
+ if (TerminatorInst *TI = dyn_cast<TerminatorInst>(*begin_ci)) {
insertSigma(TI, *I);
}
}
More information about the llvm-branch-commits
mailing list