llvm-6502/lib/Target/SparcV8
Chris Lattner dea9528f7f When lowering SELECT_CC, see if the input is a lowered SETCC. If so, fold
the two operations together.  This allows us to compile this:

void %two(int %a, int* %b) {
        %tmp.2 = seteq int %a, 0
        %tmp.0.0 = select bool %tmp.2, int 10, int 20
        store int %tmp.0.0, int* %b
        ret void
}

into:

two:
        save -96, %o6, %o6
        or %g0, 20, %l0
        or %g0, 10, %l1
        subcc %i0, 0, %l2
        be .LBBtwo_2    ! entry
        nop
.LBBtwo_1:      ! entry
        or %g0, %l0, %l1
.LBBtwo_2:      ! entry
        st %l1, [%i1]
        restore %g0, %g0, %g0
        retl
        nop

instead of:

two:
        save -96, %o6, %o6
        sethi 0, %l0
        or %g0, 1, %l1
        or %g0, 20, %l2
        or %g0, 10, %l3
        subcc %i0, 0, %l4
        be .LBBtwo_2    ! entry
        nop
.LBBtwo_1:      ! entry
        or %g0, %l0, %l1
.LBBtwo_2:      ! entry
        subcc %l1, 0, %l0
        bne .LBBtwo_4   ! entry
        nop
.LBBtwo_3:      ! entry
        or %g0, %l2, %l3
.LBBtwo_4:      ! entry
        st %l3, [%i1]
        restore %g0, %g0, %g0
        retl
        nop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25806 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-30 04:34:44 +00:00
..
.cvsignore
DelaySlotFiller.cpp
FPMover.cpp Add explicit #includes of <iostream> 2006-01-22 23:41:00 +00:00
Makefile Add trivial subtarget support 2006-01-26 06:51:21 +00:00
README.txt not a good idea 2005-12-23 07:37:47 +00:00
SparcV8.h remove the V8 simple isel 2006-01-23 07:20:15 +00:00
SparcV8.td Subtarget feature can now set any variable to any value 2006-01-27 08:09:42 +00:00
SparcV8AsmPrinter.cpp Add explicit #includes of <iostream> 2006-01-22 23:41:00 +00:00
SparcV8InstrFormats.td Push ops list, asm string, and pattern all the way up to InstV8. Move the 2005-12-18 08:21:00 +00:00
SparcV8InstrInfo.cpp Tighten up some checks 2005-12-18 06:40:34 +00:00
SparcV8InstrInfo.h
SparcV8InstrInfo.td Use V8ISD::CALL instead of ISD::CALL 2006-01-27 23:30:03 +00:00
SparcV8ISelDAGToDAG.cpp When lowering SELECT_CC, see if the input is a lowered SETCC. If so, fold 2006-01-30 04:34:44 +00:00
SparcV8RegisterInfo.cpp New DAG node properties SNDPInFlag, SNDPOutFlag, and SNDPOptInFlag to replace 2006-01-09 18:28:21 +00:00
SparcV8RegisterInfo.h
SparcV8RegisterInfo.td Reserve G1 for frame offset stuff and use it to handle large stack frames. 2005-12-20 07:56:31 +00:00
SparcV8Subtarget.cpp initialize member vars 2006-01-27 22:38:36 +00:00
SparcV8Subtarget.h Rest of subtarget support, remove references to ppc 2006-01-26 07:22:22 +00:00
SparcV8TargetMachine.cpp Add trivial subtarget support 2006-01-26 06:51:21 +00:00
SparcV8TargetMachine.h Add trivial subtarget support 2006-01-26 06:51:21 +00:00

Meta TODO list:
1. Create a new DAG -> DAG instruction selector, by adding patterns to the
   instructions.
2. ???
3. profit!

To-do
-----

* Keep the address of the constant pool in a register instead of forming its
  address all of the time.
* We can fold small constant offsets into the %hi/%lo references to constant
  pool addresses as well.