llvm-6502/lib/CodeGen
Chris Lattner 40c62d5069 Fold (select C, load A, load B) -> load (select C, A, B). This happens quite
a lot throughout many programs.  In particular, specfp triggers it a bunch for
constant FP nodes when you have code like  cond ? 1.0 : -1.0.

If the PPC ISel exposed the loads implicit in pic references to external globals,
we would be able to eliminate a load in cases like this as well:

%X = external global int
%Y = external global int
int* %test4(bool %C) {
        %G = select bool %C, int* %X, int* %Y
        ret int* %G
}

Note that this breaks things that use SrcValue's (see the fixme), but since nothing
uses them yet, this is ok.

Also, simplify some code to use hasOneUse() on an SDOperand instead of hasNUsesOfValue directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23781 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-18 06:04:22 +00:00
..
SelectionDAG Fold (select C, load A, load B) -> load (select C, A, B). This happens quite 2005-10-18 06:04:22 +00:00
AsmPrinter.cpp
BranchFolding.cpp
ELFWriter.cpp
IntrinsicLowering.cpp
LiveInterval.cpp Expose the LiveInterval interfaces as public headers. 2005-09-21 04:19:09 +00:00
LiveIntervalAnalysis.cpp Expose the LiveInterval interfaces as public headers. 2005-09-21 04:19:09 +00:00
LiveVariables.cpp Implement LiveVariables.h change 2005-08-24 00:09:33 +00:00
MachineBasicBlock.cpp
MachineCodeEmitter.cpp
MachineFunction.cpp Added graphviz/gv support for MF. 2005-10-12 12:09:05 +00:00
MachineInstr.cpp
Makefile
Passes.cpp
PHIElimination.cpp clean up this code a bit, no functionality change 2005-10-03 07:22:07 +00:00
PhysRegTracker.h
PrologEpilogInserter.cpp now that we have a reg class to spill with, get this info from the regclass 2005-09-30 17:19:22 +00:00
RegAllocIterativeScan.cpp Expose the LiveInterval interfaces as public headers. 2005-09-21 04:19:09 +00:00
RegAllocLinearScan.cpp Expose the LiveInterval interfaces as public headers. 2005-09-21 04:19:09 +00:00
RegAllocLocal.cpp Change this code ot pass register classes into the stack slot spiller/reloader 2005-09-30 01:29:00 +00:00
RegAllocSimple.cpp Change this code ot pass register classes into the stack slot spiller/reloader 2005-09-30 01:29:00 +00:00
TwoAddressInstructionPass.cpp
UnreachableBlockElim.cpp
VirtRegMap.cpp Fix the LLC regressions on X86 last night. In particular, when undoing 2005-10-06 17:19:06 +00:00
VirtRegMap.h