LLVM backend for 6502
Go to file
Chris Lattner ac011bce9e lower "X = seteq Y, Z" to '(shr (ctlz (xor Y, Z)), 5)' instead of
'(shr (ctlz (sub Y, Z)), 5)'.

The use of xor better exposes the operation to bit-twiddling logic in the
dag combiner.  For example, this:

typedef struct {
  unsigned prefix : 4;
  unsigned code : 4;
  unsigned unsigned_p : 4;
} tree_common;

int foo(tree_common *a, tree_common *b) {
  return a->code == b->code;
}

Now compiles to:

_foo:
        lwz r2, 0(r4)
        lwz r3, 0(r3)
        xor r2, r3, r2
        rlwinm r2, r2, 28, 28, 31
        cntlzw r2, r2
        srwi r3, r2, 5
        blr

instead of:

_foo:
        lbz r2, 3(r4)
        lbz r3, 3(r3)
        srwi r2, r2, 4
        srwi r3, r3, 4
        subf r2, r2, r3
        cntlzw r2, r2
        srwi r3, r2, 5
        blr

saving a cycle.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31725 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 05:28:08 +00:00
autoconf Bumping version number 2006-11-07 05:31:00 +00:00
docs Add a link to the GEP FAQ. 2006-11-13 08:03:59 +00:00
examples For PR950: 2006-10-20 07:07:24 +00:00
include/llvm A shim over other AA impls to catch incorrect uses 2006-11-14 05:21:04 +00:00
lib lower "X = seteq Y, Z" to '(shr (ctlz (xor Y, Z)), 5)' instead of 2006-11-14 05:28:08 +00:00
projects For PR950: 2006-11-08 06:47:33 +00:00
runtime Remove unused variable. 2006-11-03 01:58:30 +00:00
test Discard code that supported old bytecode formats. This makes the Bytecode 2006-11-14 04:47:22 +00:00
tools Minor style fixes from review. 2006-11-11 19:59:25 +00:00
utils Add some output so the user is informed while they wait. 2006-11-13 16:08:51 +00:00
win32 Remove obsolete VS project. 2006-11-05 19:38:20 +00:00
Xcode Try again. 2006-11-05 21:21:20 +00:00
.cvsignore Add llvm.spec, a generated file. 2006-10-18 19:23:56 +00:00
configure Updating configure script for 2.0 2006-11-14 00:59:52 +00:00
CREDITS.TXT The list is sorted by name. 2006-08-29 01:42:47 +00:00
LICENSE.TXT burg is gone 2006-09-11 17:28:11 +00:00
llvm.spec.in Minor technical correction in documentation. 2006-08-21 01:58:57 +00:00
Makefile Document build order dependencies. Make sure that llvm-config is built before 2006-09-04 04:27:07 +00:00
Makefile.common Update comments to reflect new variable names. Patch contributed by 2005-02-14 16:02:19 +00:00
Makefile.config.in Get LLVMGCCARCH right regardless of the llvm-gcc version being used. 2006-11-05 20:10:16 +00:00
Makefile.rules Allow ENABLE_OPTIMIZED=0 to turn off optimization (turn on debug). 2006-11-11 00:00:31 +00:00
README.txt Make the text of this file a little more useful. 2004-09-02 22:49:27 +00:00

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.