aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-07 16:42:51 +0000
committerChris Lattner <sabre@nondot.org>2001-09-07 16:42:51 +0000
commit78721d54186cad8db817bad13360dad286524945 (patch)
treec825c61a11b593d910aad6719688d50070911f52
parent7365745546087f0998d5f40fe6966316ee1b725b (diff)
Constant pool is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@455 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp
index bd4fd26a9d..27ef66e42e 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -40,8 +40,8 @@ static inline void RemapInstruction(Instruction *I,
for (unsigned op = 0, E = I->getNumOperands(); op != E; ++op) {
const Value *Op = I->getOperand(op);
Value *V = ValueMap[Op];
- if (!V && Op->isMethod())
- continue; // Methods don't get relocated
+ if (!V && (Op->isMethod() || Op->isConstant()))
+ continue; // Methods and constants don't get relocated
if (!V) {
cerr << "Val = " << endl << Op << "Addr = " << (void*)Op << endl;
@@ -176,20 +176,6 @@ bool opt::InlineMethod(BasicBlock::iterator CIIt) {
}
- // Copy over the constant pool...
- //
- const ConstantPool &CP = CalledMeth->getConstantPool();
- ConstantPool &NewCP = CurrentMeth->getConstantPool();
- for (ConstantPool::plane_const_iterator PI = CP.begin(); PI != CP.end(); ++PI){
- ConstantPool::PlaneType &Plane = **PI;
- for (ConstantPool::PlaneType::const_iterator I = Plane.begin();
- I != Plane.end(); ++I) {
- ConstPoolVal *NewVal = (*I)->clone(); // Copy existing constant
- NewCP.insert(NewVal); // Insert the new copy into local const pool
- ValueMap[*I] = NewVal; // Keep track of constant value mappings
- }
- }
-
// Loop over all of the instructions in the method, fixing up operand
// references as we go. This uses ValueMap to do all the hard work.
//