LLVM backend for 6502
Go to file
Chris Lattner e33544ce55 Enhance the truncstore optimization code to handle shifted
values and propagate demanded bits through them in simple cases.

This allows this code:
void foo(char *P) {
   strcpy(P, "abc");
}
to compile to:

_foo:
        ldrb r3, [r1]
        ldrb r2, [r1, #+1]
        ldrb r12, [r1, #+2]!
        ldrb r1, [r1, #+1]
        strb r1, [r0, #+3]
        strb r2, [r0, #+1]
        strb r12, [r0, #+2]
        strb r3, [r0]
        bx lr

instead of:

_foo:
        ldrb r3, [r1, #+3]
        ldrb r2, [r1, #+2]
        orr r3, r2, r3, lsl #8
        ldrb r2, [r1, #+1]
        ldrb r1, [r1]
        orr r2, r1, r2, lsl #8
        orr r3, r2, r3, lsl #16
        strb r3, [r0]
        mov r2, r3, lsr #24
        strb r2, [r0, #+3]
        mov r2, r3, lsr #16
        strb r2, [r0, #+2]
        mov r3, r3, lsr #8
        strb r3, [r0, #+1]
        bx lr

testcase here: test/CodeGen/ARM/truncstore-dag-combine.ll

This also helps occasionally for X86 and other cases not involving 
unaligned load/stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42954 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-13 06:58:48 +00:00
autoconf
bindings Fix ocaml bindings for picky linkers. :) 2007-10-12 19:48:13 +00:00
docs
examples
include Change unfoldMemoryOperand(). User is now responsible for passing in the 2007-10-13 02:35:06 +00:00
lib Enhance the truncstore optimization code to handle shifted 2007-10-13 06:58:48 +00:00
projects
runtime
test new testcase 2007-10-13 06:56:18 +00:00
tools
utils Fix typos. 2007-10-12 08:39:02 +00:00
website
win32 Updated VC++ build system. 2007-10-10 19:50:09 +00:00
Xcode
build-for-llvm-top.sh
configure Regenerate. 2007-10-03 12:07:14 +00:00
CREDITS.TXT Adding myself 2007-10-11 18:54:49 +00:00
LICENSE.TXT
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in Providing --with-ocaml-libdir for ./configure. The default is the 2007-10-02 16:42:10 +00:00
Makefile.rules
ModuleInfo.txt
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.