1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

Bug re-fix: put back MachineCodeForInstruction::get(*I).dropAllReferences().

Also re-enable instr. scheduling pass.

llvm-svn: 1966
This commit is contained in:
Vikram S. Adve 2002-03-24 03:35:16 +00:00
parent 7b84ec22d8
commit 8ada4c031e

View File

@ -234,15 +234,18 @@ struct FreeMachineCodeForMethod : public MethodPass {
static void freeMachineCode(Instruction *I) {
MachineCodeForInstruction::destroy(I);
}
bool runOnMethod(Method *M) {
for (Method::iterator MI = M->begin(), ME = M->end(); MI != ME; ++MI)
for (BasicBlock::iterator I = (*MI)->begin(), E = (*MI)->end();
I != E; ++I)
MachineCodeForInstruction::get(*I).dropAllReferences();
for (Method::iterator MI = M->begin(), ME = M->end(); MI != ME; ++MI)
for (BasicBlock::iterator I = (*MI)->begin(), E = (*MI)->end();
I != E; ++I)
freeMachineCode(*I);
// Don't destruct MachineCodeForMethod - The global printer needs it
//MachineCodeForMethod::destruct(M);
return false;
}
};
@ -258,7 +261,7 @@ void UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) {
PM.add(new InstructionSelection(*this));
//PM.add(createInstructionSchedulingWithSSAPass(*this));
PM.add(createInstructionSchedulingWithSSAPass(*this));
PM.add(getRegisterAllocator(*this));