llvm-6502/lib
Chris Lattner bf209489ad Significantly simplify this code and make it more aggressive. Instead of having
a special case hack for X86, make the hack more general: if an incoming argument
register is not used in any block other than the entry block, don't copy it to
a vreg.  This helps us compile code like this:

%struct.foo = type { int, int, [0 x ubyte] }
int %test(%struct.foo* %X) {
        %tmp1 = getelementptr %struct.foo* %X, int 0, uint 2, int 100
        %tmp = load ubyte* %tmp1                ; <ubyte> [#uses=1]
        %tmp2 = cast ubyte %tmp to int          ; <int> [#uses=1]
        ret int %tmp2
}

to:

_test:
        lbz r3, 108(r3)
        blr

instead of:

_test:
        lbz r2, 108(r3)
        or r3, r2, r2
        blr

The (dead) copy emitted to copy r3 into a vreg for extra-block uses was
increasing the live range of r3 past the load, preventing the coallescing.

This implements CodeGen/PowerPC/reg-coallesce-simple.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24115 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-30 19:42:35 +00:00
..
Analysis Fix a problem that Nate noticed with LSR: 2005-10-30 06:24:33 +00:00
Archive DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now 2005-10-24 02:26:13 +00:00
AsmParser When a function takes a variable number of pointer arguments, with a zero 2005-10-23 04:37:20 +00:00
Bytecode DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now 2005-10-24 02:26:13 +00:00
CodeGen Significantly simplify this code and make it more aggressive. Instead of having 2005-10-30 19:42:35 +00:00
Debugger When a function takes a variable number of pointer arguments, with a zero 2005-10-23 04:37:20 +00:00
ExecutionEngine Fix a nasty bug that was causing miscompilation of global variables 2005-10-23 23:54:56 +00:00
Linker DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now 2005-10-24 02:26:13 +00:00
Support DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now 2005-10-24 02:26:13 +00:00
System DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now 2005-10-24 02:26:13 +00:00
Target If the module has no t-t and the host is an alpha, default to using the Alpha BE 2005-10-30 16:44:01 +00:00
Transforms This pass is now obsolete since all targets have moved to the SelectionDAG 2005-10-29 05:33:46 +00:00
VMCore Allow $ 2005-10-14 01:28:34 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00