llvm-project/llvm
Nate Begeman c5b6bd9a8e Fold constant adds into loads and stores to frame indices.
For the following code:
double %ext(int %A.0__, long %A.1__) {
        %A_addr = alloca %typedef.DComplex              ; <%typedef.DComplex*> [#uses=2]
        %tmp.1 = cast %typedef.DComplex* %A_addr to int*                ; <int*> [#uses=1]
        store int %A.0__, int* %tmp.1
        %tmp.2 = getelementptr %typedef.DComplex* %A_addr, int 0, uint 1                ; <double*> [#uses=2]
        %tmp.3 = cast double* %tmp.2 to long*           ; <long*> [#uses=1]
        store long %A.1__, long* %tmp.3
        %tmp.5 = load double* %tmp.2            ; <double> [#uses=1]
        ret double %tmp.5
}

We now generate:
_ext:
.LBB_ext_0:     ;
        stw r3, -12(r1)
        stw r4, -8(r1)
        stw r5, -4(r1)
        lfd f1, -8(r1)
        blr

Instead of:
_ext:
.LBB_ext_0:     ;
        stw r3, -12(r1)
        addi r2, r1, -12
        stw r4, 4(r2)
        stw r5, 8(r2)
        lfd f1, 4(r2)
        blr

This also fires hundreds of times on MultiSource.

llvm-svn: 22533
2005-07-28 03:02:05 +00:00
..
autoconf Fix PR608: 2005-07-27 21:58:38 +00:00
docs llvm.sqrt somehow escaped documentation. 2005-07-21 01:29:16 +00:00
examples Eliminate all remaining tabs and trailing spaces. 2005-07-27 06:12:32 +00:00
include/llvm Please do not reintroduce tabs. 2005-07-28 02:04:44 +00:00
lib Fold constant adds into loads and stores to frame indices. 2005-07-28 03:02:05 +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 Testcase for PR607 2005-07-26 22:08:53 +00:00
tools Make the verifier pass run (in debug mode) in llc. This adds a sanity check 2005-07-28 02:25:30 +00:00
utils Eliminate all remaining tabs and trailing spaces. 2005-07-27 06:12:32 +00:00
win32 Win32 support for Mutex class. 2005-07-13 02:15:18 +00:00
.cvsignore Ignore the configure.out file generated by "make reconfigure" 2005-06-18 23:01:25 +00:00
CREDITS.TXT Improve statement 2005-05-15 21:38:32 +00:00
LICENSE.TXT Remove extraneous colons after program names for consistency 2005-05-12 21:39:01 +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 Update comments to reflect new variable names. Patch contributed by 2005-02-14 16:02:19 +00:00
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 Make the text of this file a little more useful. 2004-09-02 22:49:27 +00:00
configure Fix PR608: 2005-07-27 21:58:38 +00:00
llvm.spec Onward to LLVM-1.6 and beyond! 2005-05-18 20:23:20 +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.