llvm/lib
Chris Lattner 7dee5daf85 Implement folding explicit load instructions into binary operations. For a
testcase like this:

int %test(int* %P, int %A) {
        %Pv = load int* %P
        %B = add int %A, %Pv
        ret int %B
}

We now generate:
test:
        mov %ECX, DWORD PTR [%ESP + 4]
        mov %EAX, DWORD PTR [%ESP + 8]
        add %EAX, DWORD PTR [%ECX]
        ret

Instead of:
test:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %ECX, DWORD PTR [%ESP + 8]
        mov %EAX, DWORD PTR [%EAX]
        add %EAX, %ECX
        ret

... saving one instruction, and often a register.  Note that there are a lot
of other instructions that could use this, but they aren't handled.  I'm not
really interested in adding them, but mul/div and all of the FP instructions
could be supported as well if someone wanted to add them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12204 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 01:58:35 +00:00
..
Analysis Fix a minor bug 2004-03-05 22:04:07 +00:00
Archive * finegrainify namespacification of ArchiveReader.cpp 2004-01-10 19:00:15 +00:00
AsmParser It turns out that the two dimensional vectors were causing big slowdowns 2004-02-09 21:03:38 +00:00
Bytecode Adjustments to support the new ConstantAggregateZero class 2004-02-15 05:55:15 +00:00
CodeGen As I wrote in the docs, simple is the default spiller :-) 2004-03-06 23:08:44 +00:00
Debugger "fix" a nasty race condition 2004-01-14 21:18:03 +00:00
ExecutionEngine remove obsolete comment 2004-02-26 07:59:22 +00:00
Linker Include Config/config.h for SHLIBEXT. 2004-02-23 22:42:51 +00:00
Support Hide variable from other functions. 2004-03-04 17:50:44 +00:00
Target Implement folding explicit load instructions into binary operations. For a 2004-03-08 01:58:35 +00:00
Transforms Implement ArgumentPromotion/aggregate-promote.ll 2004-03-08 01:04:36 +00:00
VMCore Doxygenify comments. 2004-03-02 00:22:19 +00:00
Makefile CBackend is no longer here 2004-02-13 23:29:37 +00:00