Allow x87 FP registers to be alive globally in a function.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 16 Jul 2010 16:38:12 +0000 (16:38 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 16 Jul 2010 16:38:12 +0000 (16:38 +0000)
commite928ec9480072ed1298fba2fbd8faa0e89253bf1
tree7b5716d9051668e7352d07d00e01192fa4054d8b
parent1461520f8cba8ebbdfd832d5396079888f1ab96e
Allow x87 FP registers to be alive globally in a function.

FP_REG_KILL instructions are still inserted, but can be disabled by passing
-live-x87 to llc. The X87FPRegKillInserterPass is going to be removed shortly.

CFG edges are partioned into bundles where the x87 stack must be allocated
identically. Code is insertad at the end of each basic block that shuffles the
live FP registers to match the outgoing bundles expectations.

This fix is in preparation for some upcoming register allocator improvements
that may extend the live range of registers beyond a basic block, similar to
LICM. It also provides a nice runtime speedup if you are building with
-mfpmath=387.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108529 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FloatingPoint.cpp
lib/Target/X86/X86TargetMachine.cpp