Misha Brukman
8477eb70ee
Put printouts of acquired patterns under the DEBUG() guard, fixed spelling.
...
llvm-svn: 7723
2003-08-11 15:16:12 +00:00
Chris Lattner
6b5833f7f9
Add full support for code generating expanders!
...
This includes support for referencing named arguments.
llvm-svn: 7715
2003-08-10 23:51:52 +00:00
Chris Lattner
064a7ce4ab
Implement autopromotion of leaf trees from arguments to nodes of their own,
...
making it easier to write patterns without lots of extraneous parens
llvm-svn: 7714
2003-08-10 22:38:36 +00:00
Chris Lattner
b02ea334f3
Implement correct parsing, representation, and printing of DAG argument names
...
Implements testcase TableGen/TreeNames.td
llvm-svn: 7713
2003-08-10 22:14:13 +00:00
Chris Lattner
71108605d3
Recognize $foo as a variable
...
llvm-svn: 7712
2003-08-10 22:04:25 +00:00
Chris Lattner
328e935aa6
Implement real code emission, at least for Instruction patterns,
...
next up: support for expanders
llvm-svn: 7710
2003-08-10 21:54:43 +00:00
Chris Lattner
9392cd389e
First cut at emitting the reducer. This reducer just prints out the patterns
...
selected, but it seems to work great!
llvm-svn: 7709
2003-08-10 20:34:13 +00:00
Chris Lattner
ba61a16a15
Finish the matcher!
...
llvm-svn: 7707
2003-08-10 19:50:51 +00:00
Chris Lattner
d754461205
Add new function
...
llvm-svn: 7706
2003-08-10 19:50:32 +00:00
Chris Lattner
1f87681075
This implements a large amount of the matcher, in fact, all of it except for one bug
...
llvm-svn: 7702
2003-08-08 22:29:23 +00:00
Chris Lattner
f169468353
Emit the first half of the instruction selector.
...
llvm-svn: 7701
2003-08-08 16:30:10 +00:00
Chris Lattner
5f95cc5c26
Finish implementation of nonterminal instantiation.
...
Tree patterns are now, finally, ready to use!
llvm-svn: 7699
2003-08-07 23:16:20 +00:00
Chris Lattner
9226d186a5
Add new method to get a value type as a string
...
llvm-svn: 7698
2003-08-07 23:15:21 +00:00
Misha Brukman
772eedda42
close() requires "unistd.h" .
...
llvm-svn: 7695
2003-08-07 21:35:41 +00:00
Misha Brukman
8e86dd69ec
Doxygen-ify the comments by using '///' instead of '//'.
...
llvm-svn: 7694
2003-08-07 21:34:25 +00:00
Misha Brukman
ca83e0d56b
Remove references to `bugpoint' from the now-generic system utilities.
...
llvm-svn: 7693
2003-08-07 21:33:33 +00:00
Misha Brukman
1e83bc90b9
Moved removeFile() and getUniqueFilename() into FileUtilities.
...
llvm-svn: 7691
2003-08-07 21:28:50 +00:00
Chris Lattner
d7279de40d
Implement type-inference/checking for non-terminal references
...
llvm-svn: 7686
2003-08-07 21:02:56 +00:00
Chris Lattner
578cd4425b
Rename all of the "Process" methods to be "read" methods, start the Instantiate method
...
llvm-svn: 7685
2003-08-07 20:42:23 +00:00
Chris Lattner
096a2cc522
Add support for "cast" nodes, which are required when there is not enough information
...
to infer type type of all nodes, e.g. (ret imm)
llvm-svn: 7684
2003-08-07 19:59:42 +00:00
Chris Lattner
6fc628b98f
Use the new version of isSubClassOf
...
llvm-svn: 7683
2003-08-07 19:42:14 +00:00
Chris Lattner
69b1d7c0d6
Add and use a new method
...
llvm-svn: 7682
2003-08-07 19:41:59 +00:00
Chris Lattner
4d0c647dec
Cleanup and reorganize code, no functional changes
...
llvm-svn: 7679
2003-08-07 19:28:55 +00:00
Chris Lattner
3b511f0c58
Read in expanders too
...
llvm-svn: 7678
2003-08-07 19:21:10 +00:00
Chris Lattner
31b26b9414
Continued evolution of the selector emitter: Represent instruction patterns
...
as first class objects
llvm-svn: 7677
2003-08-07 19:12:24 +00:00
Chris Lattner
2e7d8d61bb
Finish implementation of the type inference engine.
...
Start working on reading in nonterminals
llvm-svn: 7671
2003-08-07 06:02:15 +00:00
Chris Lattner
24cea97f79
Allow clients to get at the pointer type
...
llvm-svn: 7670
2003-08-07 06:01:44 +00:00
Chris Lattner
7f47b0d303
Add new method getVAlueAsDag
...
llvm-svn: 7669
2003-08-07 06:00:43 +00:00
Chris Lattner
8d5ace1eb5
Initial checkin of tree pattern parser and type inference engine (which still needs work).
...
llvm-svn: 7668
2003-08-07 05:40:14 +00:00
Chris Lattner
dc23074e6a
Eliminate now-dead method
...
llvm-svn: 7667
2003-08-07 05:39:37 +00:00
Chris Lattner
8a216b871d
Start using the CodeGeneratorWrappers
...
llvm-svn: 7666
2003-08-07 05:39:09 +00:00
Chris Lattner
26601ab6fa
Initial checkin of useful wrappers around the Target classes, for now, only ValueType and
...
Target are wrapped
llvm-svn: 7665
2003-08-07 05:38:11 +00:00
Chris Lattner
e0deb31fd5
Ick, add the RIGHT accessor
...
llvm-svn: 7656
2003-08-06 23:01:18 +00:00
Chris Lattner
799db97d3d
Add accessor
...
llvm-svn: 7655
2003-08-06 23:00:31 +00:00
Chris Lattner
e5001079d1
There is something wrong with code that looks like:
...
if (R == 0 || ...)
R->getName()
llvm-svn: 7654
2003-08-06 22:29:04 +00:00
Chris Lattner
919d5c465c
Export the register classes so that the instruction selector can get at them as needed
...
llvm-svn: 7651
2003-08-06 21:47:14 +00:00
Misha Brukman
ad7dda52c9
Added asserts to prevent negative shift amounts from being generated.
...
llvm-svn: 7640
2003-08-06 16:28:49 +00:00
Chris Lattner
4671977130
Add error checking code to the node type parser. Start the instruction pattern
...
reader
llvm-svn: 7632
2003-08-06 06:16:35 +00:00
Chris Lattner
6a87b317a2
Initial support for an instruction selector emitter
...
llvm-svn: 7631
2003-08-06 05:42:05 +00:00
Chris Lattner
47f18bb3a1
All good classes with virtual functions should have virtual dtors...
...
llvm-svn: 7630
2003-08-06 05:39:03 +00:00
Chris Lattner
51baaaa269
Add an instruction selector emitter skeleton
...
llvm-svn: 7629
2003-08-06 04:47:56 +00:00
Chris Lattner
0e4fda4b71
convert over to using TableGen backends
...
llvm-svn: 7628
2003-08-06 04:36:35 +00:00
Chris Lattner
2e7568698e
Switch code over to being a TableGenBackend
...
llvm-svn: 7627
2003-08-06 04:32:07 +00:00
Chris Lattner
81a4f321fb
Add more helper methods
...
llvm-svn: 7626
2003-08-06 04:31:26 +00:00
Chris Lattner
a93ef47190
New common interface for backends to use
...
llvm-svn: 7625
2003-08-06 04:23:04 +00:00
Misha Brukman
7452a521b3
Stop special-casing annul and predict bits (which are Sparc-specific anyway)
...
since those bits are now hard-coded in Sparc*.td files.
llvm-svn: 7593
2003-08-05 14:35:35 +00:00
Chris Lattner
8f8fbd7106
No functional changes, comment the fix I just put in
...
llvm-svn: 7590
2003-08-05 03:59:01 +00:00
Chris Lattner
d8cbdc4c67
The CodeEmitterGenerator used to consider ANY uninitialized field as being an
...
operand (unless it's annul or predict). Now we only consider fields to be
operands if they are uninitialized AND used in the "Inst" field.
llvm-svn: 7589
2003-08-05 03:53:04 +00:00
Chris Lattner
11ad73f47e
Parse DAG patterns
...
llvm-svn: 7577
2003-08-04 20:44:43 +00:00
Chris Lattner
3aa9da1f7f
add support for DagInit initializers, which represent DAG patterns
...
llvm-svn: 7576
2003-08-04 20:44:17 +00:00
Chris Lattner
2703e94187
Update file header comment
...
llvm-svn: 7574
2003-08-04 20:08:28 +00:00
Chris Lattner
201fc86380
Transition complete, remove the obsolete 'set' keyword
...
llvm-svn: 7566
2003-08-04 05:04:52 +00:00
Chris Lattner
9a2d2efde6
Start transitioning towards using 'let X = y in' statements, instead of 'set X = y in'.
...
llvm-svn: 7562
2003-08-04 04:56:53 +00:00
Chris Lattner
c1af65d65b
It appears that somehow we forgot to add support for code variables.
...
Fix bug: TableGen/2003-08-03-PassCode.td
llvm-svn: 7561
2003-08-04 04:53:50 +00:00
Chris Lattner
05433f0237
Add initial support for a new 'dag' type
...
llvm-svn: 7559
2003-08-04 04:50:57 +00:00
Chris Lattner
fadbc381f7
Allow registers to specify a custom name
...
llvm-svn: 7548
2003-08-03 22:14:50 +00:00
Chris Lattner
fae79216c2
add new --gen-instr-desc option
...
llvm-svn: 7545
2003-08-03 21:58:28 +00:00
Chris Lattner
293526d393
Add new Record::getValueAsBit method
...
llvm-svn: 7544
2003-08-03 21:58:13 +00:00
Chris Lattner
f96dd9f6eb
Finish the instruction info emitter
...
llvm-svn: 7543
2003-08-03 21:57:51 +00:00
Chris Lattner
57808fae3c
Fix bug: TableGen/IntBitInit.td
...
llvm-svn: 7526
2003-08-03 18:29:51 +00:00
Chris Lattner
72a80806ae
Fix bug: TableGen/BitsInitOverflow.td
...
llvm-svn: 7524
2003-08-03 18:24:34 +00:00
Chris Lattner
3f39b91aea
* Changes to allow lists of any type
...
* Reorganize Target class a bit
* Fix string out of range access bug
llvm-svn: 7520
2003-08-03 18:17:54 +00:00
Chris Lattner
1ac2b1fc64
Changes to allow lists of any type
...
llvm-svn: 7519
2003-08-03 18:17:22 +00:00
Chris Lattner
dbd949c104
expand contraction
...
llvm-svn: 7518
2003-08-03 18:12:59 +00:00
Chris Lattner
a77770863c
Add support for instruction enum emission
...
llvm-svn: 7516
2003-08-03 17:24:20 +00:00
Chris Lattner
b31cc24b40
Initial checkin of Instruction emitter, which just produces enum values so far
...
llvm-svn: 7515
2003-08-03 17:24:10 +00:00
Chris Lattner
4d4ec297c6
Remove dead private:
...
llvm-svn: 7514
2003-08-03 16:30:24 +00:00
Chris Lattner
466bf34821
Make the register numbers line up more frequently
...
llvm-svn: 7508
2003-08-03 15:40:38 +00:00
Chris Lattner
6a31322326
Allow an external 'set' command to set multiple values in the same command.
...
Allow redefinitions of variables as long as they are of the same type.
llvm-svn: 7507
2003-08-03 13:58:01 +00:00
Chris Lattner
49f28ba16a
Finish the register info emitter
...
llvm-svn: 7506
2003-08-03 13:52:02 +00:00
Chris Lattner
3c8273e9ad
Add new method
...
llvm-svn: 7502
2003-08-02 01:27:37 +00:00
Chris Lattner
ef90e1b189
Move debug functionality to Debug.cpp/Debug.h
...
llvm-svn: 7494
2003-08-01 22:15:41 +00:00
Chris Lattner
89bf5d3a60
Describe the value name
...
llvm-svn: 7493
2003-08-01 22:15:15 +00:00
Chris Lattner
64fade1536
DEBUG got moved to Debug.h
...
llvm-svn: 7491
2003-08-01 22:13:59 +00:00
Chris Lattner
aa22e98e56
Check in the implementation of the FileUtilities!
...
llvm-svn: 7487
2003-08-01 21:16:14 +00:00
Chris Lattner
d579de745e
Tablegen should only replace the output if it changes
...
llvm-svn: 7486
2003-08-01 20:35:01 +00:00
Chris Lattner
cba4e65559
Use the C++, more portable, deleter
...
llvm-svn: 7483
2003-08-01 20:29:18 +00:00
Chris Lattner
55c9211b80
Make sure to delete the output file if there is an error
...
llvm-svn: 7481
2003-08-01 19:21:43 +00:00
Chris Lattner
346760c6cb
Move #include from a header to here
...
llvm-svn: 7480
2003-08-01 19:16:29 +00:00
Chris Lattner
a25a717a5e
add support for emitting register classes
...
llvm-svn: 7473
2003-08-01 06:27:59 +00:00
Chris Lattner
6320cb3946
Add new getValueAsListInit and getValueAsInt methods
...
llvm-svn: 7472
2003-08-01 06:15:10 +00:00
Chris Lattner
5d390a3dcf
Add the ability to emit register file enums
...
llvm-svn: 7471
2003-08-01 05:59:20 +00:00
Chris Lattner
c4d544ddd6
Fix the way field bit references are resolved, also allow resolution of field references overall!
...
llvm-svn: 7470
2003-08-01 05:58:58 +00:00
Chris Lattner
97eebed243
Dead code elimination
...
llvm-svn: 7468
2003-08-01 04:47:20 +00:00
Chris Lattner
0177241fa7
Add new getValueAsBitsInit 'high-level' method
...
llvm-svn: 7467
2003-08-01 04:46:24 +00:00
Chris Lattner
fca9789b2c
Add file comment
...
Add register info emitter
Simplify code by using "high-level" methods.
llvm-svn: 7466
2003-08-01 04:39:05 +00:00
Chris Lattner
601f250872
Initial checkin of register info emitter
...
llvm-svn: 7465
2003-08-01 04:38:38 +00:00
Chris Lattner
0fe4e3f82a
Simplify code to match new interfaces
...
llvm-svn: 7464
2003-08-01 04:38:18 +00:00
Chris Lattner
135e8e0151
Switch over to an exception handling model for "high-level" requests.
...
Add new getValueAsString method.
llvm-svn: 7463
2003-08-01 04:37:57 +00:00
Chris Lattner
e83294921c
Minor cleanups
...
llvm-svn: 7462
2003-08-01 04:15:25 +00:00
Chris Lattner
440f33e964
Factor code out into a new getAllDerivedDefinitions method, which is generally useful
...
llvm-svn: 7461
2003-08-01 04:09:58 +00:00
Chris Lattner
5d1a43bb60
Fix the JIT in the Nightly tester. This was not a fun bug to track down.
...
See the comments in the patch for details.
llvm-svn: 7457
2003-07-31 19:38:34 +00:00
Chris Lattner
12defed07e
Trivial cleanups: no need to include header twice. Global variable is local to file
...
llvm-svn: 7456
2003-07-31 19:31:21 +00:00
Chris Lattner
227005d189
More minor cleanups of the interface
...
llvm-svn: 7446
2003-07-31 04:43:49 +00:00
Chris Lattner
1283b2a07c
Rename createEmitter to run because eventually all tablegen backends will
...
be subclasses of a common interface.
llvm-svn: 7445
2003-07-31 04:38:26 +00:00
Chris Lattner
50a3c83896
Add file comment
...
llvm-svn: 7444
2003-07-31 04:37:57 +00:00
Chris Lattner
2ec4944d3a
Tighten up interface
...
llvm-svn: 7443
2003-07-31 04:32:37 +00:00
Chris Lattner
291b42e5ad
Add support for code fragments
...
llvm-svn: 7440
2003-07-30 22:15:58 +00:00
Chris Lattner
36def4610b
Initial support for the 'code' type.
...
llvm-svn: 7439
2003-07-30 21:47:42 +00:00
Chris Lattner
57e07e2448
Move err() to the lexer, implement file inclusion capabilities directly in tblgen
...
llvm-svn: 7436
2003-07-30 20:56:47 +00:00