Commit Graph

248 Commits

Author SHA1 Message Date
Chris Lattner 802bd8d94f Use the new interface Jim added
llvm-svn: 24071
2005-10-28 22:43:25 +00:00
Jim Laskey dffe5978a3 Removed Mr. Smith from the code.
llvm-svn: 24070
2005-10-28 21:47:29 +00:00
Jim Laskey b04feb633f Added method to return a vector of records for a ListInit of Def field. This
simplifies using list of records.

llvm-svn: 24069
2005-10-28 21:46:31 +00:00
Jim Laskey 1959575208 Add some commentary.
llvm-svn: 24055
2005-10-28 15:20:43 +00:00
Jeff Cohen b0aa47b043 Keep Visual Studio happy.
llvm-svn: 24052
2005-10-28 01:43:09 +00:00
Jim Laskey 86f002cc32 Now generating instruction itineraries for scheduling. Not my best work, but...
llvm-svn: 24050
2005-10-27 19:47:21 +00:00
Jim Laskey 777a26efc3 Simplify.
llvm-svn: 24015
2005-10-26 17:49:21 +00:00
Jim Laskey a2b5235fac Give full control of subtarget features over to table generated code.
llvm-svn: 24013
2005-10-26 17:30:34 +00:00
Chris Lattner f277ac7caa Condcodes are in the ISD namespace
llvm-svn: 24010
2005-10-26 17:02:02 +00:00
Chris Lattner 611b0c634c Add support for CondCode's
llvm-svn: 24008
2005-10-26 16:59:37 +00:00
Chris Lattner d980c46f52 Emit some boilerplate for targets
llvm-svn: 23983
2005-10-25 20:35:14 +00:00
Jim Laskey 1b7369b1ae Refactored to make room for more stuff (scheduling info.)
llvm-svn: 23975
2005-10-25 15:16:36 +00:00
Chris Lattner fc9f5773d0 Fix an incompatibility with GCC 4.1, thanks to Vladimir Merzliakov
for pointing this out!

llvm-svn: 23963
2005-10-24 15:04:15 +00:00
Chris Lattner 4f48e67c6c Add the needed #include, emit enums with the sizes of tables, remove
definitions from the LLVM namespace, since they are all static.

llvm-svn: 23907
2005-10-23 22:33:08 +00:00
Chris Lattner 49f7b69997 Remove the obsolete instr selector emitter
llvm-svn: 23894
2005-10-23 05:47:52 +00:00
Jim Laskey a1beea6c7d Sort the features and processor lists for the sake of search (and maintainers.)
llvm-svn: 23879
2005-10-22 07:59:56 +00:00
Jim Laskey 9ed9032e22 Plugin new subtarget backend into the build.
llvm-svn: 23870
2005-10-21 19:05:19 +00:00
Jim Laskey cfda85ad91 New TableGen backends for subtarget information. Only command line stuff
active now.  Scheduling itinerary next.

llvm-svn: 23869
2005-10-21 19:00:04 +00:00
Chris Lattner 8bda5afd91 Make tblgen emit:
tblgen: In ZAPNOTi: Cannot use 'IZAPX' in an input pattern!
for a bad pattern, instead of an ugly assertion.

llvm-svn: 23854
2005-10-21 01:19:59 +00:00
Chris Lattner c9ad735e78 add support for literal immediates in patterns to match, allowing us to
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.
llvm-svn: 23819
2005-10-19 04:41:05 +00:00
Chris Lattner 7f6f565846 Add basic support for integer constants in pattern results.
llvm-svn: 23817
2005-10-19 04:30:56 +00:00
Chris Lattner 2ae2f99326 Fix some checking that was causing duraid to get a perplexing assertion
instead of a happy error message

llvm-svn: 23816
2005-10-19 04:12:14 +00:00
Chris Lattner b8014e10ae Add support for patterns that have physical registers in them. Testcase:
def : Pat<(trunc G8RC:$in),
          (OR8To4 G8RC:$in, X0)>;

Even though this doesn't make any sense on PPC :)

llvm-svn: 23815
2005-10-19 02:07:26 +00:00
Chris Lattner c8f899f98d Asserting here is to violent
llvm-svn: 23814
2005-10-19 01:55:23 +00:00
Chris Lattner 8baf5043a8 Nate wants to define 'Pat's which turn into instructions that don't have
patterns.  Certainly a logical request.

llvm-svn: 23810
2005-10-19 01:27:22 +00:00
Chris Lattner ed653cbe43 Duraid pointed out that it is impolite to emit PPC:: into the IA64 backend
llvm-svn: 23780
2005-10-18 04:41:01 +00:00
Chris Lattner 825298b060 Make the generated code significantly more memory efficient, by using
SelectNodeTo instead of getTargetNode when possible.

llvm-svn: 23758
2005-10-16 01:41:58 +00:00
Chris Lattner 6b22d2554a Implement the last major missing piece in the DAG isel generator: when emitting
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.

llvm-svn: 23748
2005-10-15 21:34:21 +00:00
Chris Lattner c4db8f4163 Now that we have int/fp lattice values, implement the SDTCisOpSmallerThanOp
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.

llvm-svn: 23730
2005-10-14 06:25:00 +00:00
Chris Lattner ecaf56b21a Fairly serious rework of the typing code to add new int/fp lattice values.
Overall, no functionality change yet though.

llvm-svn: 23729
2005-10-14 06:12:03 +00:00
Chris Lattner cdf483556f simplify the code a bit
llvm-svn: 23728
2005-10-14 05:08:37 +00:00
Chris Lattner 4892df38f3 Add basic support for recognizing a new SDTCisOpSmallerThanOp type constraint
llvm-svn: 23725
2005-10-14 04:53:53 +00:00
Chris Lattner 7b0275ba8c Implement a couple of new (important) features.
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.

llvm-svn: 23724
2005-10-14 04:11:13 +00:00
Chris Lattner 90c5b9c83c Do not let getLegalValueTypes return a list with duplicates in it
llvm-svn: 23723
2005-10-14 03:54:49 +00:00
Chris Lattner d4ff3c1324 Emit the value type for each register class.
llvm-svn: 23584
2005-10-02 06:23:37 +00:00
Chris Lattner c9f4219cfc Rename MRegisterDesc -> TargetRegisterDesc for consistency
llvm-svn: 23564
2005-09-30 17:49:27 +00:00
Chris Lattner 3e020bb619 remove some more initializers
llvm-svn: 23562
2005-09-30 17:41:05 +00:00
Chris Lattner ddc69bbbba trim down the target info structs now that we have a preferred spill register class for each callee save register
llvm-svn: 23560
2005-09-30 17:35:22 +00:00
Chris Lattner da6fcc9f49 Compute a preferred spill register class for each callee-save register
llvm-svn: 23553
2005-09-30 06:44:45 +00:00
Chris Lattner 26f5fb1277 Fix a warning
llvm-svn: 23550
2005-09-30 06:09:50 +00:00
Chris Lattner 1916ef75cf Regenerate
llvm-svn: 23549
2005-09-30 04:53:25 +00:00
Chris Lattner b509577605 Refactor this a bit to move ParsingTemplateArgs to only apply to classes,
not defs.

Implement support for forward definitions of classes.  This implements
TableGen/ForwardRef.td.

llvm-svn: 23548
2005-09-30 04:53:04 +00:00
Chris Lattner 20b0e3cee4 Regenerate
llvm-svn: 23546
2005-09-30 04:42:56 +00:00
Chris Lattner ad61925e27 Generate a parse error instead of a checked exception if template args are
used on a def.

llvm-svn: 23545
2005-09-30 04:42:31 +00:00
Chris Lattner 6e60c8fe05 regenerate
llvm-svn: 23543
2005-09-30 04:11:27 +00:00
Chris Lattner e04e1384fc Refactor the grammar a bit to implement TableGen/ForwardRef.td
llvm-svn: 23542
2005-09-30 04:10:49 +00:00
Chris Lattner 2a6fd61dfc allow regs to be in multiple reg classes
llvm-svn: 23540
2005-09-30 01:33:48 +00:00
Chris Lattner 366fe04301 Teach tablegen to reassociate operators when possible. This allows it to
find all of teh pattern matches for EQV from one definition

llvm-svn: 23529
2005-09-29 22:36:54 +00:00
Chris Lattner e86824e57a Teach tblgen to build permutations of instructions, so that the target author
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.

llvm-svn: 23526
2005-09-29 19:28:10 +00:00
Chris Lattner 492e70f4ec add support for an associative marker
llvm-svn: 23502
2005-09-28 20:58:06 +00:00