diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-02 08:54:30 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-02 08:54:30 +0000 |
| commit | 104bd8179fb5f6551c65c94ebcd0a4918b060189 (patch) | |
| tree | cf5763d092b81cecc168fa28032247ee495d06e2 /lib/Transforms/Utils/SimplifyCFG.cpp | |
| parent | 2f12f10af369d468b14617276446166383d692ed (diff) | |
Notes
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
| -rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 2ce5bdcd61d4..9f2209dfcfc0 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -224,7 +224,7 @@ static bool DominatesMergePoint(Value *V, BasicBlock *BB, if (BI->isUnconditional() && BI->getSuccessor(0) == BB) { if (!AggressiveInsts) return false; // Okay, it looks like the instruction IS in the "condition". Check to - // see if its a cheap instruction to unconditionally compute, and if it + // see if it's a cheap instruction to unconditionally compute, and if it // only uses stuff defined outside of the condition. If so, hoist it out. if (!I->isSafeToSpeculativelyExecute()) return false; @@ -1768,7 +1768,7 @@ bool SimplifyCFGOpt::run(BasicBlock *BB) { Pred->getInstList().remove(II); // Take out of symbol table // Insert the call now. - SmallVector<Value*,8> Args(II->op_begin()+3, II->op_end()); + SmallVector<Value*,8> Args(II->op_begin(), II->op_end()-3); CallInst *CI = CallInst::Create(II->getCalledValue(), Args.begin(), Args.end(), II->getName(), BI); @@ -1970,13 +1970,13 @@ bool SimplifyCFGOpt::run(BasicBlock *BB) { II->removeFromParent(); // Take out of symbol table // Insert the call now... - SmallVector<Value*, 8> Args(II->op_begin()+3, II->op_end()); + SmallVector<Value*, 8> Args(II->op_begin(), II->op_end()-3); CallInst *CI = CallInst::Create(II->getCalledValue(), Args.begin(), Args.end(), II->getName(), BI); CI->setCallingConv(II->getCallingConv()); CI->setAttributes(II->getAttributes()); - // If the invoke produced a value, the Call does now instead. + // If the invoke produced a value, the call does now instead. II->replaceAllUsesWith(CI); delete II; Changed = true; |
