summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow bits init values to be used in patterns, turn them into ints.Chris Lattner2006-03-311-0/+19
| | | | llvm-svn: 27286
* Implement Regression/TableGen/DagDefSubst.llChris Lattner2006-03-301-4/+7
| | | | llvm-svn: 27263
* Tblgen doesn't like multiple SDNode<> definitions that map to the sameenum ↵Chris Lattner2006-03-281-13/+17
| | | | | | | | value. Split them into separate enums. Also, don't emit dynamic checks when we can compute them statically llvm-svn: 27202
* Print error messages like this:Chris Lattner2006-03-271-1/+1
| | | | | | | | | tblgen: In STVEBX: Intrinsic 'llvm.ppc.altivec.stvebx' expects 3 operands, not 2 operands! instead of like this: tblgen: In STVEBX: Intrinsic 'intrinsic_void expects 3 operands, not 2 operands! llvm-svn: 27185
* Add a missing check which cause an invalid .td file to crash tblgenChris Lattner2006-03-251-0/+3
| | | | llvm-svn: 27126
* When failing selection for an intrinsic, print this:Chris Lattner2006-03-251-2/+16
| | | | | | | | | | Cannot yet select: intrinsic %llvm.ppc.altivec.lvx instead of this: Cannot yet select: 0x9b047e0: v4i32,ch = INTRINSIC 0x9b04540:1, 0x9b04710, 0x9b04790, 0x9b04540 llvm-svn: 27110
* Change approach so that we get codegen for free for intrinsics. With this,Chris Lattner2006-03-241-38/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | intrinsics that don't take pointer arguments now work. For example, we can compile this: int test3( __m128d *A) { return _mm_movemask_pd(*A); } int test4( __m128 *A) { return _mm_movemask_ps(*A); } to this: _test3: movl 4(%esp), %eax movapd (%eax), %xmm0 movmskpd %xmm0, %eax ret _test4: movl 4(%esp), %eax movaps (%eax), %xmm0 movmskps %xmm0, %eax ret llvm-svn: 27090
* fix 80 column violationsChris Lattner2006-03-241-5/+6
| | | | llvm-svn: 27084
* Parse intrinsics correctly and perform type propagation. This doesn't currentlyChris Lattner2006-03-241-3/+40
| | | | | | emit the code to select intrinsics, but that is next :) llvm-svn: 27082
* Allow result node to be a simple leaf node. This enable bitconvert patternsEvan Cheng2006-03-231-4/+9
| | | | | | | like this: def : Pat<(v4i32 (bitconvert (v4f32 VR128:$src))), (v4i32 VR128:$src)>; llvm-svn: 26968
* Don't forget to promote xform function to an explicit node for def : Pat<>Evan Cheng2006-03-211-1/+20
| | | | | | patterns. llvm-svn: 26929
* minor code simplificationChris Lattner2006-03-211-11/+5
| | | | llvm-svn: 26918
* The node wrapped in PatLeaf<> should be treated as a leaf even if it isn'tEvan Cheng2006-03-201-4/+11
| | | | | | one, i.e. don't select it. llvm-svn: 26909
* It should be ok for a xform output type to be different from input type.Evan Cheng2006-03-201-5/+17
| | | | llvm-svn: 26899
* Copy matching pattern's output type info to instruction result pattern.Evan Cheng2006-03-201-5/+12
| | | | | | | The instruction patterns do not contain enough information to resolve the exact type of the destination if it of a generic vector type. llvm-svn: 26892
* Add a new SDTCisIntVectorOfSameSize type constraintChris Lattner2006-03-201-2/+19
| | | | llvm-svn: 26890
* Temporary hack to enable more (store (op (load ...))) folding. This makesEvan Cheng2006-03-091-30/+74
| | | | | | | it possible when a TokenFactor is between the load and store. But is still missing some cases due to ordering issue. llvm-svn: 26638
* Don't generate silly matching code like this:Evan Cheng2006-03-071-3/+8
| | | | | | | | | | | | if (N1.getOpcode() == ISD::ADD && ...) if (... && (N1.getNumOperands() == 1 || !isNonImmUse(N1.Val, N10.Val))) && ...) TableGen knows N1 must have more than one operand. llvm-svn: 26592
* Select inline asm memory operands.Chris Lattner2006-02-241-0/+1
| | | | llvm-svn: 26349
* Bump up pattern cost if the resulting instruction is markedEvan Cheng2006-02-181-7/+14
| | | | | | usesCustomDAGSchedInserter. llvm-svn: 26282
* Call InsertISelMapEntry rather than map insertion operator to prevent overlyEvan Cheng2006-02-091-45/+64
| | | | | | aggrssive inlining. This reduces Select_store frame size from 24k to 10k. llvm-svn: 26095
* Match getTargetNode() changes (now returns SDNode* instead of SDOperand).Evan Cheng2006-02-091-39/+46
| | | | llvm-svn: 26084
* Change Select() fromEvan Cheng2006-02-091-69/+98
| | | | | | | | SDOperand Select(SDOperand N); to void Select(SDOperand &Result, SDOperand N); llvm-svn: 26067
* Hoist all SDOperand declarations within a Select_{opcode}() to the top levelEvan Cheng2006-02-071-31/+64
| | | | | | to reduce stack memory usage. This is intended to work around the gcc bug. llvm-svn: 26026
* At the end of isel, select a replacement node for each handle that does notEvan Cheng2006-02-061-11/+24
| | | | | | | have one. This can happen if a load's real uses are dead (i.e. they do not have uses themselves). llvm-svn: 26014
* Name change.Evan Cheng2006-02-061-4/+4
| | | | llvm-svn: 26013
* Handle HANDLENODE: just return itself.Evan Cheng2006-02-051-0/+1
| | | | llvm-svn: 26011
* Allow more loads to be folded which were previously prevented from happeningEvan Cheng2006-02-051-23/+181
| | | | | | | | | | | | | | | | due to ordering issue. i.e. they were selected for chain use first. Now at load select time, check if it is being selected for a chain use and if it has only a single real use. If so, return a HANDLENODE (with the load as its operand) in its place and record it. When it is folded or the load is selected for a real use, the isel records it as the replacement for the HANDLENODE. The replacement is done when all nodes are selected. This scheme exposed a couple of problems where cycles can happen. (See comments in EmitMatchCode() for descriptions of the problems and their workaround / solutions.) These problems have been resolved with a small compile time penality. llvm-svn: 25995
* Re-committing the last bit of change. It shouldn't break PPC this time.Evan Cheng2006-02-051-4/+7
| | | | llvm-svn: 25982
* Temporarily revert the last change, which breaks PPC and other targets thatChris Lattner2006-02-041-3/+4
| | | | | | DO select things. llvm-svn: 25970
* Complex pattern's custom matcher should not call Select() on any operands.Evan Cheng2006-02-041-0/+5
| | | | | | Select them afterwards if it returns true. llvm-svn: 25968
* node predicates add to the complexity of a pattern. This ensures that theChris Lattner2006-02-031-2/+9
| | | | | | | X86 backend attempts to match small-immediate versions of instructions before the full size immediate versions. llvm-svn: 25937
* (store (op (load ...))) folding problem. In the generated matching code,Evan Cheng2006-02-031-23/+30
| | | | | | | | | | | | | | | Chain is initially set to the chain operand of store node, when it reaches load, if it matches the load then Chain is set to the chain operand of the load. However, if the matching code that follows this fails, isel moves on to the next pattern but it does not restore Chain to the chain operand of the store. So when it tries to match the next store / op / load pattern it would fail on the Chain == load.getOperand(0) test. The solution is for each chain operand to get a unique name. e.g. Chain10. llvm-svn: 25931
* If a pattern's root node is a constant, its size should be 3 rather than 2.Evan Cheng2006-02-011-0/+4
| | | | llvm-svn: 25870
* simplify some codeChris Lattner2006-01-291-10/+7
| | | | llvm-svn: 25791
* it is nice not to chop off bits for those blessed with lots of bitsAndrew Lenharth2006-01-291-1/+1
| | | | llvm-svn: 25766
* make the casts actually cast to the variable typeAndrew Lenharth2006-01-291-7/+10
| | | | llvm-svn: 25765
* start of the 64bit safety cleanupAndrew Lenharth2006-01-291-1/+1
| | | | llvm-svn: 25764
* Emit series of conditionals with &&, emitting stuff like this:Chris Lattner2006-01-291-13/+48
| | | | | | | | | | | | | | | | if (N1.getOpcode() == ISD::LOAD && N1.hasOneUse() && !CodeGenMap.count(N1.getValue(0)) && !CodeGenMap.count(N1.getValue(1))) { instead of this: if (N1.getOpcode() == ISD::LOAD) { if (N1.hasOneUse()) { if (!CodeGenMap.count(N1.getValue(0))) { if (!CodeGenMap.count(N1.getValue(1))) { llvm-svn: 25763
* Factor matching code that is common between patterns. This works aroundChris Lattner2006-01-291-34/+108
| | | | | | | GCC not jump-threading across this common code, and produces far nicer output. llvm-svn: 25762
* Split out code generation from analysis from emissionChris Lattner2006-01-291-14/+36
| | | | llvm-svn: 25759
* move some code around, no change in the generated codeChris Lattner2006-01-291-50/+46
| | | | llvm-svn: 25758
* now that we have control over emission of the code, emit the code using nestedChris Lattner2006-01-281-26/+27
| | | | | | | | | "if" statements (indenting it appropriately, of course) instead of using goto's. This inverts the logic for all of the if statements, which makes things simpler to understand in addition to making the generated code easier to read. llvm-svn: 25757
* Change PatternCodeEmitter to emit code into a buffer instead of emitting itChris Lattner2006-01-281-259/+247
| | | | | | | | directly to the output file. This makes things simple because the code doesn't have to worry about indentation or the case when there is no goto. It also allows us to indent the code better without touching everything :) llvm-svn: 25756
* Fit to 80 columns, no functionality changeChris Lattner2006-01-281-14/+20
| | | | llvm-svn: 25752
* Teach tablegen to generate code that is VC++ warning-free.Jeff Cohen2006-01-271-22/+64
| | | | llvm-svn: 25709
* (store (op (load ...)), ...)Evan Cheng2006-01-271-3/+10
| | | | | | | If store's chain operand is load, then use load's chain operand instead. If it isn't (likely a TokenFactor), then do not allow the folding. llvm-svn: 25708
* Teach the dag selectors to select InlineAsm nodes.Chris Lattner2006-01-261-1/+18
| | | | | | Aren't we happy the pattern selectors are almost all gone? llvm-svn: 25666
* Another folding problem: if a node r/w chain or flag, don't fold it if itEvan Cheng2006-01-261-5/+20
| | | | | | | | | has already been selected. The number of use check is not strong enough since a node can be replaced with newly created target node. e.g. If the original node has two uses, when it is selected for one of the uses it is replaced with another. Each node now has a single use but isel still should not fold it. llvm-svn: 25651
* Add a FIXME comment.Evan Cheng2006-01-261-0/+1
| | | | llvm-svn: 25635
OpenPOWER on IntegriCloud