aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
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());