llvm-6502/lib/CodeGen
Chris Lattner abd2182875 Add a simple transformation. This allows us to compile one of the inner
loops in stepanov to this:

.LBB_Z5test0PdS__2:     # no_exit.1
        fldl data(,%eax,8)
        fldl 24(%esp)
        faddp %st(1)
        fstl 24(%esp)
        incl %eax
        cmpl $2000, %eax
        fstpl 16(%esp)
        #FP_REG_KILL
        jl .LBB_Z5test0PdS__2

instead of this:

.LBB_Z5test0PdS__2:     # no_exit.1
        fldl data(,%eax,8)
        fldl 24(%esp)
        faddp %st(1)
        fstl 24(%esp)
        incl %eax
        movl $data, %ecx
        movl %ecx, %edx
        addl $16000, %edx
        subl %ecx, %edx
        movl %edx, %ecx
        sarl $2, %ecx
        shrl $29, %ecx
        addl %ecx, %edx
        sarl $3, %edx
        cmpl %edx, %eax
        fstpl 16(%esp)
        #FP_REG_KILL
        jl .LBB_Z5test0PdS__2

The old instruction selector produced:

.LBB_Z5test0PdS__2:     # no_exit.1
        fldl 24(%esp)
        faddl data(,%eax,8)
        fstl 24(%esp)
        movl %eax, %ecx
        incl %ecx
        incl %eax
        leal data+16000, %edx
        movl $data, %edi
        subl %edi, %edx
        movl %edx, %edi
        sarl $2, %edi
        shrl $29, %edi
        addl %edi, %edx
        sarl $3, %edx
        cmpl %edx, %ecx
        fstpl 16(%esp)
        #FP_REG_KILL
        jl .LBB_Z5test0PdS__2   # no_exit.1

Which is even worse!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19419 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:09:57 +00:00
..
SelectionDAG Add a simple transformation. This allows us to compile one of the inner 2005-01-09 20:09:57 +00:00
AsmPrinter.cpp Silence VS warnings 2005-01-08 19:59:10 +00:00
BranchFolding.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
IntrinsicLowering.cpp Fix #includes of i*.h => Instructions.h as per PR403. 2004-07-29 17:30:56 +00:00
LiveInterval.cpp Prevent accessing past the end of the intervals vector, this fixes 2004-12-04 01:22:09 +00:00
LiveInterval.h Fix typeo 2004-11-18 04:31:10 +00:00
LiveIntervalAnalysis.cpp Silence warnings from VS 2005-01-08 19:55:00 +00:00
LiveIntervalAnalysis.h For PR387:\ 2004-12-07 04:03:45 +00:00
LiveVariables.cpp Do not use variable sized arrays in C++, they are non-portable. Patch 2004-10-25 18:44:14 +00:00
MachineBasicBlock.cpp Move method bodies that depend on <algorithm> from MBB.h to MBB.cpp 2004-10-26 15:43:42 +00:00
MachineCodeEmitter.cpp Fix the FIXME, nuke the JIT specific forceCompilationOf method. 2004-11-22 21:54:35 +00:00
MachineFunction.cpp Silence warnings from VS 2005-01-08 19:55:00 +00:00
MachineInstr.cpp Allow machine operands to represent global variables with offsets. This is 2004-10-15 04:38:41 +00:00
Makefile Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
Passes.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
PHIElimination.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
PhysRegTracker.h Improved PhysRegTracker interface. RegAlloc lazily allocates the register tracker using a std::auto_ptr 2004-02-23 06:10:13 +00:00
PrologEpilogInserter.cpp Put this change back in after testing from Reid proved its innocence. getSpillSize now returns value in bits 2004-08-29 22:00:24 +00:00
RegAllocIterativeScan.cpp Silence VS warnings 2005-01-08 19:53:50 +00:00
RegAllocLinearScan.cpp Silence VS warnings 2005-01-08 19:53:50 +00:00
RegAllocLocal.cpp Clean up the MachineBasicBlock.h file, percolating #includes into this file. 2004-10-26 15:35:58 +00:00
RegAllocSimple.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
TwoAddressInstructionPass.cpp Make the 2-address instruction lowering pass smarter in two ways: 2005-01-02 02:34:12 +00:00
UnreachableBlockElim.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
VirtRegMap.cpp Clean up the MachineBasicBlock.h file, percolating #includes into this file. 2004-10-26 15:35:58 +00:00
VirtRegMap.h When a virtual register is folded into an instruction, keep track of whether 2004-10-01 23:15:36 +00:00