aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-13 05:36:22 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-13 05:36:22 +0000
commit359b65f782cc323daba4f8c5c21c70a98c9d40ea (patch)
tree2174dc005900c6176f0e1a90d0ffd5b8a691816e /lib/Target/X86/X86TargetMachine.cpp
parent9435eda6993944e74419d2f586fdd25635293760 (diff)
Add a floating point killer pass. This pass runs before register
allocaton on the X86 to add information to the machine code denoting that our floating point stackifier cannot handle virtual point register that are alive across basic blocks. This pass adds an implicit def of all virtual floating point register at the end of each basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10446 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index eb4d19a778..fba8e8dc9e 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -76,6 +76,11 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM,
if (PrintCode)
PM.add(createMachineFunctionPrinterPass());
+ // 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());
+
// Perform register allocation to convert to a concrete x86 representation
PM.add(createRegisterAllocator());
@@ -129,6 +134,11 @@ bool X86TargetMachine::addPassesToJITCompile(FunctionPassManager &PM) {
if (PrintCode)
PM.add(createMachineFunctionPrinterPass());
+ // 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());
+
// Perform register allocation to convert to a concrete x86 representation
PM.add(createRegisterAllocator());