summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* reduce indentation by eliminating 'else after return'Chris Lattner2010-02-231-23/+33
| | | | llvm-svn: 96889
* reduce nesting.Chris Lattner2010-02-171-3/+7
| | | | llvm-svn: 96466
* constizeChris Lattner2010-02-141-2/+2
| | | | llvm-svn: 96199
* clean up a bunch of code, move some random predicatesChris Lattner2010-02-141-0/+51
| | | | | | on TreePatternNode to be methods on TreePatternNode. llvm-svn: 96197
* tidy upChris Lattner2010-02-141-2/+4
| | | | llvm-svn: 96186
* Use the 'MadeChange' variable instead of returning 'false' all of the time.Bill Wendling2009-12-251-3/+2
| | | | llvm-svn: 92155
* Do not infer the target type for COPY_TO_REGCLASS from dest regclass, this ↵Anton Korobeynikov2009-11-021-1/+0
| | | | | | | won't work if it can contain several types. Require explicit result type for the node for now. This fixes PR5364. PS: It seems that blackfin usage of copy_to_regclass is completely bogus! llvm-svn: 85766
* PR4795: Remove EEVT::isFP, isInt and isVec types used by TableGen's typeBob Wilson2009-08-291-28/+39
| | | | | | | | | | | | | | | inferencing. As far as I can tell, these are equivalent to the existing MVT::fAny, iAny and vAny types, and having both of them makes it harder to reason about and modify the type inferencing code. The specific problem in PR4795 occurs when updating a vAny type to be fAny or iAny, or vice versa. Both iAny and fAny include vector types -- they intersect with the set of types represented by vAny. When merging them, choose fAny/iAny to represent the intersection. This is not perfect, since fAny/iAny also include scalar types, but it is good enough for TableGen's type inferencing. llvm-svn: 80423
* Try to fix MSVC build after r79846.Benjamin Kramer2009-08-231-2/+3
| | | | llvm-svn: 79850
* Fix non-determinism in DAGISel emitter.Daniel Dunbar2009-08-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | - This manifested as non-determinism in the .inc output in rare cases (when two distinct patterns ended up being equivalent, which is rather rare). That meant the pattern matching was non-deterministic, which could eventually mean the code generator selected different instructions based on the arch. - It's probably worth making the DAGISel ensure a total ordering (or force the user to), but the simple fix here is to totally order the Record* maps based on a unique ID. - PR4672, PR4711. Yay: -- ddunbar@giles:~$ cat ~/llvm.obj.64/lib/Target/*/*.inc | shasum d1099ff34b21459a5a3e7021c225c080e6017ece - ddunbar@giles:~$ cat ~/llvm.obj.ppc/lib/Target/*/*.inc | shasum d1099ff34b21459a5a3e7021c225c080e6017ece - -- llvm-svn: 79846
* remove some DOUTsChris Lattner2009-08-231-15/+15
| | | | llvm-svn: 79821
* Add a new "SDTCisVec" SDTypeConstraint. This complements the vAny type.Bob Wilson2009-08-121-6/+20
| | | | | | | | There have been a few times where I've wanted this but ended up leaving the operand type unconstrained. It is easy to add this now and should help catch errors in the future. llvm-svn: 78849
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-46/+46
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Add a new overloaded EVT::vAny type for use in TableGen to allow intrinsicBob Wilson2009-08-111-2/+19
| | | | | | arguments that are vectors of any size and element type. llvm-svn: 78631
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-86/+86
| | | | | | own struct type. llvm-svn: 78610
* make ptr_rc derive from a new PointerLikeRegClass tblgen class.Chris Lattner2009-07-291-4/+4
| | | | llvm-svn: 77503
* Replace std::iostreams with raw_ostream in TableGen.Daniel Dunbar2009-07-031-21/+21
| | | | | | | | - Sorry, I can't help myself. - No intended functionality change. llvm-svn: 74742
OpenPOWER on IntegriCloud