diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-31 17:39:07 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-31 17:39:07 +0000 |
| commit | 5defacc6e605f4651c6300237cef8e9bb2eb6d0e (patch) | |
| tree | 083068ba3cfc6652b20e6dbe0dbcfe207cc00f6e /lib/Transforms/Scalar/LoopUnswitch.cpp | |
| parent | ed47a0409b187d5dcd2bddfd054326fc809d00ae (diff) | |
| download | llvm-5defacc6e605f4651c6300237cef8e9bb2eb6d0e.tar.gz llvm-5defacc6e605f4651c6300237cef8e9bb2eb6d0e.tar.bz2 llvm-5defacc6e605f4651c6300237cef8e9bb2eb6d0e.tar.xz | |
Move getTrue() and getFalse() to 2.5-like APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnswitch.cpp')
| -rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 95eb3cf218..57672f93ca 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -235,7 +235,7 @@ bool LoopUnswitch::processCurrentLoop() { Value *LoopCond = FindLIVLoopCondition(BI->getCondition(), currentLoop, Changed); if (LoopCond && UnswitchIfProfitable(LoopCond, - Context.getTrue())) { + ConstantInt::getTrue(Context))) { ++NumBranches; return true; } @@ -265,7 +265,7 @@ bool LoopUnswitch::processCurrentLoop() { Value *LoopCond = FindLIVLoopCondition(SI->getCondition(), currentLoop, Changed); if (LoopCond && UnswitchIfProfitable(LoopCond, - Context.getTrue())) { + ConstantInt::getTrue(Context))) { ++NumSelects; return true; } @@ -354,10 +354,10 @@ bool LoopUnswitch::IsTrivialUnswitchCondition(Value *Cond, Constant **Val, // this. if ((LoopExitBB = isTrivialLoopExitBlock(currentLoop, BI->getSuccessor(0)))) { - if (Val) *Val = Context.getTrue(); + if (Val) *Val = ConstantInt::getTrue(Context); } else if ((LoopExitBB = isTrivialLoopExitBlock(currentLoop, BI->getSuccessor(1)))) { - if (Val) *Val = Context.getFalse(); + if (Val) *Val = ConstantInt::getFalse(Context); } } else if (SwitchInst *SI = dyn_cast<SwitchInst>(HeaderTerm)) { // If this isn't a switch on Cond, we can't handle it. @@ -513,7 +513,7 @@ void LoopUnswitch::EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val, Value *BranchVal = LIC; if (!isa<ConstantInt>(Val) || Val->getType() != Type::Int1Ty) BranchVal = new ICmpInst(InsertPt, ICmpInst::ICMP_EQ, LIC, Val, "tmp"); - else if (Val != Val->getContext().getTrue()) + else if (Val != ConstantInt::getTrue(Val->getContext())) // We want to enter the new loop when the condition is true. std::swap(TrueDest, FalseDest); @@ -952,7 +952,7 @@ void LoopUnswitch::RewriteLoopBodyWithConditionConstant(Loop *L, Value *LIC, Instruction* OldTerm = Old->getTerminator(); BranchInst::Create(Split, SISucc, - Context.getTrue(), OldTerm); + ConstantInt::getTrue(Context), OldTerm); LPM->deleteSimpleAnalysisValue(Old->getTerminator(), L); Old->getTerminator()->eraseFromParent(); |
