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
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index eb4d19a..fba8e8d 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -76,6 +76,11 @@
   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 @@
   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());