summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-04-23 16:37:45 +0000
committerChris Lattner <sabre@nondot.org>2003-04-23 16:37:45 +0000
commite408e25132b8de8c757db1e3ddcd70432dfeb24d (patch)
tree629c22dc753c0a18f2188a3089f0a8d19fc73464 /lib/Transforms/Scalar/CorrelatedExprs.cpp
parent2ee82e05e3e41fa23951d3503db5483a36dc3ae3 (diff)
downloadllvm-e408e25132b8de8c757db1e3ddcd70432dfeb24d.tar.gz
llvm-e408e25132b8de8c757db1e3ddcd70432dfeb24d.tar.bz2
llvm-e408e25132b8de8c757db1e3ddcd70432dfeb24d.tar.xz
Remove unnecesary &*'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CorrelatedExprs.cpp')
-rw-r--r--lib/Transforms/Scalar/CorrelatedExprs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp
index cb8bd6109c..c560e83697 100644
--- a/lib/Transforms/Scalar/CorrelatedExprs.cpp
+++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp
@@ -450,11 +450,11 @@ bool CEE::ForwardCorrelatedEdgeDestination(TerminatorInst *TI, unsigned SuccNo,
// Put the newly discovered information into the RegionInfo...
for (BasicBlock::iterator I = OldSucc->begin(), E = OldSucc->end(); I!=E; ++I)
- if (PHINode *PN = dyn_cast<PHINode>(&*I)) {
+ if (PHINode *PN = dyn_cast<PHINode>(I)) {
int OpNum = PN->getBasicBlockIndex(BB);
assert(OpNum != -1 && "PHI doesn't have incoming edge for predecessor!?");
PropagateEquality(PN, PN->getIncomingValue(OpNum), NewRI);
- } else if (SetCondInst *SCI = dyn_cast<SetCondInst>(&*I)) {
+ } else if (SetCondInst *SCI = dyn_cast<SetCondInst>(I)) {
Relation::KnownResult Res = getSetCCResult(SCI, NewRI);
if (Res == Relation::Unknown) return false;
PropagateEquality(SCI, ConstantBool::get(Res), NewRI);
@@ -563,7 +563,7 @@ void CEE::ForwardSuccessorTo(TerminatorInst *TI, unsigned SuccNo,
// node with a new value.
//
for (BasicBlock::iterator I = OldSucc->begin();
- PHINode *PN = dyn_cast<PHINode>(&*I); ) {
+ PHINode *PN = dyn_cast<PHINode>(I); ) {
// Get the value flowing across the old edge and remove the PHI node entry
// for this edge: we are about to remove the edge! Don't remove the PHI
@@ -993,7 +993,7 @@ void CEE::ComputeReplacements(RegionInfo &RI) {
bool CEE::SimplifyBasicBlock(BasicBlock &BB, const RegionInfo &RI) {
bool Changed = false;
for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ) {
- Instruction *Inst = &*I++;
+ Instruction *Inst = I++;
// Convert instruction arguments to canonical forms...
Changed |= SimplifyInstruction(Inst, RI);