diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-04-27 02:25:14 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-04-27 02:25:14 +0000 |
| commit | 2716b5e524d29855d69d4cd29a4a468c485cc0b9 (patch) | |
| tree | 67a17e8fd58ff4cd585d342ae5c9c798491a3dbb /llvm/lib/Transforms/Scalar | |
| parent | 93ddab25e825125756cd8304111bdca4edbac8d1 (diff) | |
| download | bcm5719-llvm-2716b5e524d29855d69d4cd29a4a468c485cc0b9.tar.gz bcm5719-llvm-2716b5e524d29855d69d4cd29a4a468c485cc0b9.zip | |
Change Constant::getNullConstant to Constant::getNullValue
llvm-svn: 2323
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/DCE.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/DCE.cpp b/llvm/lib/Transforms/Scalar/DCE.cpp index c48fa2f3f7e..6169730ce88 100644 --- a/llvm/lib/Transforms/Scalar/DCE.cpp +++ b/llvm/lib/Transforms/Scalar/DCE.cpp @@ -108,10 +108,8 @@ static bool RemoveSingularPHIs(BasicBlock *BB) { } static void ReplaceUsesWithConstant(Instruction *I) { - Constant *CPV = Constant::getNullConstant(I->getType()); - // Make all users of this instruction reference the constant instead - I->replaceAllUsesWith(CPV); + I->replaceAllUsesWith(Constant::getNullValue(I->getType())); } // PropogatePredecessors - This gets "Succ" ready to have the predecessors from diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index e852452d757..a3880255313 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -101,7 +101,7 @@ static bool TransformLoop(cfg::LoopInfo *Loops, cfg::Loop *Loop) { assert(PI == pred_end(Header) && "Loop headers should have 2 preds!"); // Add incoming values for the PHI node... - PN->addIncoming(Constant::getNullConstant(Type::UIntTy), Incoming); + PN->addIncoming(Constant::getNullValue(Type::UIntTy), Incoming); PN->addIncoming(Add, BackEdgeBlock); // Analyze the new induction variable... diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 311ceae441b..c2fa84c21f7 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -123,7 +123,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator *I) { // if (Constant *Op2 = dyn_cast<Constant>(I->getOperand(1))) // Calculate 0 - RHS - if (Constant *RHS = *Constant::getNullConstant(I->getType()) - *Op2) { + if (Constant *RHS = *Constant::getNullValue(I->getType()) - *Op2) { return BinaryOperator::create(Instruction::Add, I->getOperand(0), RHS, I->getName()); } |

