llvm-6502/lib/CodeGen/SelectionDAG
Dan Gohman 2ba60e5930 Eliminate LegalizeOps' LegalizedNodes map and have it just call RAUW
on every node as it legalizes them. This makes it easier to use
hasOneUse() heuristics, since unneeded nodes can be removed from the
DAG earlier.

Make LegalizeOps visit the DAG in an operands-last order. It previously
used operands-first, because LegalizeTypes has to go operands-first, and
LegalizeTypes used to be part of LegalizeOps, but they're now split.
The operands-last order is more natural for several legalization tasks.
For example, it allows lowering code for nodes with floating-point or
vector constants to see those constants directly instead of seeing the
lowered form (often constant-pool loads). This makes some things
somewhat more complicated today, though it ought to allow things to be
simpler in the future. It also fixes some bugs exposed by Legalizing
using RAUW aggressively.

Remove the part of LegalizeOps that attempted to patch up invalid chain
operands on libcalls generated by LegalizeTypes, since it doesn't work
with the new LegalizeOps traversal order. Instead, define what
LegalizeTypes is doing to be correct, and transfer the responsibility
of keeping calls from having overlapping calling sequences into the
scheduler.

Teach the scheduler to model callseq_begin/end pairs as having a
physical register definition/use to prevent calls from having
overlapping calling sequences. This is also somewhat complicated, though
there are ways it might be simplified in the future.

This addresses rdar://9816668, rdar://10043614, rdar://8434668, and others.
Please direct high-level questions about this patch to management.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143177 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28 01:29:32 +00:00
..
CMakeLists.txt Really unbreak CMake build 2011-10-24 18:10:52 +00:00
DAGCombiner.cpp Don't crash on 128-bit sdiv by constant. Found by inspection. 2011-10-27 02:06:39 +00:00
FastISel.cpp Fix a thinko that Nick noticed. The previous code actually worked as 2011-10-12 15:56:56 +00:00
FunctionLoweringInfo.cpp
InstrEmitter.cpp
InstrEmitter.h
LegalizeDAG.cpp Eliminate LegalizeOps' LegalizedNodes map and have it just call RAUW 2011-10-28 01:29:32 +00:00
LegalizeFloatTypes.cpp
LegalizeIntegerTypes.cpp 1. Fix the widening of SETCC in WidenVecOp_SETCC. Use the correct return CC type. 2011-10-21 11:42:07 +00:00
LegalizeTypes.cpp Eliminate LegalizeOps' LegalizedNodes map and have it just call RAUW 2011-10-28 01:29:32 +00:00
LegalizeTypes.h 1. Fix the widening of SETCC in WidenVecOp_SETCC. Use the correct return CC type. 2011-10-21 11:42:07 +00:00
LegalizeTypesGeneric.cpp
LegalizeVectorOps.cpp Improve code generation for vselect on SSE2: 2011-10-19 20:43:16 +00:00
LegalizeVectorTypes.cpp Simplify SplitVecRes_UnaryOp by removing all the code that is 2011-10-26 14:11:18 +00:00
Makefile
ScheduleDAGFast.cpp
ScheduleDAGRRList.cpp Eliminate LegalizeOps' LegalizedNodes map and have it just call RAUW 2011-10-28 01:29:32 +00:00
ScheduleDAGSDNodes.cpp
ScheduleDAGSDNodes.h
SDNodeDbgValue.h
SDNodeOrdering.h
SelectionDAG.cpp Eliminate LegalizeOps' LegalizedNodes map and have it just call RAUW 2011-10-28 01:29:32 +00:00
SelectionDAGBuilder.cpp Don't use floating point to do an integer's job. 2011-10-26 01:47:48 +00:00
SelectionDAGBuilder.h Remove the old atomic instrinsics. autoupgrade functionality is included with this patch. 2011-10-06 23:20:49 +00:00
SelectionDAGISel.cpp Delete the Latency scheduling preference. 2011-10-24 17:56:48 +00:00
SelectionDAGPrinter.cpp
TargetLowering.cpp Change the default scheduler from Latency to ILP, since Latency 2011-10-24 17:45:02 +00:00
TargetSelectionDAGInfo.cpp