diff options
| author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-03-24 03:35:16 +0000 |
|---|---|---|
| committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-03-24 03:35:16 +0000 |
| commit | 75ee890af0218d05b0c5ae3281c2cd7460f4a5e5 (patch) | |
| tree | ca82dc5f079b72cbce02d15dcb9d8ea056a3195e /llvm/lib/Target/Sparc | |
| parent | be08b5ea15128fa53e042d5a295dd0b508a75cf4 (diff) | |
| download | bcm5719-llvm-75ee890af0218d05b0c5ae3281c2cd7460f4a5e5.tar.gz bcm5719-llvm-75ee890af0218d05b0c5ae3281c2cd7460f4a5e5.zip | |
Bug re-fix: put back MachineCodeForInstruction::get(*I).dropAllReferences().
Also re-enable instr. scheduling pass.
llvm-svn: 1966
Diffstat (limited to 'llvm/lib/Target/Sparc')
| -rw-r--r-- | llvm/lib/Target/Sparc/Sparc.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/Target/Sparc/Sparc.cpp b/llvm/lib/Target/Sparc/Sparc.cpp index 666f61c8fac..3eac9c0d2a2 100644 --- a/llvm/lib/Target/Sparc/Sparc.cpp +++ b/llvm/lib/Target/Sparc/Sparc.cpp @@ -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)); |

