llvm-6502/lib/CodeGen/SelectionDAG
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
..
DAGCombiner.cpp Fold (select C, load A, load B) -> load (select C, A, B). This happens quite 2005-10-18 06:04:22 +00:00
LegalizeDAG.cpp Legalize BUILD_PAIR appropriately for upcoming 64 bit PowerPC work. 2005-10-18 00:27:41 +00:00
Makefile
ScheduleDAG.cpp Inhibit instructions from being pushed before function calls. This will 2005-10-13 16:44:00 +00:00
SelectionDAG.cpp Move some Legalize functionality over to the DAGCombiner where it belongs. 2005-10-13 03:11:28 +00:00
SelectionDAGISel.cpp Enable Nate's excellent DAG combiner work by default. This allows the 2005-10-10 16:47:10 +00:00
SelectionDAGPrinter.cpp add a method 2005-10-01 00:17:07 +00:00
TargetLowering.cpp initialize new flag 2005-09-27 22:13:56 +00:00