llvm-6502/include/llvm/CodeGen
Chris Lattner 01d029b82c One mundane change: Change ReplaceAllUsesOfValueWith to *optionally*
take a deleted nodes vector, instead of requiring it.

One more significant change:  Implement the start of a legalizer that
just works on types.  This legalizer is designed to run before the 
operation legalizer and ensure just that the input dag is transformed
into an output dag whose operand and result types are all legal, even
if the operations on those types are not.

This design/impl has the following advantages:

1. When finished, this will *significantly* reduce the amount of code in
   LegalizeDAG.cpp.  It will remove all the code related to promotion and
   expansion as well as splitting and scalarizing vectors.
2. The new code is very simple, idiomatic, and modular: unlike 
   LegalizeDAG.cpp, it has no 3000 line long functions. :)
3. The implementation is completely iterative instead of recursive, good
   for hacking on large dags without blowing out your stack.
4. The implementation updates nodes in place when possible instead of 
   deallocating and reallocating the entire graph that points to some 
   mutated node.
5. The code nicely separates out handling of operations with invalid 
   results from operations with invalid operands, making some cases
   simpler and easier to understand.
6. The new -debug-only=legalize-types option is very very handy :), 
   allowing you to easily understand what legalize types is doing.

This is not yet done.  Until the ifdef added to SelectionDAGISel.cpp is
enabled, this does nothing.  However, this code is sufficient to legalize
all of the code in 186.crafty, olden and freebench on an x86 machine.  The
biggest issues are:

1. Vectors aren't implemented at all yet
2. SoftFP is a mess, I need to talk to Evan about it.
3. No lowering to libcalls is implemented yet.
4. Various operations are missing etc.
5. There are FIXME's for stuff I hax0r'd out, like softfp.

Hey, at least it is a step in the right direction :).  If you'd like to help,
just enable the #ifdef in SelectionDAGISel.cpp and compile code with it.  If
this explodes it will tell you what needs to be implemented.  Help is 
certainly appreciated.

Once this goes in, we can do three things:

1. Add a new pass of dag combine between the "type legalizer" and "operation
   legalizer" passes.  This will let us catch some long-standing isel issues
   that we miss because operation legalization often obfuscates the dag with
   target-specific nodes.
2. We can rip out all of the type legalization code from LegalizeDAG.cpp,
   making it much smaller and simpler.  When that happens we can then 
   reimplement the core functionality left in it in a much more efficient and
   non-recursive way.
3. Once the whole legalizer is non-recursive, we can implement whole-function
   selectiondags maybe...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42981 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-15 06:10:22 +00:00
..
AsmPrinter.h Revert 42908 for now. 2007-10-14 05:57:21 +00:00
CallingConvLower.h propagate struct size and alignment of byval arguments to the DAG 2007-08-10 14:44:42 +00:00
Collector.h Collector is the base class for garbage collection code generators. 2007-09-29 02:13:43 +00:00
CollectorMetadata.h CollectorMetadata abstractly describes stack maps for a function. 2007-09-27 22:18:46 +00:00
Collectors.h My previous Registry.h header, as well as Collectors.h, which is the 2007-09-27 19:34:27 +00:00
DwarfWriter.h
ELFRelocation.h
FileWriters.h
IntrinsicLowering.h
LinkAllCodegenComponents.h Remove simple scheduler. 2007-10-01 20:44:07 +00:00
LiveInterval.h When coalescing an EXTRACT_SUBREG and the dst register is a physical register, 2007-10-14 10:08:34 +00:00
LiveIntervalAnalysis.h EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like 2007-10-12 08:50:34 +00:00
LiveVariables.h Remove isReg, isImm, and isMBB, and change all their users to use 2007-09-14 20:33:02 +00:00
MachineBasicBlock.h
MachineCodeEmitter.h
MachineConstantPool.h Add explicit keywords and remove spurious trailing semicolons. 2007-08-27 14:50:10 +00:00
MachineFrameInfo.h
MachineFunction.h Add explicit keywords and remove spurious trailing semicolons. 2007-08-27 14:50:10 +00:00
MachineFunctionPass.h
MachineInstr.h Optionally create a MachineInstr without default implicit operands. 2007-10-13 02:23:01 +00:00
MachineInstrBuilder.h
MachineJumpTableInfo.h
MachineLocation.h
MachineModuleInfo.h explicit keywords. 2007-09-24 15:48:49 +00:00
MachinePassRegistry.h
MachineRelocation.h
MachORelocation.h
Passes.h Pluggable coalescers inplementation. 2007-09-06 16:18:45 +00:00
RegAllocRegistry.h
RegisterCoalescer.h Cosmetic. 2007-10-12 08:40:44 +00:00
RegisterScavenging.h Add explicit keywords and remove spurious trailing semicolons. 2007-08-27 14:50:10 +00:00
RuntimeLibcalls.h Add runtime library names for pow. 2007-10-11 23:09:10 +00:00
SchedGraphCommon.h
ScheduleDAG.h If a node that defines a physical register that is expensive to copy. The 2007-10-05 01:39:18 +00:00
SchedulerRegistry.h
SelectionDAG.h One mundane change: Change ReplaceAllUsesOfValueWith to *optionally* 2007-10-15 06:10:22 +00:00
SelectionDAGISel.h If the source and destination pointers in an llvm.memmove are known 2007-08-27 16:26:13 +00:00
SelectionDAGNodes.h remove dead enum, make setNodeId public. 2007-10-15 05:30:55 +00:00
SimpleRegisterCoalescing.h EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like 2007-10-12 08:50:34 +00:00
SSARegMap.h EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like 2007-10-12 08:50:34 +00:00
ValueTypes.h Add MVT::fAny for overloading intrinsics on floating-point types. 2007-08-16 21:57:19 +00:00
ValueTypes.td Add MVT::fAny for overloading intrinsics on floating-point types. 2007-08-16 21:57:19 +00:00