diff options
author | Chris Lattner <sabre@nondot.org> | 2007-03-20 06:08:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-03-20 06:08:29 +0000 |
commit | 3e1d917e807e1f6e70f26908291733cea3f39204 (patch) | |
tree | de2bd194043dc19c69b6efc334ee9c5ff0265157 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | d95d748a4d1a1a2c03b321848cdf4e5a974d2d38 (diff) | |
download | bcm5719-llvm-3e1d917e807e1f6e70f26908291733cea3f39204.tar.gz bcm5719-llvm-3e1d917e807e1f6e70f26908291733cea3f39204.zip |
Two changes:
1) codegen a shift of a register as a shift, not an LEA.
2) teach the RA to convert a shift to an LEA instruction if it wants something
in three-address form.
This gives us asm diffs like:
- leal (,%eax,4), %eax
+ shll $2, %eax
which is faster on some processors and smaller on all of them.
and, more interestingly:
- movl 24(%esi), %eax
- leal (,%eax,4), %edi
+ movl 24(%esi), %edi
+ shll $2, %edi
Without #2, #1 was a significant pessimization in some cases.
This implements CodeGen/X86/shift-codegen.ll
llvm-svn: 35204
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions