LLVM backend for 6502
Go to file
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
autoconf Hack the shared library extension for dylib. The existing code just looks 2007-04-11 00:33:43 +00:00
docs update documentation 2007-04-12 20:34:36 +00:00
examples
include Implement a getBitsNeeded method to determine how many bits are needed to 2007-04-13 19:19:07 +00:00
lib Now that codegen prepare isn't defeating me, I can finally fix what I set 2007-04-13 20:42:26 +00:00
projects
runtime
test new lsr testcase 2007-04-13 20:38:14 +00:00
tools Make the generated code for ConstantInt nicer. 2007-04-11 13:02:56 +00:00
utils Adding target triplet to be passed to database. 2007-04-13 04:36:48 +00:00
win32 Track new header file. 2007-04-08 21:19:52 +00:00
Xcode
.cvsignore
configure Hopefully fix LTDL_SHLIB_EXT on Darwin 2007-04-11 00:27:39 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in For PR789: 2007-03-29 19:05:44 +00:00
Makefile.rules Speed up installation a bit by ignoring .svn directories. 2007-04-09 19:08:58 +00:00
README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level 
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments. 

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.