diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:42:26 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:42:26 +0000 |
| commit | 6d7bce9f3c662e8f7a80aa291a227fb9b26b1b1c (patch) | |
| tree | b27f8fa7231dd2b6ceec9d302d090e3ab5b9d057 /llvm/lib/Transforms | |
| parent | 07e158de3c7399d041debe66244a93801d248896 (diff) | |
| download | bcm5719-llvm-6d7bce9f3c662e8f7a80aa291a227fb9b26b1b1c.tar.gz bcm5719-llvm-6d7bce9f3c662e8f7a80aa291a227fb9b26b1b1c.zip | |
Constants are now global unique objects
llvm-svn: 454
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InductionVars.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/InductionVars.cpp b/llvm/lib/Transforms/Scalar/InductionVars.cpp index 42397e0a3a1..b78eab8ad2e 100644 --- a/llvm/lib/Transforms/Scalar/InductionVars.cpp +++ b/llvm/lib/Transforms/Scalar/InductionVars.cpp @@ -191,8 +191,8 @@ static PHINode *InjectSimpleInductionVariable(cfg::Interval *Int) { // Create the neccesary instructions... PHINode *PN = new PHINode(Type::UIntTy, PHIName); - ConstPoolVal *One = new ConstPoolUInt(Type::UIntTy, 1); - ConstPoolVal *Zero = new ConstPoolUInt(Type::UIntTy, 0); + ConstPoolVal *One = ConstPoolUInt::get(Type::UIntTy, 1); + ConstPoolVal *Zero = ConstPoolUInt::get(Type::UIntTy, 0); BinaryOperator *AddNode = BinaryOperator::create(Instruction::Add, PN, One, AddName); @@ -228,10 +228,6 @@ static PHINode *InjectSimpleInductionVariable(cfg::Interval *Int) { BasicBlock::iterator I = IL.begin(); while ((*I)->isPHINode()) ++I; IL.insert(I, AddNode); - - // Insert the constants into the constant pool for the method... - M->getConstantPool().insert(One); - M->getConstantPool().insert(Zero); return PN; } |

