LLVM backend for 6502
Go to file
Chris Lattner 87875dac89 Turn select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y))). This occurs in
the 'sim' program and probably elsewhere.  In sim, it comes up for cases
like this:

#define round(x) ((x)>0.0 ? (x)+0.5 : (x)-0.5)
double G;
void T(double X) { G = round(X); }

(it uses the round macro a lot).  This changes the LLVM code from:

        %tmp.1 = setgt double %X, 0.000000e+00          ; <bool> [#uses=1]
        %tmp.4 = add double %X, 5.000000e-01            ; <double> [#uses=1]
        %tmp.6 = sub double %X, 5.000000e-01            ; <double> [#uses=1]
        %mem_tmp.0 = select bool %tmp.1, double %tmp.4, double %tmp.6
        store double %mem_tmp.0, double* %G

to:

        %tmp.1 = setgt double %X, 0.000000e+00          ; <bool> [#uses=1]
        %mem_tmp.0.p = select bool %tmp.1, double 5.000000e-01, double -5.000000e-01
        %mem_tmp.0 = add double %mem_tmp.0.p, %X
        store double %mem_tmp.0, double* %G
        ret void


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19537 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 22:52:24 +00:00
autoconf The Java project now lives under projects/llvm-java. 2005-01-05 17:57:28 +00:00
docs Make the construction of doxygen documentation a repeatable process 2005-01-11 06:26:27 +00:00
examples Use LLVMLIBS=JIT to get JIT libraries 2004-11-29 07:17:18 +00:00
include/llvm Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode. 2005-01-13 20:50:02 +00:00
lib Turn select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y))). This occurs in 2005-01-13 22:52:24 +00:00
projects Ignore autoconf/aclocal generated stuff. 2005-01-05 17:26:00 +00:00
runtime Turn on LOADABLE_MODULE so that profile.so can be loaded dynamically by 2005-01-13 16:53:05 +00:00
test The pattern isel is aggressively codegen'ing all of the loads in these 2005-01-11 03:05:03 +00:00
tools X86 BE requires SelectionDAG 2005-01-07 07:51:25 +00:00
utils Update the documentation about -enable-llcbeta vs. -enable-linscan 2005-01-13 18:02:40 +00:00
win32 Add new file to Visual Studio CodeGen project 2005-01-12 04:32:42 +00:00
.cvsignore Ignore the autom4te.cache directoy. 2004-12-24 15:11:23 +00:00
configure The Java project now lives under projects/llvm-java. 2005-01-05 17:57:28 +00:00
CREDITS.TXT Add MMC 2004-11-18 21:04:21 +00:00
LICENSE.TXT Another year, another copyright update. 2005-01-08 19:10:44 +00:00
llvm.spec
llvm.spec.in
Makefile Remove the check target. Its now in Makefile.rules 2004-12-06 05:35:00 +00:00
Makefile.common No really, this is LLVM! 2004-10-30 00:57:52 +00:00
Makefile.config.in For PR351: 2004-12-31 22:54:28 +00:00
Makefile.rules Implement the LOADABLE_MODULE option when building a shared library. This 2005-01-11 04:31:07 +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.