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
This commit is contained in:
Alkis Evlogimenos
2003-12-13 05:36:22 +00:00
parent 9435eda699
commit 359b65f782
4 changed files with 120 additions and 0 deletions

View File

@ -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());