diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-20 10:20:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-20 10:20:19 +0000 |
commit | 452597611f2f6c360425bb4f3a7cbac9b091bd1f (patch) | |
tree | 464e429a8985579b204d5e79ad4cdfd331308362 | |
parent | b1bbd7c7f6c524b31268cea06e63eab8f5f13c16 (diff) | |
download | bcm5719-llvm-452597611f2f6c360425bb4f3a7cbac9b091bd1f.tar.gz bcm5719-llvm-452597611f2f6c360425bb4f3a7cbac9b091bd1f.zip |
Finally, _actually delete the machine code_ for a function, after it has
been emitted. Also, since the FPK pass is causing memory access violations,
disable it.
llvm-svn: 10559
-rw-r--r-- | llvm/lib/Target/X86/X86CodeEmitter.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86TargetMachine.cpp | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86CodeEmitter.cpp b/llvm/lib/Target/X86/X86CodeEmitter.cpp index d783f89fb2a..c3f1461db30 100644 --- a/llvm/lib/Target/X86/X86CodeEmitter.cpp +++ b/llvm/lib/Target/X86/X86CodeEmitter.cpp @@ -19,6 +19,7 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/Passes.h" #include "llvm/Function.h" #include "Support/Debug.h" #include "Support/Statistic.h" @@ -211,6 +212,8 @@ namespace { bool X86TargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM, MachineCodeEmitter &MCE) { PM.add(new Emitter(MCE)); + // Delete machine code for this function + PM.add(createMachineCodeDeleter()); return false; } diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp index 2e989f05336..a56e35f4d6f 100644 --- a/llvm/lib/Target/X86/X86TargetMachine.cpp +++ b/llvm/lib/Target/X86/X86TargetMachine.cpp @@ -79,7 +79,7 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, // kill floating point registers at the end of basic blocks. this is // done because the floating point register stackifier cannot handle // floating point regs that are live across basic blocks. - PM.add(createX86FloatingPointKillerPass()); + //PM.add(createX86FloatingPointKillerPass()); // Perform register allocation to convert to a concrete x86 representation PM.add(createRegisterAllocator()); @@ -101,6 +101,10 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, PM.add(createX86CodePrinterPass(std::cerr, *this)); PM.add(createX86CodePrinterPass(Out, *this)); + + // Delete machine code for this function + PM.add(createMachineCodeDeleter()); + return false; // success! } @@ -137,7 +141,7 @@ void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { // kill floating point registers at the end of basic blocks. this is // done because the floating point register stackifier cannot handle // floating point regs that are live across basic blocks. - PM.add(createX86FloatingPointKillerPass()); + //PM.add(createX86FloatingPointKillerPass()); // Perform register allocation to convert to a concrete x86 representation PM.add(createRegisterAllocator()); |