diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-10-30 19:42:35 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-10-30 19:42:35 +0000 |
| commit | 6871b23d0273610c51c743c1f5a82806b462f846 (patch) | |
| tree | aa3198eada65d56698374bce11ac62d9e19a2fd2 /llvm/docs/GettingStartedVS.html | |
| parent | 6beef9032413c3481e8270c77b0a912cb48dea7e (diff) | |
| download | bcm5719-llvm-6871b23d0273610c51c743c1f5a82806b462f846.tar.gz bcm5719-llvm-6871b23d0273610c51c743c1f5a82806b462f846.zip | |
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
llvm-svn: 24115
Diffstat (limited to 'llvm/docs/GettingStartedVS.html')
0 files changed, 0 insertions, 0 deletions

