summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the SubRegIndex TableGen class.Jakob Stoklund Olesen2010-05-241-0/+5
| | | | | | | This is the beginning of purely symbolic subregister indices, but we need a bit of jiggling before the explicit numeric indices can be completely removed. llvm-svn: 104492
* stop computing InstImpInputs, it is deadChris Lattner2010-04-201-16/+8
| | | | llvm-svn: 101881
* DAGInstruction::ImpOperands is dead after my recent tblgen work, zap it.Chris Lattner2010-04-201-4/+2
| | | | llvm-svn: 101880
* print the complexity of the pattern being matched in theChris Lattner2010-03-291-0/+53
| | | | | | comment in the generated table. llvm-svn: 99794
* improve type checking of SDNode operand count. This rejects all casesChris Lattner2010-03-281-8/+7
| | | | | | | where an incorrect number of operands is provided to an sdnode instead of just a few cases. llvm-svn: 99761
* finally remove the immAllOnesV_bc/immAllZerosV_bc patternsChris Lattner2010-03-281-1/+0
| | | | | | | | | | and those derived from them. These are obnoxious because they were written as: PatLeaf<(bitconvert). Not having an argument was foiling adding better type checking for operand count matching up with what was required (in this case, bitconvert always requires an operand!) llvm-svn: 99759
* teach tblgen to allow patterns like (add (i32 (bitconvert (i32 GPR))), 4), Chris Lattner2010-03-281-1/+37
| | | | | | | | | transforming it into (add (i32 GPR), 4). This allows us to write type generic multi patterns and have tblgen automatically drop the bitconvert in the case when the types align. This allows us to fold an extra load in the changed testcase. llvm-svn: 99756
* validate that input sdnodes don't exist in an output pattern.Chris Lattner2010-03-281-8/+23
| | | | llvm-svn: 99747
* eliminate a bunch of code duplication in ParseTreePatternChris Lattner2010-03-281-98/+66
| | | | | | by rotating it. llvm-svn: 99746
* SDTCisVT<0, isVoid> is not valid, reject it.Chris Lattner2010-03-281-0/+3
| | | | llvm-svn: 99744
* fix CodeGenTarget::getRegisterVTs to not return the Chris Lattner2010-03-271-2/+2
| | | | | | | | same vt multiple times for a register. For example, ECX is in 5 different i32 reg classes, just return 1 i32 instead of 5. llvm-svn: 99727
* hoist some funky logic into CodeGenInstructionChris Lattner2010-03-271-15/+10
| | | | | | | | | from two places in CodeGenDAGPatterns.cpp, and use it in DAGISelMatcherGen.cpp instead of using an incorrect predicate that happened to get lucky on our current targets. llvm-svn: 99726
* continue pushing tblgen's support for nodes with multipleChris Lattner2010-03-271-32/+27
| | | | | | | | results forward. We can now handle an instruction that produces one implicit def and one result instead of one or the other when not at the root of the pattern. llvm-svn: 99725
* remove parallel support.Chris Lattner2010-03-271-37/+4
| | | | llvm-svn: 99703
* add plumbing for handling multiple result nodes Chris Lattner2010-03-241-1/+2
| | | | | | in some more places. llvm-svn: 99366
* implement SDTCisVTSmallerThanOp with EnforceSmallerThanChris Lattner2010-03-241-10/+3
| | | | | | instead of reimplementing it wrong and poorly. llvm-svn: 99357
* bring sanity to EnforceVectorEltTypeChris Lattner2010-03-241-26/+30
| | | | llvm-svn: 99354
* Cleanup getImplicitTypeChris Lattner2010-03-231-9/+24
| | | | llvm-svn: 99353
* Change intrinsic result type for void to store it as an empty listChris Lattner2010-03-221-9/+3
| | | | | | | instead of as a single element list with VoidTy. Now with a fix for the verifier. llvm-svn: 99206
* Fix suggested parentheses warning.Daniel Dunbar2010-03-211-2/+2
| | | | llvm-svn: 99111
* Revert r99009 temporarily it seems to be breaking the bots.Eric Christopher2010-03-191-3/+9
| | | | llvm-svn: 99011
* Change intrinsic result type for void to store it as an empty listChris Lattner2010-03-191-9/+3
| | | | | | instead of as a single element list with VoidTy. llvm-svn: 99009
* make getOperandNum a static function (since it's just used by Chris Lattner2010-03-191-26/+28
| | | | | | ApplyTypeConstraint) and make it handle multiple result nodes. llvm-svn: 99003
* major surgery on tblgen: generalize TreePatternNodeChris Lattner2010-03-191-122/+228
| | | | | | | | | 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. llvm-svn: 98999
* make FillWithPossibleTypes take a predicate to filter types so that Chris Lattner2010-03-191-34/+52
| | | | | | we don't blow the smallvector as often. No functionality change. llvm-svn: 98968
* resolve fixme: we now infer the instruction-level 'isvariadic' bitChris Lattner2010-03-191-7/+16
| | | | | | from the pattern if present, and we use it instead of the bit. llvm-svn: 98938
* add a new SDNPVariadic SDNP node flag, and use it inChris Lattner2010-03-191-0/+2
| | | | | | | | dag isel gen instead of instruction properties. This allows the oh-so-useful behavior of matching a variadic non-root node. llvm-svn: 98934
* rewrite EnforceSmallerThan to be less bone headed.Chris Lattner2010-03-191-64/+75
| | | | llvm-svn: 98933
* Fix -Asserts warning.Daniel Dunbar2010-03-191-2/+1
| | | | llvm-svn: 98927
* eliminate the last use of EEVT::isUnknownChris Lattner2010-03-191-7/+4
| | | | llvm-svn: 98918
* change Target.getInstructionsByEnumValue to return a referenceChris Lattner2010-03-191-2/+2
| | | | | | | to a vector that CGT stores instead of synthesizing it on every call. llvm-svn: 98910
* don't go through getInstructions().Chris Lattner2010-03-191-5/+5
| | | | llvm-svn: 98906
* look up instructions by record, not by name.Chris Lattner2010-03-191-3/+3
| | | | llvm-svn: 98904
* expand tblgen's support for instructions with implicit defs.Chris Lattner2010-03-181-2/+4
| | | | llvm-svn: 98900
* infer results of a pattern from implicit defs. This allows you to do something Chris Lattner2010-03-181-13/+30
| | | | | | | | | | | | like this: def : Pat<(add ...), (FOOINST)>; When fooinst only has a single implicit def (e.g. to R1). This will be handled as if written as (set R1, (FOOINST ...)) llvm-svn: 98897
* simplify this code, the # of sets in the pattern for an instructionChris Lattner2010-03-181-2/+1
| | | | | | shouldn't change this. llvm-svn: 98872
* remove some code that was working around old sparc v9 backend bugs.Chris Lattner2010-03-181-1/+2
| | | | | | Add checking that the input/output operand list in spelled right. llvm-svn: 98865
* eliminate some #if 0 code I added in r96905, type inference Chris Lattner2010-03-151-18/+0
| | | | | | now enforces that input/output named values have hte same type. llvm-svn: 98535
* Completely rewrite tblgen's type inference mechanism,Chris Lattner2010-03-151-381/+583
| | | | | | | | | | | | | | | | | | | | | | | | 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! llvm-svn: 98534
* Node arguments to type casts can have names too. This codeChris Lattner2010-03-081-0/+8
| | | | | | | | | | | needs to be majorly refactored, but this spot bugfix allows things like: def vmrghw_shuffle : PatFrag<(ops node:$lhs, node:$rhs), (vector_shuffle (v4i32 node:$lhs), node:$rhs), [{ ... llvm-svn: 97952
* resolve a fixme by having the .td file parser reject thigns likeChris Lattner2010-03-011-1/+9
| | | | | | | | (set GPR, somecomplexpattern) if somecomplexpattern doesn't declare what it can match. llvm-svn: 97513
* Fix PR2590 by making PatternSortingPredicate actually be Chris Lattner2010-03-011-3/+6
| | | | | | | | | | | | | | | ordered correctly. Previously it would get in trouble when two patterns were too similar and give them nondet ordering. We force this by using the record ID order as a fallback. The testsuite diff is due to alpha patterns being ordered slightly differently, the change is a semantic noop afaict: < lda $0,-100($16) --- > subq $16,100,$0 llvm-svn: 97509
* Generalize my hack to use SDNodeInfo to find out when aChris Lattner2010-02-281-0/+24
| | | | | | | | | node is always guaranteed to have a particular type instead of hacking in ISD::STORE explicitly. This allows us to use implied types for a broad range of nodes, even target specific ones. llvm-svn: 97355
* use DEBUG instead of DebugFlag directly so that thisChris Lattner2010-02-271-7/+7
| | | | | | respects -debug-only=something-else. llvm-svn: 97307
* add some #if 0'd out code for checking that named values in Chris Lattner2010-02-231-19/+41
| | | | | | | | input/output patterns have the same type. It turns out that this triggers all the time because we don't infer types between these boundaries. Until we do, don't turn this on. llvm-svn: 96905
* Reject patterns that use a name multiple times in the src or resultChris Lattner2010-02-231-7/+8
| | | | | | of a pattern and where the uses have different types. llvm-svn: 96904
* reject patterns that have dead named arguments in the input patternChris Lattner2010-02-231-7/+24
| | | | | | this is tidier and can find bugs. llvm-svn: 96900
* reject patterns that mention a name in the destination patternChris Lattner2010-02-231-3/+29
| | | | | | | but not in the input. Previously, this would trigger an abort late in the isel logic. llvm-svn: 96898
* merge some code.Chris Lattner2010-02-231-16/+20
| | | | llvm-svn: 96896
* more tidying upChris Lattner2010-02-231-15/+15
| | | | llvm-svn: 96891
OpenPOWER on IntegriCloud