summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.h
Commit message (Collapse)AuthorAgeFilesLines
...
* print the complexity of the pattern being matched in theChris Lattner2010-03-291-0/+4
| | | | | | comment in the generated table. llvm-svn: 99794
* improve type checking of SDNode operand count. This rejects all casesChris Lattner2010-03-281-0/+3
| | | | | | | where an incorrect number of operands is provided to an sdnode instead of just a few cases. llvm-svn: 99761
* eliminate a bunch of code duplication in ParseTreePatternChris Lattner2010-03-281-2/+2
| | | | | | by rotating it. llvm-svn: 99746
* add plumbing for handling multiple result nodes Chris Lattner2010-03-241-1/+1
| | | | | | in some more places. llvm-svn: 99366
* bring sanity to EnforceVectorEltTypeChris Lattner2010-03-241-1/+1
| | | | llvm-svn: 99354
* make getOperandNum a static function (since it's just used by Chris Lattner2010-03-191-5/+0
| | | | | | ApplyTypeConstraint) and make it handle multiple result nodes. llvm-svn: 99003
* major surgery on tblgen: generalize TreePatternNodeChris Lattner2010-03-191-19/+42
| | | | | | | | | 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-3/+6
| | | | | | we don't blow the smallvector as often. No functionality change. llvm-svn: 98968
* rewrite EnforceSmallerThan to be less bone headed.Chris Lattner2010-03-191-0/+5
| | | | llvm-svn: 98933
* eliminate the last use of EEVT::isUnknownChris Lattner2010-03-191-7/+2
| | | | llvm-svn: 98918
* Finally change the instruction looking map to be a densemap fromChris Lattner2010-03-191-4/+4
| | | | | | | | | record* -> instrinfo instead of std::string -> instrinfo. This speeds up tblgen on cellcpu from 7.28 -> 5.98s with a debug build (20%). llvm-svn: 98916
* infer results of a pattern from implicit defs. This allows you to do something Chris Lattner2010-03-181-0/+4
| | | | | | | | | | | | 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
* Completely rewrite tblgen's type inference mechanism,Chris Lattner2010-03-151-47/+128
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix PR2590 by making PatternSortingPredicate actually be Chris Lattner2010-03-011-3/+4
| | | | | | | | | | | | | | | 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/+5
| | | | | | | | | 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
* merge some code.Chris Lattner2010-02-231-0/+1
| | | | llvm-svn: 96896
* start sketching out the structure of code for result emission generation.Chris Lattner2010-02-181-2/+3
| | | | | | Nothing real here yet. llvm-svn: 96575
* add support for the new isel matcher to generate Chris Lattner2010-02-161-0/+7
| | | | | | (isprofitable|islegal)tofold checks. llvm-svn: 96331
* constizeChris Lattner2010-02-141-2/+2
| | | | llvm-svn: 96199
* clean up a bunch of code, move some random predicatesChris Lattner2010-02-141-1/+16
| | | | | | on TreePatternNode to be methods on TreePatternNode. llvm-svn: 96197
* add an insertion operator.Chris Lattner2010-02-141-0/+5
| | | | llvm-svn: 96187
* Remove unneeded ';' and a class/struct mismatch (noticed by clang).Daniel Dunbar2009-12-091-1/+1
| | | | llvm-svn: 90934
* Report errors correctly for unselected target intrinsics.Jakob Stoklund Olesen2009-10-151-0/+2
| | | | llvm-svn: 84193
* PR4795: Remove EEVT::isFP, isInt and isVec types used by TableGen's typeBob Wilson2009-08-291-7/+7
| | | | | | | | | | | | | | | 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/+4
| | | | llvm-svn: 79850
* Fix non-determinism in DAGISel emitter.Daniel Dunbar2009-08-231-6/+10
| | | | | | | | | | | | | | | | | | | | | | | - 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
* Add a new "SDTCisVec" SDTypeConstraint. This complements the vAny type.Bob Wilson2009-08-121-5/+10
| | | | | | | | 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-7/+7
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-14/+14
| | | | | | own struct type. llvm-svn: 78610
* Replace std::iostreams with raw_ostream in TableGen.Daniel Dunbar2009-07-031-2/+2
| | | | | | | | - Sorry, I can't help myself. - No intended functionality change. llvm-svn: 74742
* 2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.Nate Begeman2009-04-271-5/+1
| | | | | | | | | | | | | | PR2957 ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes as the shuffle mask. A value of -1 represents UNDEF. In addition to eliminating the creation of illegal BUILD_VECTORS just to represent shuffle masks, we are better about canonicalizing the shuffle mask, resulting in substantially better code for some classes of shuffles. llvm-svn: 70225
* Revert 69952. Causes testsuite failures on linux x86-64.Rafael Espindola2009-04-241-1/+5
| | | | llvm-svn: 69967
* PR2957Nate Begeman2009-04-241-5/+1
| | | | | | | | | | | | | | ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes as the shuffle mask. A value of -1 represents UNDEF. In addition to eliminating the creation of illegal BUILD_VECTORS just to represent shuffle masks, we are better about canonicalizing the shuffle mask, resulting in substantially better code for some classes of shuffles. A clean up of x86 shuffle code, and some canonicalizing in DAGCombiner is next. llvm-svn: 69952
* Add a comment.Dan Gohman2009-03-311-1/+2
| | | | llvm-svn: 68111
* fix a few spelling errors and typosJim Grosbach2009-03-261-1/+1
| | | | llvm-svn: 67758
* Eliminate a 'control reaches end of non-void function' warning.Evan Cheng2009-02-091-0/+1
| | | | llvm-svn: 64111
* Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen2009-02-051-2/+10
| | | | llvm-svn: 63812
* Reverting 63765. This broke the build of both clangDale Johannesen2009-02-041-10/+2
| | | | | | and llvm-gcc. llvm-svn: 63786
* New feature: add support for target intrinsics being defined in theNate Begeman2009-02-041-2/+10
| | | | | | | | | target directories themselves. This also means that VMCore no longer needs to know about every target's list of intrinsics. Future work will include converting the PowerPC target to this interface as an example implementation. llvm-svn: 63765
* Fix spelling in some comments.Bob Wilson2009-01-051-1/+1
| | | | llvm-svn: 61702
* Add support for having multiple predicates on a TreePatternNode.Dan Gohman2008-10-151-5/+17
| | | | | | | | 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. llvm-svn: 57562
* Factor out the predicate check code from DAGISelEmitter.cppDan Gohman2008-08-221-0/+2
| | | | | | | | | 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. llvm-svn: 55156
* Added support for overloading intrinsics (atomics) based on pointersMon P Wang2008-07-301-2/+3
| | | | | | | to different address spaces. This alters the naming scheme for those intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32 llvm-svn: 54195
* - Add "Commutative" property to intrinsics. This allows tblgen to generate ↵Evan Cheng2008-06-161-0/+4
| | | | | | | | the commuted variants for dagisel matching code. - Mark lots of X86 intrinsics as "Commutative" to allow load folding. llvm-svn: 52353
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-061-12/+12
| | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). llvm-svn: 52044
* Move instruction flag inference out of InstrInfoEmitter and intoDan Gohman2008-04-031-2/+3
| | | | | | | | | | | | CodeGenDAGPatterns, where it can be used in other tablegen backends. This allows the inference to be done for DAGISelEmitter so that it gets accurate mayLoad/mayStore/isSimpleLoad flags. This brings MemOperand functionality back to where it was before 48329. However, it doesn't solve the problem of anonymous patterns which expand to code that does loads or stores. llvm-svn: 49123
* This patch fixes a problem encountered by the CellSPU backend where variantsScott Michel2008-03-051-1/+7
| | | | | | | | | | | | | | were being pruned in patterns where a variable was used more than once, e.g.: (or (and R32C:$rA, R32C:$rC), (and R32C:$rB, (not R32C:$rC))) In this example, $rC is used more than once and is actually significant to instruction selection pattern matching when commuted variants are produced. This patch scans the pattern's clauses and collects the variables, creating a set of variables that are used more than once. TreePatternNode::isIsomorphicTo() also understands that multiply-used variables are significant. llvm-svn: 47950
* Tablegen support for insert & extract element matchingNate Begeman2008-02-091-1/+5
| | | | llvm-svn: 46901
* set the 'isstore' flag for instructions whose pattern is an Chris Lattner2008-01-061-2/+5
| | | | | | intrinsic that writes to memory. llvm-svn: 45650
* improve const correctness.Chris Lattner2008-01-061-1/+1
| | | | llvm-svn: 45646
OpenPOWER on IntegriCloud