LLVM backend for 6502
Go to file
Chris Lattner 0d7d99fd44 1. Refactored handling of integer immediate values for add, or, xor and sub.
New routine: ISel::SelectIntImmediateExpr
  2. Now checking use counts of large constants.  If use count is > 2 then drop
  thru so that the constant gets loaded into a register.
  Source:

int %test1(int %a) {
entry:
       %tmp.1 = add int %a,      123456789      ; <int> [#uses=1]
       %tmp.2 = or  int %tmp.1,  123456789      ; <int> [#uses=1]
       %tmp.3 = xor int %tmp.2,  123456789      ; <int> [#uses=1]
       %tmp.4 = sub int %tmp.3, -123456789      ; <int> [#uses=1]
       ret int %tmp.4
}

Did Emit:

       .machine ppc970


       .text
       .align  2
       .globl  _test1
_test1:
.LBB_test1_0:   ; entry
       addi r2, r3, -13035
       addis r2, r2, 1884
       ori r2, r2, 52501
       oris r2, r2, 1883
       xori r2, r2, 52501
       xoris r2, r2, 1883
       addi r2, r2, 52501
       addis r3, r2, 1883
       blr


Now Emits:

       .machine ppc970


       .text
       .align  2
       .globl  _test1
_test1:
.LBB_test1_0:   ; entry
       lis r2, 1883
       ori r2, r2, 52501
       add r3, r3, r2
       or r3, r3, r2
       xor r3, r3, r2
       add r3, r3, r2
       blr

Patch by Jim Laskey!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22749 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-10 16:34:52 +00:00
autoconf Fix PR608: 2005-07-27 21:58:38 +00:00
docs Update a doc, patch contributed by Jim Laskey! 2005-08-02 19:14:25 +00:00
examples Eliminate all remaining tabs and trailing spaces. 2005-07-27 06:12:32 +00:00
include/llvm add two helper methods 2005-08-09 23:36:18 +00:00
lib 1. Refactored handling of integer immediate values for add, or, xor and sub. 2005-08-10 16:34:52 +00:00
projects oops 2005-07-05 16:36:18 +00:00
runtime Remove trailing whitespace 2005-04-21 23:48:37 +00:00
test New testcase 2005-08-10 02:06:35 +00:00
tools If the user interrupts bugpoint, don't extract loops 2005-08-02 23:25:56 +00:00
utils make is the standard name, not gmake 2005-08-02 00:10:52 +00:00
win32 Fix VC++ build problems. 2005-07-30 18:22:27 +00:00
.cvsignore Ignore the configure.out file generated by "make reconfigure" 2005-06-18 23:01:25 +00:00
configure Fix PR608: 2005-07-27 21:58:38 +00:00
CREDITS.TXT Add a note, people are responsible for requesting that they be added to the 2005-08-02 22:10:21 +00:00
LICENSE.TXT Remove extraneous colons after program names for consistency 2005-05-12 21:39:01 +00:00
llvm.spec Onward to LLVM-1.6 and beyond! 2005-05-18 20:23:20 +00:00
llvm.spec.in Onward to LLVM-1.6 and beyond! 2005-05-18 20:23:20 +00:00
Makefile Make sure the tools get built if no build target is specified. 2005-05-29 00:49:24 +00:00
Makefile.common
Makefile.config.in Two changes: 2005-04-22 17:14:14 +00:00
Makefile.rules No, really, it's an Alpha! And you probably thought it was a PowerPC. 2005-07-22 22:43:40 +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.