diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-08-29 23:21:29 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-08-29 23:21:29 +0000 | 
| commit | f7e5ec84c666fa6cbec458acb6ad7962df835a7e (patch) | |
| tree | 04e57caa10879d75b9c8642fb90b4ec372ac7d5b /llvm/lib/CodeGen/RegAllocLinearScan.cpp | |
| parent | 0d45ee4a0613c33e98124287edb7c52587f8b7db (diff) | |
| download | bcm5719-llvm-f7e5ec84c666fa6cbec458acb6ad7962df835a7e.tar.gz bcm5719-llvm-f7e5ec84c666fa6cbec458acb6ad7962df835a7e.zip | |
Add a hack to avoid some horrible code in some cases by always emitting
token chains first.  For this C function:
int test() {
  int i;
  for (i = 0; i < 100000; ++i)
    foo();
}
Instead of emitting this (condition before call)
.LBB_test_1:    ; no_exit
        addi r30, r30, 1
        lis r2, 1
        ori r2, r2, 34464
        cmpw cr2, r30, r2
        bl L_foo$stub
        bne cr2, .LBB_test_1    ; no_exit
Emit this:
.LBB_test_1:    ; no_exit
        bl L_foo$stub
        addi r30, r30, 1
        lis r2, 1
        ori r2, r2, 34464
        cmpw cr0, r30, r2
        bne cr0, .LBB_test_1    ; no_exit
Which makes it so we don't have to save/restore cr2 in the prolog/epilog of
the function.
This also makes the code much more similar to what the pattern isel produces.
llvm-svn: 23135
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
0 files changed, 0 insertions, 0 deletions

