[llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp X86TargetMachine.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Dec 20 04:21:01 PST 2003
Changes in directory llvm/lib/Target/X86:
X86CodeEmitter.cpp updated: 1.44 -> 1.45
X86TargetMachine.cpp updated: 1.40 -> 1.41
---
Log message:
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.
---
Diffs of the changes: (+9 -2)
Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.44 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.45
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.44 Fri Dec 19 20:03:14 2003
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp Sat Dec 20 04:20:19 2003
@@ -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 @@
bool X86TargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
MachineCodeEmitter &MCE) {
PM.add(new Emitter(MCE));
+ // Delete machine code for this function
+ PM.add(createMachineCodeDeleter());
return false;
}
Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.40 llvm/lib/Target/X86/X86TargetMachine.cpp:1.41
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.40 Fri Dec 19 19:22:04 2003
+++ llvm/lib/Target/X86/X86TargetMachine.cpp Sat Dec 20 04:20:19 2003
@@ -79,7 +79,7 @@
// 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 @@
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 @@
// 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());
More information about the llvm-commits
mailing list