aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/DAGISelEmitter.cpp
AgeCommit message (Collapse)Author
2005-11-17teach tblgen to be smart enough to handle tglobaladdr nodesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24391 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16fix a tblgen bug that Evan ran into, where we would lose the '$src' nameChris Lattner
on patterns like "(set R32:$dst, (i32 imm:$src))" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24383 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-03Reject integer literals that are out of range for their type.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24162 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02Add support for immediates directly in the pattern, this allows itanium toChris Lattner
define: def : Pat<(i1 1), (CMPEQ r0, r0)>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24149 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29Make negative immediates in patterns work correctly, silence some warningsChris Lattner
building the itanium backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24095 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28Rename Record::getValueAsListDef to getValueAsListOfDefs, to more accuratelyChris Lattner
reflect what it is. Convert some more code over to use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24072 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28Use the new interface Jim addedChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24071 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26Condcodes are in the ISD namespaceChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24010 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26Add support for CondCode'sChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24008 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25Emit some boilerplate for targetsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23983 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21Make tblgen emit:Chris Lattner
tblgen: In ZAPNOTi: Cannot use 'IZAPX' in an input pattern! for a bad pattern, instead of an ugly assertion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23854 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19add support for literal immediates in patterns to match, allowing us toChris Lattner
write things like this: def : Pat<(add GPRC:$in, 12), (ADD12 GPRC:$in)>; Andrew: if this isn't enough or doesn't work for you, please lemme know. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23819 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19Add basic support for integer constants in pattern results.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23817 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19Add support for patterns that have physical registers in them. Testcase:Chris Lattner
def : Pat<(trunc G8RC:$in), (OR8To4 G8RC:$in, X0)>; Even though this doesn't make any sense on PPC :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23815 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19Asserting here is to violentChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23814 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19Nate wants to define 'Pat's which turn into instructions that don't haveChris Lattner
patterns. Certainly a logical request. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23810 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-18Duraid pointed out that it is impolite to emit PPC:: into the IA64 backendChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23780 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-16Make the generated code significantly more memory efficient, by usingChris Lattner
SelectNodeTo instead of getTargetNode when possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23758 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-15Implement the last major missing piece in the DAG isel generator: when emittingChris Lattner
a pattern match, make sure to emit the (minimal number of) type checks that verify the pattern matches this specific instruction. This allows FMA32 patterns to not match double expressions for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14Now that we have int/fp lattice values, implement the SDTCisOpSmallerThanOpChris Lattner
type constraint. This lets tblgen realize that it doesn't need any dynamic type checks for fextend/fround on PPC (and many other targets), because there are only two fp types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23730 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14Fairly serious rework of the typing code to add new int/fp lattice values.Chris Lattner
Overall, no functionality change yet though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23729 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14simplify the code a bitChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23728 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14Add basic support for recognizing a new SDTCisOpSmallerThanOp type constraintChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23725 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14Implement a couple of new (important) features.Chris Lattner
1. If an operation has to be int or fp and the target only supports one int or fp type, relize that the op has to have that type. 2. If a target has operations on multiple types, do not emit matching code for patterns involving those operators, since we do not emit the code to check for them yet. This prevents PPC from generating FP ops currently. Also move some code around into more logical places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23724 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-29Teach tablegen to reassociate operators when possible. This allows it toChris Lattner
find all of teh pattern matches for EQV from one definition git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23529 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-29Teach tblgen to build permutations of instructions, so that the target authorChris Lattner
doesn't have to specify them manually. It currently handles associativity, e.g. knowing that (X*Y)+Z also matches X+(Y*Z) and will be extended in the future. It is smart enough to not introduce duplicate patterns or patterns that can never match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23526 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28add support for an associative markerChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23502 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28Emit an error if instructions or patterns are defined but can never match.Chris Lattner
Currently we check that immediate values live on the RHS of commutative operators. Defining ORI like this, for example: def ORI : DForm_4<24, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2), "ori $dst, $src1, $src2", [(set GPRC:$dst, (or immZExt16:$src2, GPRC:$src1))]>; results in: tblgen: In ORI: Instruction can never match: Immediate values must be on the RHS of commutative operators! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23501 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28collect commutativity informationChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23499 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28Prefer cheaper patterns to more expensive ones. Print the costs to the ↵Chris Lattner
generated file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23492 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28Select Constant nodes to TargetConstant nodesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23488 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-26memoize the assert resultsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23457 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-26Emit the switch stmt cases in alphabetical order instead of pointer order,Chris Lattner
which is not stable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23456 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-26implement a fixme: only select values once, even if used multiple times.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23454 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-25Fix VC++ build errors.Jeff Cohen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23431 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-24memoize translationsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23419 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-24Teach the DAG isel generator to emit code that creates nodes.Chris Lattner
Fix a few corner cases parsing things like (i32 imm:$foo) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23417 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23Emit better code (no more copies for var references), and support DAG patternsChris Lattner
(e.g. things like rotates). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23Fix a fixme by passing around SDOperand's instead of SDNode*'sChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23415 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23Emit code that matches the incoming DAG pattern and checks predicates.Chris Lattner
This does not check that types match yet, but PPC only has one integer type ;-). This also doesn't have the code to build the resultant dag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23414 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23emit information about the order patterns are to be matched.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23413 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23start filling in the switch stmtChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23412 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-16Fix a minor bug, add commentsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23370 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15teach the type inference code how to infer types for instructions and nodeChris Lattner
xforms. Run type inference on result patterns, so we always have fully typed results (and to catch errors in .td files). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23369 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15put instructions into a map instead of a vector for quick lookupChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23368 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15when parsing instructions remember information about the types taken andChris Lattner
returned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23367 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15Start parsing "Pattern" nodesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23365 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15rename a couple of methods, add structure for pattern parsingChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23364 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14Verify that xform functions only occur in logical placesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23363 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14Promote xform fns to be explicit nodes in result patterns, and clean offChris Lattner
predicates since they will have already matched at this point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23362 91177308-0d34-0410-b5e6-96231b3b80d8