Chris Lattner
2e3569b604
Fix a minor bug, add comments
...
llvm-svn: 23370
2005-09-16 00:29:46 +00:00
Chris Lattner
4c1ec1c784
teach the type inference code how to infer types for instructions and node
...
xforms. Run type inference on result patterns, so we always have fully typed
results (and to catch errors in .td files).
llvm-svn: 23369
2005-09-15 22:23:50 +00:00
Chris Lattner
07b63eafa1
put instructions into a map instead of a vector for quick lookup
...
llvm-svn: 23368
2005-09-15 21:57:35 +00:00
Chris Lattner
335614b54a
when parsing instructions remember information about the types taken and
...
returned.
llvm-svn: 23367
2005-09-15 21:51:12 +00:00
Chris Lattner
66c08682d9
Start parsing "Pattern" nodes
...
llvm-svn: 23365
2005-09-15 21:42:00 +00:00
Chris Lattner
fe7a70834b
rename a couple of methods, add structure for pattern parsing
...
llvm-svn: 23364
2005-09-15 02:38:02 +00:00
Chris Lattner
ab6886a31d
Verify that xform functions only occur in logical places
...
llvm-svn: 23363
2005-09-14 23:05:13 +00:00
Chris Lattner
6f94c802a2
Promote xform fns to be explicit nodes in result patterns, and clean off
...
predicates since they will have already matched at this point.
llvm-svn: 23362
2005-09-14 23:01:59 +00:00
Chris Lattner
57cae81b5e
start building the instruction dest pattern correctly. Change the xform
...
functions to preserve the Record for the xform instead of making it into a
function name.
llvm-svn: 23361
2005-09-14 22:55:26 +00:00
Chris Lattner
a6a0d51065
catch unnamed inputs
...
llvm-svn: 23360
2005-09-14 22:06:36 +00:00
Chris Lattner
f749a0ef7c
check that there are no unexpected operands
...
llvm-svn: 23359
2005-09-14 21:59:34 +00:00
Chris Lattner
9c196b02fa
force all instruction operands to be named.
...
llvm-svn: 23358
2005-09-14 21:13:50 +00:00
Chris Lattner
c19f24f3d7
Check that operands have unique names. REJECT instructions with broken operand
...
lists: only don't parse them if they are entirely missing (sparcv9).
llvm-svn: 23355
2005-09-14 21:05:02 +00:00
Chris Lattner
3cbcb9f5d6
fix a broke range check
...
llvm-svn: 23354
2005-09-14 21:04:12 +00:00
Chris Lattner
a5ba887c02
Parse significantly more of the instruction pattern, now collecting and
...
verifying information about the operands.
llvm-svn: 23353
2005-09-14 20:53:42 +00:00
Chris Lattner
901ddab7b1
Verify that set destinations occur first in the instruction operand list.
...
llvm-svn: 23351
2005-09-14 18:19:25 +00:00
Chris Lattner
76f1dae1af
add an accessor
...
llvm-svn: 23349
2005-09-14 18:02:53 +00:00
Chris Lattner
72cfebc71b
remove some code that isn't ready for prime time
...
llvm-svn: 23346
2005-09-14 06:03:10 +00:00
Chris Lattner
c4ae94aa32
Switch to a slightly more structured representation for instructions
...
llvm-svn: 23345
2005-09-14 04:03:16 +00:00
Chris Lattner
77cc161bd5
Add some more checking/verification code
...
llvm-svn: 23344
2005-09-14 02:11:12 +00:00
Chris Lattner
9ab561788e
start parsing instructions into patterns, start doing many more checks of
...
'set's.
llvm-svn: 23343
2005-09-14 00:09:24 +00:00
Chris Lattner
e2591652a2
don't emit the namespace inside the class!
...
llvm-svn: 23341
2005-09-13 22:05:02 +00:00
Chris Lattner
1da656efd4
Emit code suitable for emission into the ISel class, allowing us to use/define
...
methods.
llvm-svn: 23340
2005-09-13 22:03:37 +00:00
Chris Lattner
9bb7fff501
continue xform function parsing
...
llvm-svn: 23338
2005-09-13 21:59:15 +00:00
Chris Lattner
abc740453c
Start parsing node transformation information
...
llvm-svn: 23337
2005-09-13 21:51:00 +00:00
Chris Lattner
0dd99c9aaf
Add a new Record::getValueAsCode method to mirror the other getValueAs*
...
methods. Use it to simplify some code.
llvm-svn: 23336
2005-09-13 21:44:28 +00:00
Chris Lattner
4e59482982
completely eliminate TreePattern::PatternType
...
llvm-svn: 23335
2005-09-13 21:20:49 +00:00
Chris Lattner
773456a944
Regenerate
...
llvm-svn: 23311
2005-09-12 05:30:06 +00:00
Chris Lattner
8b34f3d20d
Rearrange two rules, which apparently makes some versions of bison happier.
...
llvm-svn: 23310
2005-09-12 05:29:43 +00:00
Jeff Cohen
7e6b5c60fc
Fix miscellaneous Visual Studio build problems.
...
llvm-svn: 23307
2005-09-10 02:00:02 +00:00
Chris Lattner
ada7ac14a1
add an accessor to provide more checking
...
llvm-svn: 23289
2005-09-09 01:15:01 +00:00
Chris Lattner
2490f8f606
use new accessors to simplify code. Add checking to make sure top-level instr
...
definitions are void
llvm-svn: 23288
2005-09-09 01:11:44 +00:00
Chris Lattner
2b656c6102
add some accessors
...
llvm-svn: 23287
2005-09-09 01:11:17 +00:00
Chris Lattner
334e21eb98
Fix incorrect comment
...
llvm-svn: 23285
2005-09-08 23:26:30 +00:00
Chris Lattner
a6d21c974c
Implement a complete type inference system for dag patterns, based on the
...
constraints defined in the DAG node definitions in the .td files. This
allows us to infer (and check!) the types for all nodes in the current
ppc .td file. For example, instead of:
Inst pattern EQV: (set GPRC:i32:$rT, (xor (xor GPRC:i32:$rA, GPRC:i32:$rB), (imm)<<Predicate_immAllOnes>>))
we now fully infer:
Inst pattern EQV: (set:void GPRC:i32:$rT, (xor:i32 (xor:i32 GPRC:i32:$rA, GPRC:i32:$rB), (imm:i32)<<Predicate_immAllOnes>>))
from: (set GPRC:$rT, (not (xor GPRC:$rA, GPRC:$rB)))
llvm-svn: 23284
2005-09-08 23:22:48 +00:00
Chris Lattner
e2fb8f3a77
Compute the value types that are natively supported by a target.
...
llvm-svn: 23282
2005-09-08 21:43:21 +00:00
Chris Lattner
152a72de2c
Parse information about type constraints on SDNodes
...
llvm-svn: 23281
2005-09-08 21:27:15 +00:00
Chris Lattner
ef07fffe37
use node info in the one place we currently use it
...
llvm-svn: 23280
2005-09-08 21:04:46 +00:00
Chris Lattner
d9930002aa
start parsing SDNode info records
...
llvm-svn: 23279
2005-09-08 21:03:01 +00:00
Chris Lattner
515c19f56d
Fix indentation
...
llvm-svn: 23276
2005-09-08 19:47:28 +00:00
Chris Lattner
b07d2cc2eb
regenerate
...
llvm-svn: 23275
2005-09-08 18:48:47 +00:00
Chris Lattner
df9876cdb7
Add support for automatically created anonymous definitions.
...
This implements Regression/TableGen/AnonDefinitionOnDemand.td
llvm-svn: 23274
2005-09-08 18:48:23 +00:00
Chris Lattner
9e7e8d43e8
regenerate
...
llvm-svn: 23271
2005-09-08 18:22:57 +00:00
Chris Lattner
2e3ed074d8
Tabs to spaces.
...
llvm-svn: 23270
2005-09-08 18:22:35 +00:00
Chris Lattner
03637c7200
Keep names even when inlining. This allows us to realize that ADDI is:
...
(set GPRC:i32:$rD, (add GPRC:i32:$rA, (imm)<<Predicate_immSExt16>>:$imm))
not:
(set GPRC:i32:$rD, (add GPRC:i32:$rA, (imm)<<Predicate_immSExt16>>))
(we keep the ":$imm")
llvm-svn: 23269
2005-09-08 17:45:12 +00:00
Chris Lattner
65c98b6441
Initial cut of the dag isel generator. This is still very much a work in
...
progress. It correctly parses instructions and pattern fragments and glues
together pattern fragments into instructions.
The only code it generates currently is some boilerplate code for things
like the EntryNode.
llvm-svn: 23261
2005-09-07 23:44:43 +00:00
Chris Lattner
b529b1bdbd
Rename a class. These files are being migrated to the new isel and I want to
...
reuse the names
llvm-svn: 23252
2005-09-06 22:51:34 +00:00
Chris Lattner
f12074e8f6
regenerate
...
llvm-svn: 23249
2005-09-06 21:23:27 +00:00
Chris Lattner
5cd3a27513
Tighten up the specification to allow TableGen/nested-comment.td to pass
...
(fixing a bug where / in a /* */ comment would cause it to not close).
llvm-svn: 23248
2005-09-06 21:23:09 +00:00
Chris Lattner
12c57505bf
Add an option and stuff implementation of a dag isel emitter
...
llvm-svn: 23236
2005-09-03 01:14:03 +00:00