llvm-6502/lib
Chris Lattner 010de25f42 Implement a simple optimization for the termination condition of the loop.
The termination condition actually wants to use the post-incremented value
of the loop, not a new indvar with an unusual base.

On PPC, for example, this allows us to compile
LoopStrengthReduce/exit_compare_live_range.ll to:

_foo:
        li r2, 0
.LBB_foo_1:     ; no_exit
        li r5, 0
        stw r5, 0(r3)
        addi r2, r2, 1
        cmpw cr0, r2, r4
        bne .LBB_foo_1  ; no_exit
        blr

instead of:

_foo:
        li r2, 1                ;; IV starts at 1, not 0
.LBB_foo_1:     ; no_exit
        li r5, 0
        stw r5, 0(r3)
        addi r5, r2, 1
        cmpw cr0, r2, r4
        or r2, r5, r5           ;; Reg-reg copy, extra live range
        bne .LBB_foo_1  ; no_exit
        blr

This implements LoopStrengthReduce/exit_compare_live_range.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22699 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-08 05:28:22 +00:00
..
Analysis * Unbreak optimized build (noticed by Eric van Riet Paap) 2005-08-04 14:16:48 +00:00
Archive Final Changes For PR495: 2005-07-08 03:08:58 +00:00
AsmParser Fix grammar 2005-06-24 18:00:40 +00:00
Bytecode Eliminate all remaining tabs and trailing spaces. 2005-07-27 06:12:32 +00:00
CodeGen Handle 64-bit constant exprs on 64-bit targets. 2005-08-08 04:26:32 +00:00
Debugger For PR495: 2005-07-07 23:21:43 +00:00
ExecutionEngine one cannot allocate a global, until one is done initializing the global pointers 2005-08-01 17:35:40 +00:00
Linker For PR495: 2005-07-07 23:21:43 +00:00
Support 200.sixtrack prints FP numbers with a very strange notation that uses D 2005-08-02 00:11:53 +00:00
System Fix grammar: it's == "it is". 2005-08-02 16:04:59 +00:00
Target Consolidate the GPOpt stuff to all use the Subtarget, instead of still 2005-08-05 22:05:03 +00:00
Transforms Implement a simple optimization for the termination condition of the loop. 2005-08-08 05:28:22 +00:00
VMCore add new helper function 2005-08-08 05:21:50 +00:00
Makefile