mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-26 06:14:42 +00:00
Constant pool is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@455 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7365745546
commit
78721d5418
@ -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.
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user