llvm-6502/lib/CodeGen
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
..
SelectionDAG Add a hack to avoid some horrible code in some cases by always emitting 2005-08-29 23:21:29 +00:00
AsmPrinter.cpp Culling out use of unions for converting FP to bits and vice versa. 2005-08-17 19:34:49 +00:00
BranchFolding.cpp
ELFWriter.cpp Fix VC++ constant truncation warning. 2005-08-19 16:19:21 +00:00
IntrinsicLowering.cpp
LiveInterval.cpp
LiveInterval.h
LiveIntervalAnalysis.cpp Simplify this code by using higher-level LiveVariables methods 2005-08-23 22:51:41 +00:00
LiveIntervalAnalysis.h
LiveVariables.cpp Implement LiveVariables.h change 2005-08-24 00:09:33 +00:00
MachineBasicBlock.cpp
MachineCodeEmitter.cpp
MachineFunction.cpp
MachineInstr.cpp
Makefile
Passes.cpp
PHIElimination.cpp adjust to new live variables interface 2005-08-23 23:42:17 +00:00
PhysRegTracker.h
PrologEpilogInserter.cpp Fix a bug in my previous patch that was using the wrong iterator. This fixes 2005-08-29 00:10:46 +00:00
RegAllocIterativeScan.cpp
RegAllocLinearScan.cpp Keep track of which registers are related to which other registers. 2005-08-23 22:27:31 +00:00
RegAllocLocal.cpp adjust to new live variables interface 2005-08-23 23:42:17 +00:00
RegAllocSimple.cpp
TwoAddressInstructionPass.cpp
UnreachableBlockElim.cpp
VirtRegMap.cpp
VirtRegMap.h