#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"
bool X86TargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
MachineCodeEmitter &MCE) {
PM.add(new Emitter(MCE));
+ // Delete machine code for this function
+ PM.add(createMachineCodeDeleter());
return false;
}
// 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());
PM.add(createX86CodePrinterPass(std::cerr, *this));
PM.add(createX86CodePrinterPass(Out, *this));
+
+ // Delete machine code for this function
+ PM.add(createMachineCodeDeleter());
+
return false; // success!
}
// 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());