llvm-6502/lib
Chris Lattner c5494af8a9 Now that codegen prepare isn't defeating me, I can finally fix what I set
out to do! :)

This fixes a problem where LSR would insert a bunch of code into each MBB
that uses a particular subexpression (e.g. IV+base+C).  The problem is that
this code cannot be CSE'd back together if inserted into different blocks.

This patch changes LSR to attempt to insert a single copy of this code and
share it, allowing codegenprepare to duplicate the code if it can be sunk
into various addressing modes.  On CodeGen/ARM/lsr-code-insertion.ll,
for example, this gives us code like:

        add r8, r0, r5
        str r6, [r8, #+4]
..
        ble LBB1_4      @cond_next
LBB1_3: @cond_true
        str r10, [r8, #+4]
LBB1_4: @cond_next
...
LBB1_5: @cond_true55
        ldr r6, LCPI1_1
        str r6, [r8, #+4]

instead of:

        add r10, r0, r6
        str r8, [r10, #+4]
...
        ble LBB1_4      @cond_next
LBB1_3: @cond_true
        add r8, r0, r6
        str r10, [r8, #+4]
LBB1_4: @cond_next
...
LBB1_5: @cond_true55
        add r8, r0, r6
        ldr r10, LCPI1_1
        str r10, [r8, #+4]

Besides being smaller and more efficient, this makes it immediately
obvious that it is profitable to predicate LBB1_3 now :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35972 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-13 20:42:26 +00:00
..
Analysis CSE simple binary expressions when they are inserted. This makes LSR produce 2007-04-13 05:04:18 +00:00
Archive Avoid a useless temporary constrution. 2007-04-07 19:51:45 +00:00
AsmParser Implement the "thread_local" keyword. 2007-04-12 18:32:50 +00:00
Bytecode Implement the "thread_local" keyword. 2007-04-12 18:32:50 +00:00
CodeGen Fix PR1323 : we haven't updated phi nodes in good manner :) 2007-04-13 06:53:51 +00:00
Debugger Make sure temporary data is not used past its life span. 2007-04-08 20:10:14 +00:00
ExecutionEngine For PR1293: 2007-03-30 16:41:50 +00:00
Linker Implement the "thread_local" keyword. 2007-04-12 18:32:50 +00:00
Support Implement a getBitsNeeded method to determine how many bits are needed to 2007-04-13 19:19:07 +00:00
System Hack to get sys::Path to recognize macho dylibs. 2007-04-11 03:15:35 +00:00
Target arm has r+r*s and r+i addr modes, but no r+i+r*s addr modes. 2007-04-13 06:50:55 +00:00
Transforms Now that codegen prepare isn't defeating me, I can finally fix what I set 2007-04-13 20:42:26 +00:00
VMCore Implement the "thread_local" keyword. 2007-04-12 18:32:50 +00:00
Makefile Changes to support making the shift instructions be true BinaryOperators. 2007-02-02 02:16:23 +00:00