llvm-6502/lib/CodeGen/SelectionDAG
Chris Lattner 82e14db9a9 Add a hack to avoid some horrible code in some cases by always emitting
token chains first.  For this C function:

int test() {
  int i;
  for (i = 0; i < 100000; ++i)
    foo();
}

Instead of emitting this (condition before call)

.LBB_test_1:    ; no_exit
        addi r30, r30, 1
        lis r2, 1
        ori r2, r2, 34464
        cmpw cr2, r30, r2
        bl L_foo$stub
        bne cr2, .LBB_test_1    ; no_exit

Emit this:

.LBB_test_1:    ; no_exit
        bl L_foo$stub
        addi r30, r30, 1
        lis r2, 1
        ori r2, r2, 34464
        cmpw cr0, r30, r2
        bne cr0, .LBB_test_1    ; no_exit

Which makes it so we don't have to save/restore cr2 in the prolog/epilog of
the function.

This also makes the code much more similar to what the pattern isel produces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23135 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-29 23:21:29 +00:00
..
LegalizeDAG.cpp Some of us cared about the the promote path 2005-08-29 20:46:51 +00:00
Makefile Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
ScheduleDAG.cpp Add a hack to avoid some horrible code in some cases by always emitting 2005-08-29 23:21:29 +00:00
SelectionDAG.cpp Add a new API for Nate 2005-08-29 21:59:31 +00:00
SelectionDAGISel.cpp Disable this code, which broke many tests last night 2005-08-27 16:16:51 +00:00
SelectionDAGPrinter.cpp Change ConstantPoolSDNode to actually hold the Constant itself instead of 2005-08-26 17:15:30 +00:00
TargetLowering.cpp Change the names of member variables per Chris' instructions, and document 2005-08-27 19:09:02 +00:00