llvm-6502/lib/Target
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
..
CBackend SPECIFY a target data to initialize the CBE target with. Until now we have 2004-03-03 02:14:15 +00:00
PowerPC fine grainify namespacification 2004-02-28 19:53:18 +00:00
Sparc Support return values of basic integer types. 2004-03-06 05:32:28 +00:00
SparcV8 Support return values of basic integer types. 2004-03-06 05:32:28 +00:00
SparcV9 make -print-machineinstrs work for both SparcV9 and X86 2004-03-04 19:16:23 +00:00
X86 Implement folding explicit load instructions into binary operations. For a 2004-03-08 01:58:35 +00:00
Makefile SparcV8 now builds. 2004-02-28 19:54:00 +00:00
MRegisterInfo.cpp Put all LLVM code into the llvm namespace, as per bug 109. 2003-11-11 22:41:34 +00:00
Target.td Expose the "Other" value type to tablegen targets 2004-02-11 03:08:45 +00:00
TargetData.cpp Use a map instead of annotations 2004-02-26 08:02:17 +00:00
TargetInstrInfo.cpp Adjust to change in TII ctor arguments 2004-02-29 06:31:44 +00:00
TargetMachine.cpp make -print-machineinstrs work for both SparcV9 and X86 2004-03-04 19:16:23 +00:00
TargetSchedInfo.cpp Eliminate the distinction between "real" and "unreal" instructions 2004-02-29 06:31:16 +00:00