LLVM backend for 6502
Go to file
Chris Lattner cd81639d2e Fix a deficiency in the spiller that Evan noticed. In particular, consider
this code:

  store [stack slot #0],  R10
    = add R14, [stack slot #0]

The spiller didn't know that the store made the value of [stackslot#0] available
in R10 *IF* the store came from a copy instruction with the store folded into it.

This patch teaches VirtRegMap to look at these stores and recognize the values
they make available.  In one case Evan provided, this code:

        divsd %XMM0, %XMM1
        movsd %XMM1, QWORD PTR [%ESP + 40]
1)      movsd QWORD PTR [%ESP + 48], %XMM1
2)      movsd %XMM1, QWORD PTR [%ESP + 48]
        addsd %XMM1, %XMM0
3)      movsd QWORD PTR [%ESP + 48], %XMM1
        movsd QWORD PTR [%ESP + 4], %XMM0

turns into:

        divsd %XMM0, %XMM1
        movsd %XMM1, QWORD PTR [%ESP + 40]
        addsd %XMM1, %XMM0
3)      movsd QWORD PTR [%ESP + 48], %XMM1
        movsd QWORD PTR [%ESP + 4], %XMM0

In this case, instruction #2 was removed because of the value made
available by #1, and inst #1 was later deleted because it is now
never used before the stack slot is redefined by #3.

This occurs here and there in a lot of code with high spilling, on PPC
most of the removed loads/stores are LSU-reject-causing loads, which is
nice.

On X86, things are much better (because it spills more), where we nuke
about 1% of the instructions from SMG2000 and several hundred from eon.

More improvements to come...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25917 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-02 23:29:36 +00:00
autoconf don't need this any more; the "#define hashes to trees" hack is coming 2006-01-23 06:47:56 +00:00
docs Remove FAKE_SOURCES 2006-01-27 22:06:01 +00:00
examples When a function takes a variable number of pointer arguments, with a zero 2005-10-23 04:37:20 +00:00
include/llvm Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo, 2006-02-02 20:11:55 +00:00
lib Fix a deficiency in the spiller that Evan noticed. In particular, consider 2006-02-02 23:29:36 +00:00
projects Fixed Makefile so it does, indeed, build a dynamic library. 2006-01-06 22:51:19 +00:00
runtime fix make install/uninstall of libcrtend. 2006-01-30 02:03:56 +00:00
test new testcase 2006-02-02 06:35:38 +00:00
tools Pass plugins on to children when optimizing. 2006-01-26 18:37:21 +00:00
utils add a note, ya knoe 2006-02-01 19:12:23 +00:00
win32 Add _CRT_SECURE_NO_DEPRECATE preprocessor symbol to make VS2005 happy. 2006-01-30 04:07:08 +00:00
Xcode Catch up on some of the file addition/deletions. 2006-01-27 13:24:20 +00:00
.cvsignore Ignore the configure.out file generated by "make reconfigure" 2005-06-18 23:01:25 +00:00
configure Update for including additional function tests. 2006-01-23 08:15:53 +00:00
CREDITS.TXT Add an entry 2006-01-08 08:25:38 +00:00
LICENSE.TXT Happy New Year, LLVM. 2006-01-03 14:42:06 +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 For PR614: 2005-08-25 04:59:49 +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 Implement fix for PR471: 2005-12-21 03:31:53 +00:00
Makefile.rules * Eliminate FAKE_SOURCES 2006-01-27 22:13:12 +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.