llvm/lib/CodeGen
Chris Lattner 11390e76e7 Add support to the local allocator for fusing spill code into the instructions
that need them.  This is very useful on CISCy targets like the X86 because it
reduces the total spill pressure, and makes better use of it's (large)
instruction set.  Though the X86 backend doesn't know how to rewrite many
instructions yet, this already makes a substantial difference on 176.gcc for
example:

Before:
Time:
   8.0099 ( 31.2%)   0.0100 ( 12.5%)   8.0199 ( 31.2%)   7.7186 ( 30.0%)  Local Register Allocator

Code quality:
734559 asm-printer           - Number of machine instrs printed
111395 ra-local              - Number of registers reloaded
 79902 ra-local              - Number of registers spilled
231554 x86-peephole          - Number of peephole optimization performed

After:
Time:
   7.8700 ( 30.6%)   0.0099 ( 19.9%)   7.8800 ( 30.6%)   7.7892 ( 30.2%)  Local Register Allocator
Code quality:
733083 asm-printer           - Number of machine instrs printed
  2379 ra-local              - Number of reloads fused into instructions
109046 ra-local              - Number of registers reloaded
 79881 ra-local              - Number of registers spilled
230658 x86-peephole          - Number of peephole optimization performed

So by fusing 2300 instructions, we reduced the  static number of instructions
by 1500, and reduces the number of peepholes (and thus the work) by about 900.
This also clearly reduces the number of reload/spill instructions that are
emitted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11542 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 08:09:40 +00:00
..
InstrSched Remove getAllocatedRegNum(). Use getReg() instead. 2004-02-13 21:01:20 +00:00
ModuloScheduling Put all LLVM code into the llvm namespace, as per bug 109. 2003-11-11 22:41:34 +00:00
SelectionDAG Put all LLVM code into the llvm namespace, as per bug 109. 2003-11-11 22:41:34 +00:00
IntrinsicLowering.cpp By default, llvm.setjmp/llvm.longjmp intrinsics get lowered to their libc counterparts 2004-02-15 22:24:51 +00:00
LiveIntervalAnalysis.cpp Fix spilled interval update. It was too conservative. 2004-02-17 04:04:20 +00:00
LiveIntervalAnalysis.h Add LiveIntervals::Interval::empty() member function. 2004-02-17 05:14:37 +00:00
LiveVariables.cpp Make dense maps keyed on physical registers smallerusing 2004-02-15 21:37:17 +00:00
MachineBasicBlock.cpp Add LeakDetection to MachineInstr. 2004-02-16 07:17:43 +00:00
MachineCodeEmitter.cpp Put all LLVM code into the llvm namespace, as per bug 109. 2003-11-11 22:41:34 +00:00
MachineCodeForInstruction.cpp Change MachineBasicBlock's vector of MachineInstr pointers into an 2004-02-12 02:27:10 +00:00
MachineFunction.cpp Add LeakDetection to MachineInstr. 2004-02-16 07:17:43 +00:00
MachineInstr.cpp Add LeakDetection to MachineInstr. 2004-02-16 07:17:43 +00:00
MachineInstrAnnot.cpp Put all LLVM code into the llvm namespace, as per bug 109. 2003-11-11 22:41:34 +00:00
Makefile Move InstrSelection into lib/Target/Sparc, as it's sparc specific 2004-01-09 06:24:06 +00:00
Passes.cpp finegrainify namespacification 2003-12-28 07:59:53 +00:00
PHIElimination.cpp Use newly added next() and prior() utility functions. 2004-02-14 01:18:34 +00:00
PrologEpilogInserter.cpp Make dense maps keyed on physical registers smallerusing 2004-02-15 21:37:17 +00:00
RegAllocLinearScan.cpp Eliminate the use of spill (reserved) registers. 2004-02-15 10:24:21 +00:00
RegAllocLocal.cpp Add support to the local allocator for fusing spill code into the instructions 2004-02-17 08:09:40 +00:00
RegAllocSimple.cpp Finegrainify namespacification 2004-02-15 21:38:28 +00:00
TwoAddressInstructionPass.cpp This pass should not require phi elimination or live variable 2004-02-15 21:50:32 +00:00