1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/utils/TableGen
Chris Lattner 452ebc199e 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...

llvm-svn: 42981
2007-10-15 06:10:22 +00:00
..
AsmWriterEmitter.cpp Work around a bogus gcc 4.2 warning. 2007-07-18 04:51:57 +00:00
AsmWriterEmitter.h
CallingConvEmitter.cpp propagate struct size and alignment of byval arguments to the DAG 2007-08-10 14:44:42 +00:00
CallingConvEmitter.h More explicit keywords. 2007-07-30 14:51:59 +00:00
CodeEmitterGen.cpp Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350 2007-07-26 07:48:21 +00:00
CodeEmitterGen.h
CodeGenInstruction.h No need for noResults anymore. 2007-07-20 00:21:23 +00:00
CodeGenIntrinsics.h This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future. 2007-08-04 01:51:18 +00:00
CodeGenRegisters.h Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value 2007-09-19 01:35:01 +00:00
CodeGenTarget.cpp Add sqrt and powi intrinsics for long double. 2007-09-28 01:08:20 +00:00
CodeGenTarget.h Eliminate an unused parameter. 2007-07-13 20:16:50 +00:00
DAGISelEmitter.cpp One mundane change: Change ReplaceAllUsesOfValueWith to *optionally* 2007-10-15 06:10:22 +00:00
DAGISelEmitter.h Initial support for multi-result patterns: 2007-09-12 23:30:14 +00:00
FileLexer.cpp.cvs regenerate 2007-09-17 17:40:48 +00:00
FileLexer.l Added \!con(a,b) syntax to concatnate two dag fragments. 2007-05-15 01:23:24 +00:00
FileLexer.l.cvs Added \!con(a,b) syntax to concatnate two dag fragments. 2007-05-15 01:23:24 +00:00
FileParser.cpp.cvs regenerate 2007-09-17 17:40:48 +00:00
FileParser.h.cvs regenerate 2007-09-17 17:40:48 +00:00
FileParser.y Added \!con(a,b) syntax to concatnate two dag fragments. 2007-05-15 01:23:24 +00:00
FileParser.y.cvs Added \!con(a,b) syntax to concatnate two dag fragments. 2007-05-15 01:23:24 +00:00
InstrInfoEmitter.cpp Added TargetInstrDescriptor::numDefs - num of results. 2007-08-02 00:20:17 +00:00
InstrInfoEmitter.h simplify the way operand flags and constraints are handled, making it easier 2006-11-06 23:49:51 +00:00
IntrinsicEmitter.cpp Add sqrt and powi intrinsics for long double. 2007-09-28 01:08:20 +00:00
IntrinsicEmitter.h Automatically generating intrinsic declarations from Dan Gohman. Modified 2007-02-07 20:38:26 +00:00
Makefile Set the new NO_INSTALL flag for build-only tools. 2007-02-06 18:51:28 +00:00
Record.cpp Change instruction description to split OperandList into OutOperandList and 2007-07-19 01:14:50 +00:00
Record.h Added \!con(a,b) syntax to concatnate two dag fragments. 2007-05-15 01:23:24 +00:00
RegisterInfoEmitter.cpp Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value 2007-09-19 01:35:01 +00:00
RegisterInfoEmitter.h
SubtargetEmitter.cpp Add an "implies" field to features. This indicates that, if the current 2007-05-04 20:38:40 +00:00
SubtargetEmitter.h
TableGen.cpp reapply 2007-02-27 22:08:27 +00:00
TableGenBackend.cpp What should be the last unnecessary <iostream>s in the library. 2006-12-07 22:21:48 +00:00
TableGenBackend.h