summaryrefslogtreecommitdiff
path: root/utils/TableGen/FastISelEmitter.cpp
Commit message (Collapse)AuthorAge
...
* major surgery on tblgen: generalize TreePatternNodeChris Lattner2010-03-19
| | | | | | | | | | to maintain a list of types (one for each result of the node) instead of a single type. There are liberal hacks added to emulate the old behavior in various situations, but they can start disolving now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98999 91177308-0d34-0410-b5e6-96231b3b80d8
* look up instructions by record, not by name.Chris Lattner2010-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98904 91177308-0d34-0410-b5e6-96231b3b80d8
* Completely rewrite tblgen's type inference mechanism,Chris Lattner2010-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | changing the primary datastructure from being a "std::vector<unsigned char>" to being a new TypeSet class that actually has (gasp) invariants! This changes more things than I remember, but one major innovation here is that it enforces that named input values agree in type with their output values. This also eliminates code that transparently assumes (in some cases) that SDNodeXForm input/output types are the same, because this is wrong in many case. This also eliminates a bug which caused a lot of ambiguous patterns to go undetected, where a register class would sometimes pick the first possible type, causing an ambiguous pattern to get arbitrary results. With all the recent target changes, this causes no functionality change! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98534 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use the ISD::NodeType enum for SDNode opcodes, as CodeGenDan Gohman2010-01-05
| | | | | | | | uses several kinds of opcode values which are not declared within that enum. This fixes PR5946. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92794 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unused variables and methods warned about byDuncan Sands2009-09-06
| | | | | | | icc (#177, partial). Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81106 91177308-0d34-0410-b5e6-96231b3b80d8
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-11
| | | | | | | | | while the latter is capable of representing either a primitive or an extended type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78713 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-10
| | | | | | own struct type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace std::iostreams with raw_ostream in TableGen.Daniel Dunbar2009-07-03
| | | | | | | | | - Sorry, I can't help myself. - No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74742 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen for fast isel seems to assume an 'imm'Dale Johannesen2009-05-21
| | | | | | | | | | operand is the last in a pattern. There is no reason this should be true (although apparently it always is right now). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72232 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate a couple of fields from TargetRegisterClass: SubRegClasses and ↵Evan Cheng2009-01-22
| | | | | | SuperRegClasses. These are not necessary. Also eliminate getSubRegisterRegClass and getSuperRegisterRegClass. These are slow and their results can change if register file names change. Just use TargetLowering::getRegClassFor() to get the right TargetRegisterClass instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62762 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for having multiple predicates on a TreePatternNode.Dan Gohman2008-10-15
| | | | | | | | | This will allow predicates to be composed, which will allow the predicate definitions to become less redundant, and eventually will allow DAGISelEmitter.cpp to emit less redundant code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57562 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the primary fast-isel top-level comments to FastISel.cpp, whereDan Gohman2008-09-30
| | | | | | | they'll be a little more visible. Also, update and reword them a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56877 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly handle physical register inputs. They are not explicit input ↵Evan Cheng2008-09-08
| | | | | | operands in the resulting machine instrs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55893 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation of generated code.Evan Cheng2008-09-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55876 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore multi-instruction patterns. e.g.Evan Cheng2008-09-07
| | | | | | | | def : Pat<(i8 (trunc GR32:$src)), (i8 (EXTRACT_SUBREG (MOV32to32_ GR32:$src), x86_subreg_8bit))> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55875 91177308-0d34-0410-b5e6-96231b3b80d8
* Let tblgen only generate fastisel routines, not the class definition. This ↵Evan Cheng2008-09-03
| | | | | | makes it easier for targets to define its own fastisel class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55679 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initial support for fast isel of instructions that have inputs pinned to ↵Owen Anderson2008-08-29
| | | | | | physical registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55545 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a target callback for FastISel.Dan Gohman2008-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55512 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for fast-isel of opcodes that require use of extract_subreg. ↵Owen Anderson2008-08-28
| | | | | | Because of how extract_subreg is treated, it requires special case handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55480 91177308-0d34-0410-b5e6-96231b3b80d8
* Update a comment to reflect recent changes.Dan Gohman2008-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55418 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic FastISel support for floating-point constants.Dan Gohman2008-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55401 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor a bunch of FastISelEmitter code into a helper class, andDan Gohman2008-08-26
| | | | | | | | put each major step in a separate function. This makes the high level sequence of events easier to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55385 91177308-0d34-0410-b5e6-96231b3b80d8
* We need to check that the return type is correct, even in cases where we don'tOwen Anderson2008-08-26
| | | | | | | have a return type that differs from the operand types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55376 91177308-0d34-0410-b5e6-96231b3b80d8
* Throw the switch to allow FastISel to emit instructions whose return types ↵Owen Anderson2008-08-26
| | | | | | different from their inputs. Next step: adding lowering pattens in FastISel that actually use these newly available opcodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55349 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance TableGen to emit code for FastISel of opcodes with variadic return ↵Owen Anderson2008-08-26
| | | | | | types without slowing down opcodes that are not variadic. No such opcodes are currently generated, but in theory it should be a matter of just hitting the switch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55347 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a RetVT parameter to emitted FastISel methods, so that we will be able ↵Owen Anderson2008-08-25
| | | | | | | | | to pass the desired return type down. This is not currently used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55345 91177308-0d34-0410-b5e6-96231b3b80d8
* Deepen the map structure tablegen uses to compute FastISel patterns, in ↵Owen Anderson2008-08-25
| | | | | | | | | preparation for having patterns with return types that differ from their input types. This is not yet used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55344 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for fast isel of (integer) immediate materialization pattens, ↵Owen Anderson2008-08-25
| | | | | | | | | and use them to support bitcast of constants in fast isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55325 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a few comments.Dan Gohman2008-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55157 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the predicate check code from DAGISelEmitter.cppDan Gohman2008-08-22
| | | | | | | | | | and use it in FastISelEmitter.cpp, and make FastISel subtarget aware. Among other things, this lets it work properly on x86 targets that don't have SSE, where it successfully selects x87 instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55156 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic fast-isel support for instructions with constant int operands.Dan Gohman2008-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55099 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the code that limited FastISel to certain fixed signatures.Dan Gohman2008-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55096 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin making more use of the FastISelEmitter class.Dan Gohman2008-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55093 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an obsolete todo comment.Dan Gohman2008-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55080 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor the code for determining the target-specific instructionDan Gohman2008-08-20
| | | | | | | namespace out of the isel emitters and into common code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55079 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify FastISel's constructor argument list, make the FastISelDan Gohman2008-08-20
| | | | | | | | | class hold a MachineRegisterInfo member, and make the MachineBasicBlock be passed in to SelectInstructions rather than the FastISel constructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55076 91177308-0d34-0410-b5e6-96231b3b80d8
* For now, restrict FastISel to instructions that only involve oneDan Gohman2008-08-19
| | | | | | | register class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55008 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the code to scan an instruction's operands into aDan Gohman2008-08-19
| | | | | | | helper function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55007 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more comments.Dan Gohman2008-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55004 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation in FastISel tablegen-emitted code.Dan Gohman2008-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55003 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more checking to filter out more kinds of things thatDan Gohman2008-08-19
| | | | | | | FastISel doesn't support yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55002 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 columns.Dan Gohman2008-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54998 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a few doxygen comments.Dan Gohman2008-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54997 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of the new "fast" instruction selection support. SeeDan Gohman2008-08-13
the comments in FastISelEmitter.cpp for details on what this is. This is currently experimental and unusable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54751 91177308-0d34-0410-b5e6-96231b3b80d8