summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/InlineSimple.cpp
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
commite57fc205f46ddbc299848e09367301c321be9629 (patch)
tree197a7b45156e51c82030b41183d025a4775b51ae /llvm/lib/Transforms/IPO/InlineSimple.cpp
parent6d7bce9f3c662e8f7a80aa291a227fb9b26b1b1c (diff)
downloadbcm5719-llvm-e57fc205f46ddbc299848e09367301c321be9629.tar.gz
bcm5719-llvm-e57fc205f46ddbc299848e09367301c321be9629.zip
Constant pool is dead
llvm-svn: 455
Diffstat (limited to 'llvm/lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/InlineSimple.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp
index bd4fd26a9dd..27ef66e42e3 100644
--- a/llvm/lib/Transforms/IPO/InlineSimple.cpp
+++ b/llvm/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.
//
OpenPOWER on IntegriCloud