LLVM backend for 6502
Go to file
Chris Lattner 68dc310942 Implement a couple of more simplifications. This lets us codegen:
int test2(int * P, int* Q, int A, int B) {
        return P+A == P;
}

into:

test2:
        movl 4(%esp), %eax
        movl 12(%esp), %eax
        shll $2, %eax
        cmpl $0, %eax
        sete %al
        movzbl %al, %eax
        ret

instead of:

test2:
        movl 4(%esp), %eax
        movl 12(%esp), %ecx
        leal (%eax,%ecx,4), %ecx
        cmpl %eax, %ecx
        sete %al
        movzbl %al, %eax
        ret

ICC is producing worse code:

test2:
        movl      4(%esp), %eax                                 #8.5
        movl      12(%esp), %edx                                #8.5
        lea       (%edx,%edx), %ecx                             #9.9
        addl      %ecx, %ecx                                    #9.9
        addl      %eax, %ecx                                    #9.9
        cmpl      %eax, %ecx                                    #9.16
        movl      $0, %eax                                      #9.16
        sete      %al                                           #9.16
        ret                                                     #9.16

as is GCC (looks like our old code):

test2:
        movl    4(%esp), %edx
        movl    12(%esp), %eax
        leal    (%edx,%eax,4), %ecx
        cmpl    %edx, %ecx
        sete    %al
        movzbl  %al, %eax
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19430 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 02:03:02 +00:00
autoconf The Java project now lives under projects/llvm-java. 2005-01-05 17:57:28 +00:00
docs Eliminate empty sub-list 2005-01-08 01:11:15 +00:00
examples
include/llvm Add last four createXxxPass functions 2005-01-09 20:42:52 +00:00
lib Implement a couple of more simplifications. This lets us codegen: 2005-01-10 02:03:02 +00:00
projects Ignore autoconf/aclocal generated stuff. 2005-01-05 17:26:00 +00:00
runtime
test Test fails on all platforms, not just linux 2005-01-08 23:44:03 +00:00
tools X86 BE requires SelectionDAG 2005-01-07 07:51:25 +00:00
utils rename linscan -> LLCBETA as it should be 2005-01-08 21:03:58 +00:00
win32 Update System project in Visual Studio to reflect renamed files. 2005-01-10 00:50:11 +00:00
.cvsignore
configure The Java project now lives under projects/llvm-java. 2005-01-05 17:57:28 +00:00
CREDITS.TXT
LICENSE.TXT Another year, another copyright update. 2005-01-08 19:10:44 +00:00
llvm.spec
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in
Makefile.rules X86 JIT requires the selection dag library. 2005-01-07 07:51:11 +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.