1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
Commit Graph

482 Commits

Author SHA1 Message Date
Chris Lattner
be28034223 Adjust to new form of handling lexer dependencies, this way shouldn't have
the problems the old way did.

llvm-svn: 26161
2006-02-14 05:13:13 +00:00
Evan Cheng
e8a0e56482 Call InsertISelMapEntry rather than map insertion operator to prevent overly
aggrssive inlining. This reduces Select_store frame size from 24k to 10k.

llvm-svn: 26095
2006-02-09 22:12:27 +00:00
Evan Cheng
fd9315eaaa Match getTargetNode() changes (now returns SDNode* instead of SDOperand).
llvm-svn: 26084
2006-02-09 07:16:09 +00:00
Evan Cheng
521e5a1bfe Change Select() from
SDOperand Select(SDOperand N);
to
void Select(SDOperand &Result, SDOperand N);

llvm-svn: 26067
2006-02-09 00:37:58 +00:00
Evan Cheng
0ff5d88abd Hoist all SDOperand declarations within a Select_{opcode}() to the top level
to reduce stack memory usage. This is intended to work around the gcc bug.

llvm-svn: 26026
2006-02-07 00:37:41 +00:00
Chris Lattner
cf81cdcf95 Add support for modifier strings in machine instr descriptions. This allows
us to avoid creating lots of "Operand" types with different printers, instead
we can fold several together and use modifiers.  For example, we can now use:

${target:call} to say that the operand should be printed like a 'call' operand.

llvm-svn: 26024
2006-02-06 23:40:48 +00:00
Chris Lattner
232dd5c069 Simplify the variant handling code, no functionality change.
llvm-svn: 26023
2006-02-06 22:43:28 +00:00
Evan Cheng
2af9230f1e At the end of isel, select a replacement node for each handle that does not
have one. This can happen if a load's real uses are dead (i.e. they do not
have uses themselves).

llvm-svn: 26014
2006-02-06 08:12:55 +00:00
Evan Cheng
6f1778d4e1 Name change.
llvm-svn: 26013
2006-02-06 06:03:35 +00:00
Evan Cheng
09b5e544a9 Handle HANDLENODE: just return itself.
llvm-svn: 26011
2006-02-05 08:46:14 +00:00
Evan Cheng
0b5d4a10a9 Allow more loads to be folded which were previously prevented from happening
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
2006-02-05 06:43:12 +00:00
Evan Cheng
d5d3d7ad9e Re-committing the last bit of change. It shouldn't break PPC this time.
llvm-svn: 25982
2006-02-05 05:22:18 +00:00
Chris Lattner
951217976d Temporarily revert the last change, which breaks PPC and other targets that
DO select things.

llvm-svn: 25970
2006-02-04 09:23:06 +00:00
Evan Cheng
6a366c5eda Complex pattern's custom matcher should not call Select() on any operands.
Select them afterwards if it returns true.

llvm-svn: 25968
2006-02-04 08:50:49 +00:00
Chris Lattner
21f305febf node predicates add to the complexity of a pattern. This ensures that the
X86 backend attempts to match small-immediate versions of instructions before
the full size immediate versions.

llvm-svn: 25937
2006-02-03 18:06:02 +00:00
Evan Cheng
7c8bab62e5 (store (op (load ...))) folding problem. In the generated matching code,
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
2006-02-03 06:22:41 +00:00
Chris Lattner
c9a001a67d add a note, ya knoe
llvm-svn: 25880
2006-02-01 19:12:23 +00:00
Evan Cheng
efdfb534a7 If a pattern's root node is a constant, its size should be 3 rather than 2.
llvm-svn: 25870
2006-02-01 06:06:31 +00:00
Chris Lattner
8d9da62be7 implement test/Regression/TableGen/DagIntSubst.ll
llvm-svn: 25836
2006-01-31 06:02:35 +00:00
Chris Lattner
b7616b85bc simplify some code
llvm-svn: 25791
2006-01-29 20:01:35 +00:00
Andrew Lenharth
1ba3cfd622 it is nice not to chop off bits for those blessed with lots of bits
llvm-svn: 25766
2006-01-29 05:22:37 +00:00
Andrew Lenharth
fde505e9f5 make the casts actually cast to the variable type
llvm-svn: 25765
2006-01-29 05:17:22 +00:00
Andrew Lenharth
896015b24f start of the 64bit safety cleanup
llvm-svn: 25764
2006-01-29 05:07:04 +00:00
Chris Lattner
024ea8e7ca Emit series of conditionals with &&, emitting stuff like this:
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
2006-01-29 04:41:05 +00:00
Chris Lattner
8624868903 Factor matching code that is common between patterns. This works around
GCC not jump-threading across this common code, and produces far nicer
output.

llvm-svn: 25762
2006-01-29 04:25:26 +00:00
Chris Lattner
f94049edf9 Split out code generation from analysis from emission
llvm-svn: 25759
2006-01-29 02:57:39 +00:00
Chris Lattner
6be3b584f4 move some code around, no change in the generated code
llvm-svn: 25758
2006-01-29 02:43:35 +00:00
Chris Lattner
3cdfba635c now that we have control over emission of the code, emit the code using nested
"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
2006-01-28 20:43:52 +00:00
Chris Lattner
b6fc7b5e71 Change PatternCodeEmitter to emit code into a buffer instead of emitting it
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
2006-01-28 20:31:24 +00:00
Chris Lattner
d9026d62f8 Fit to 80 columns, no functionality change
llvm-svn: 25752
2006-01-28 19:06:51 +00:00
Jeff Cohen
96bb922537 Teach tablegen to generate code that is VC++ warning-free.
llvm-svn: 25709
2006-01-27 22:22:28 +00:00
Evan Cheng
450fcb1d91 (store (op (load ...)), ...)
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
2006-01-27 22:13:45 +00:00
Evan Cheng
77885c204d Subtarget feature can now set any variable to any value
llvm-svn: 25678
2006-01-27 08:09:42 +00:00
Chris Lattner
df97630390 Use printInlineAsm to, well, print inline asm's.
llvm-svn: 25677
2006-01-27 02:10:50 +00:00
Chris Lattner
cc5d4e56f0 PHI and INLINEASM are now builtin instructions provided by Target.td
llvm-svn: 25673
2006-01-27 01:45:06 +00:00
Chris Lattner
c3d295a47c If we want to emit things in enum order, use getInstructionsByEnumValue to
get the order, don't compute it ourselves.

Don't emit stuff like (14<<0), emit 14 instead.

Don't attempt to get target properties for builtin instructions.

llvm-svn: 25672
2006-01-27 01:44:09 +00:00
Chris Lattner
a932c5aafb There is at least a 'noitinerary' itinerary now
llvm-svn: 25671
2006-01-27 01:41:55 +00:00
Chris Lattner
1ec0a10fed Don't emit JIT code for these instructions
llvm-svn: 25669
2006-01-27 01:39:38 +00:00
Chris Lattner
0ee2c3b109 Teach the dag selectors to select InlineAsm nodes.
Aren't we happy the pattern selectors are almost all gone?

llvm-svn: 25666
2006-01-26 23:08:55 +00:00
Evan Cheng
8b6fb0763c Another folding problem: if a node r/w chain or flag, don't fold it if it
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
2006-01-26 19:13:45 +00:00
Evan Cheng
37d647c562 Add a FIXME comment.
llvm-svn: 25635
2006-01-26 02:13:31 +00:00
Evan Cheng
849d522805 Incoming (and optional) flag bugs. They may be embedded inside a inner node of
a pattern. Also, nodes which take incoming flag should not be folded if it has
more than one use.

llvm-svn: 25627
2006-01-26 00:22:25 +00:00
Evan Cheng
dd2ee4821a Fix an optional in flag bug.
llvm-svn: 25590
2006-01-24 20:46:50 +00:00
Evan Cheng
1f68845c8c Optional InFlag was not being included in node.
llvm-svn: 25588
2006-01-24 20:07:38 +00:00
Evan Cheng
d3713a9b9a Prevent folding of a node with multiple uses if the node already folds a load!
Here is an example where the load ended up being done twice:

%A = global uint 0

uint %test(uint %B, ubyte %C) {
	%tmp = load uint *%A;
	%X = shl uint %tmp, ubyte %C
	%Cv = sub ubyte 32, %C
	%Y = shr uint %B, ubyte %Cv
	%Z = or uint %Y, %X
	store uint %Z, uint* %A
	ret uint %Z
}

==>

	subl $4, %esp
	movl %ebx, (%esp)
	movl 8(%esp), %edx
	movl A, %eax
	movb 12(%esp), %bl
	movb %bl, %cl
	shldl %cl, %edx, %eax
	movb %bl, %cl
	shldl %cl, %edx, A
	movl (%esp), %ebx
	addl $4, %esp
	ret

llvm-svn: 25471
2006-01-20 01:11:03 +00:00
Evan Cheng
4a3ee9d5a6 Bug fix. Flag operand number may be calculated incorrectly.
llvm-svn: 25465
2006-01-19 21:57:10 +00:00
Evan Cheng
f168c680e5 Use pattern information to determine whether the use expects this
instruction to produce a result. e.g MUL8m, the instruction does not
produce a explicit result. However it produces an implicit result in
AL which would be copied to a temp. The root operator of the matching
pattern is a mul so the use would expect it to produce a result.

llvm-svn: 25458
2006-01-19 10:12:58 +00:00
Evan Cheng
49fa8f2cea Prevent unnecessary CopyToReg when the same HW register appears in two spots
in the pattern.

llvm-svn: 25437
2006-01-19 01:55:45 +00:00
Chris Lattner
6efb726290 fix a broken comment
llvm-svn: 25411
2006-01-17 21:31:18 +00:00
John Criswell
ab12f83120 Regenerated the Lex and Yacc output files on Linux. It seems that our
Linux machines don't like the source code generated on MacOS X for some
reason.

llvm-svn: 25394
2006-01-17 17:01:34 +00:00
Evan Cheng
e840301269 Emit a type matching check for ComplexPatterns.
llvm-svn: 25392
2006-01-17 07:36:41 +00:00
Evan Cheng
ddc62a9b61 Type inferencing bug
llvm-svn: 25337
2006-01-15 10:04:45 +00:00
Evan Cheng
dc7ec6c63e Allow transformation from GlobalAddress to TargetGlobalAddress and
ExternalSymbol to TargetExternalSymbol.

llvm-svn: 25252
2006-01-12 19:35:54 +00:00
Evan Cheng
bbe910088d GlobalAddress -> TargetGlobalAddress; ExternalSymbol -> TargetExternalSymbol
llvm-svn: 25245
2006-01-12 07:54:57 +00:00
Evan Cheng
5fa1397b29 Some minor fixes.
llvm-svn: 25227
2006-01-11 22:16:13 +00:00
Chris Lattner
4e465047c1 Always select target registers to themselves
llvm-svn: 25218
2006-01-11 19:52:27 +00:00
Chris Lattner
0343518492 Emit an error instead of an assertion if trying to do bogus things in result patterns.
llvm-svn: 25194
2006-01-11 01:33:49 +00:00
Robert Bocchino
9a57550e4e Added support for the extractelement operation.
llvm-svn: 25181
2006-01-10 19:05:34 +00:00
Evan Cheng
7b8f8c317e * Remove instruction fields hasInFlag / hasOutFlag and added SNDPInFlag and
SNDPOutFlag to DAG nodes. These properties do not belong to target specific
instructions.
* Added DAG node property SNDPOptInFlag. It's same as SNDPInFlag except it's
optional. Used by ret / call, etc.

llvm-svn: 25154
2006-01-09 18:27:06 +00:00
Evan Cheng
353958d60c Pattern complexity calculation fix.
llvm-svn: 25133
2006-01-06 22:19:44 +00:00
Evan Cheng
1d376c6eb2 Tweak pattern complexity calc.
llvm-svn: 25122
2006-01-06 02:30:23 +00:00
Evan Cheng
c6ad7a02a8 Bug fix wrt chain operand.
llvm-svn: 25115
2006-01-06 00:41:12 +00:00
Jeff Cohen
2230844c7b Replace fix with one less disruptive to the original code.
Also note that GCC 4.1 also correctly flags the syntax error.

llvm-svn: 25076
2006-01-04 03:23:30 +00:00
Jeff Cohen
8c5173a440 Tblgen was generating syntactically illegal C++ code like:
SDOperand Tmp0,Tmp1,Tmp2,Tmp3,;

GCC has a bug (24907) in which is fails to catch this, but VC++ correctly
notes its illegality, so tblgen must be taught to only generate legal C++.

llvm-svn: 25075
2006-01-04 03:15:19 +00:00
Chris Lattner
5a6761490a Remove obsolete comment, make things look a bit nicer
llvm-svn: 25070
2006-01-04 00:32:01 +00:00
Chris Lattner
ae035f3604 reduce stack usage of the recursive SelectCode function by out-lining each
case of the switch statement into its own method.

llvm-svn: 25069
2006-01-04 00:25:00 +00:00
Chris Lattner
f6418363ba Remove my previous ugly hack that tries to reduce the stack space usage
of SelectCode to make way for a better solution.

llvm-svn: 25068
2006-01-03 22:55:16 +00:00
Duraid Madina
d3cf232a4f HP-UX DVDs are crunchy and good to eat
llvm-svn: 25052
2005-12-30 16:41:48 +00:00
Duraid Madina
c4a1bfd13d almost got the HP-UX tester up.. :)
llvm-svn: 25051
2005-12-30 14:56:37 +00:00
Nate Begeman
ec7c28a28c Add support for generating v4i32 altivec code
llvm-svn: 25046
2005-12-30 00:12:56 +00:00
Duraid Madina
d63b3a13cc This gets most of the backends building with HP HappyC++.
llvm-svn: 25029
2005-12-27 10:56:22 +00:00
Evan Cheng
231b11ba87 Added field noResults to Instruction.
Currently tblgen cannot tell which operands in the operand list are results so
it assumes the first one is a result. This is bad. Ideally we would fix this
by separating results from inputs, e.g. (res R32:$dst),
(ops R32:$src1, R32:$src2). But that's a more distruptive change. Adding
'let noResults = 1' is the workaround to tell tblgen that the instruction does
not produces a result. It works for now since tblgen does not support
instructions which produce multiple results.

llvm-svn: 25017
2005-12-26 09:11:45 +00:00
Duraid Madina
b8be651393 more standards-compliance stuff
llvm-svn: 25014
2005-12-26 05:08:55 +00:00
Andrew Lenharth
b42cc57048 support targetexternalsym
llvm-svn: 25005
2005-12-24 23:36:59 +00:00
Evan Cheng
bd79f871a2 * Support for hasInFlag and hasOutFlag (on instructions). Remove nameless FLAG
support which is fragile.
* Fixed a number of bugs.

llvm-svn: 24996
2005-12-23 22:11:47 +00:00
Chris Lattner
d752db6276 silence some bogus gcc warnings
llvm-svn: 24962
2005-12-22 20:37:36 +00:00
Evan Cheng
b18b8c847f Attempt to fix a crash on WIN32.
llvm-svn: 24936
2005-12-22 02:35:21 +00:00
Evan Cheng
578fad3f9d * Added support for FLAG - a special nameless flag register. Can be used as
either an operand or a result.
* Fixed some more flag / chain bugs.

llvm-svn: 24933
2005-12-22 02:24:50 +00:00
Evan Cheng
3b09247bb9 Allows instructions which no explicit operands. e.g. X86 RET which has but
an implicit flag operand.

llvm-svn: 24916
2005-12-21 20:20:49 +00:00
Chris Lattner
643e6c2b9e Eliminate some GCC warnings from the generated code
llvm-svn: 24897
2005-12-21 05:31:05 +00:00
Evan Cheng
4106feae54 Fix the semantic of Requires<[cond]> to mean if (!cond) goto PXXFail;
llvm-svn: 24883
2005-12-20 20:08:01 +00:00
Chris Lattner
28cf136707 This ugly patch works around a GCC bug where it is compiling SelectCode to
use too much stack space, overflowing the stack for large functions.  Instead
of emitting new SDOperands in each match block, we emit some common ones at
the top of SelectCode then reuse them when possible.

This reduces the stack size of SelectCode from 28K to 21K.  Note that GCC
compiles it to 512 bytes :-/

I've filed GCC PR 25505 to track this.

llvm-svn: 24882
2005-12-20 19:41:03 +00:00
Evan Cheng
98c6b52236 Now support instructions with implicit write to non-flag registers.
llvm-svn: 24878
2005-12-20 07:37:41 +00:00
Evan Cheng
63d897b0e2 Lefted out a fix in the previous check in.
llvm-svn: 24873
2005-12-20 00:06:17 +00:00
Evan Cheng
e93635d0ac Fix another bug related to chain / flag.
llvm-svn: 24868
2005-12-19 22:40:04 +00:00
Evan Cheng
c56f9824db Fixes for a number of bugs: save flag results in CodeGenMap, folded chains
may not all have ResNo == 0.

llvm-svn: 24858
2005-12-19 07:18:51 +00:00
Chris Lattner
abadc27396 Handle basic block nodes
llvm-svn: 24833
2005-12-18 21:05:44 +00:00
Chris Lattner
5dfbcbb8be More fixes for Selection of copyto/fromreg with a flag
llvm-svn: 24829
2005-12-18 15:45:51 +00:00
Chris Lattner
5322894560 Select copytoreg and copyfromreg nodes that have flag operands correctly.
llvm-svn: 24827
2005-12-18 15:28:25 +00:00
Evan Cheng
54695fd38d Support for read / write from explicit registers with FlagVT type.
llvm-svn: 24753
2005-12-17 01:19:28 +00:00
Evan Cheng
297c23d2e7 Added support to specify predicates.
llvm-svn: 24715
2005-12-14 22:02:59 +00:00
Evan Cheng
81f4683257 Skip over srcvalue nodes when generating ISEL code.
llvm-svn: 24704
2005-12-14 02:21:57 +00:00
Evan Cheng
518610154b Bug fix: CodeGenMap[N] = ... -> CodeGenMap[N.getValue(0)] = ...
llvm-svn: 24680
2005-12-12 23:45:21 +00:00
Evan Cheng
1bc6443c22 At top of generated isel SelectCode() is this:
if (!N.Val->hasOneUse()) {
    std::map<SDOperand, SDOperand>::iterator CGMI = CodeGenMap.find(N);
    if (CGMI != CodeGenMap.end()) return CGMI->second;
  }

Suppose a DAG like this:

           X
         ^   ^
        /     \
      USE1    USE2

Suppose USE1 is being selected first and during which X is selected and
returned a new node. After this, USE1 is no longer an use of X. During USE2
selection, X will be selected again since it has only one use!

The fix is to always query CodeGenMap.

llvm-svn: 24679
2005-12-12 23:22:48 +00:00
Evan Cheng
e7f40a3b8b Bug fix: finding the correct incoming chain for pattern with nested src operand. And a minor change to make output code slightly more readible.
llvm-svn: 24669
2005-12-12 19:37:43 +00:00
Nate Begeman
a0e26b25f4 Add support for TargetConstantPool nodes to the dag isel emitter, and use
them in the PPC backend, to simplify some logic out of Select and
SelectAddr.

llvm-svn: 24657
2005-12-10 02:36:00 +00:00
Evan Cheng
c8ebe5f6eb Stop emitting a redudant type check for complex pattern node.
llvm-svn: 24655
2005-12-10 01:57:33 +00:00
Evan Cheng
8300ae66d1 For instructions which produce no result, e.g. store, chain's Resno == 0.
llvm-svn: 24652
2005-12-10 00:09:17 +00:00
Chris Lattner
aaec1f6faa Add a new SDTCisPtrTy constraint, which indicates that an operand must have
the same type as the pointer type for a target.

llvm-svn: 24649
2005-12-09 22:57:42 +00:00
Evan Cheng
9586e87904 * Do not allow nodes which produce chain results (e.g. loads) to be folded if
it has more than one real use (non-chain uses).
* Record folded chain producing node in CodeGenMap.
* Do not fold a chain producing node if it has already been selected as an
  operand of a chain use.

llvm-svn: 24647
2005-12-09 22:45:35 +00:00
Evan Cheng
18134d8c96 Prevent folding of instructions which produce chains that have more than 1 real use
llvm-svn: 24643
2005-12-09 06:06:08 +00:00
Evan Cheng
1d7435f478 * Make sure complex pattern operands are selected first since their select
functions can return false and causing the instruction pattern match to fail.
* Code clean up.

llvm-svn: 24642
2005-12-09 00:48:42 +00:00
Evan Cheng
ed205f20a5 * Added an explicit type field to ComplexPattern.
* Renamed MatchingNodes to RootNodes.

llvm-svn: 24636
2005-12-08 02:14:08 +00:00
Evan Cheng
d11d31e0bd Added support for ComplexPattern. These are patterns that require C++ pattern
matching code that is not currently auto-generated by tblgen, e.g. X86
addressing mode. Selection routines for complex patterns can return multiple operands, e.g. X86 addressing mode returns 4.

llvm-svn: 24634
2005-12-08 02:00:36 +00:00
Evan Cheng
3d51fa3305 * Infer instruction property hasCtrlDep from pattern if it has one.
* Fixed a bug related to hasCtrlDep property use.

llvm-svn: 24610
2005-12-05 23:08:55 +00:00
Chris Lattner
8ef7c0297c Implement PR673: for explicit register references, use type information
if available

llvm-svn: 24597
2005-12-05 02:36:37 +00:00
Chris Lattner
e64b6d64d0 Add some methods
llvm-svn: 24596
2005-12-05 02:35:08 +00:00
Chris Lattner
5c7d4632f6 Generate code to silence bogus GCC warnings.
llvm-svn: 24593
2005-12-05 00:48:51 +00:00
Evan Cheng
cf4f349880 * Commit the fix (by Chris) for a tblgen type inferencing bug.
* Enhanced tblgen to handle instructions which have chain operand and writes a
chain result.
* Enhanced tblgen to handle instructions which produces no results. Part of
the change is a temporary hack which relies on instruction property (e.g.
isReturn, isBranch). The proper fix would be to change the .td syntax to
separate results dag from ops dag.

llvm-svn: 24587
2005-12-04 08:18:16 +00:00
Nate Begeman
811a41a87c Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.

llvm-svn: 24563
2005-12-01 04:51:06 +00:00
Evan Cheng
9c3508e1ab Teach tblgen to accept register source operands in patterns, e.g.
def SHL8rCL  : I<0xD2, MRM4r, (ops R8 :$dst, R8 :$src),
                 "shl{b} {%cl, $dst|$dst, %CL}",
                 [(set R8:$dst, (shl R8:$src, CL))]>, Imp<[CL],[]>;

This generates a CopyToReg operand and added its 2nd result to the shl as
a flag operand.

llvm-svn: 24557
2005-12-01 00:18:45 +00:00
Nate Begeman
b79a074c0a Nuke CodeGenInstruction's ValueType member, it is no longer used.
llvm-svn: 24556
2005-12-01 00:12:04 +00:00
Nate Begeman
466eaefd38 Stop checking the ValueType of the CodeGenInstruction. Instead, use the
ValueType from the RegisterClass or Operands.  This step is necessary to
allow RegisterClasses to have multiple ValueTypes.

llvm-svn: 24555
2005-12-01 00:06:14 +00:00
Nate Begeman
3935bea6c1 fit into 80 columns
llvm-svn: 24554
2005-11-30 23:58:18 +00:00
Chris Lattner
7678189bc6 Make the code generated by tblgen return the result of SelectNodeTo, to
permit future changes.

llvm-svn: 24553
2005-11-30 23:08:45 +00:00
Nate Begeman
84be54b731 No longer track value types for asm printer operands, and remove them as
an argument to every operand printing function.  Requires some slight
tweaks to x86, the only user.

llvm-svn: 24541
2005-11-30 18:54:35 +00:00
Nate Begeman
ed43f5159f Fix some copy and paste typos.
llvm-svn: 24540
2005-11-30 18:37:14 +00:00
Evan Cheng
5395a80640 Better error message when unrecognized opcode is seen.
llvm-svn: 24519
2005-11-29 18:44:58 +00:00
Nate Begeman
e4d7c1b7dd Add the new vector types to tablegen
llvm-svn: 24514
2005-11-29 06:19:38 +00:00
Chris Lattner
3727cc7ac0 Initialize this variable on all paths, fixing a crasher in windows. Thanks
to JeffC for pointing this out.

llvm-svn: 24426
2005-11-19 07:48:33 +00:00
Chris Lattner
a36ad00a9a Teach tblgen about instruction operands that have multiple MachineInstr
operands, digging into them to find register values (used on X86).  Patch
by Evan Cheng!

llvm-svn: 24424
2005-11-19 07:05:57 +00:00
Chris Lattner
6b83dcf750 Validate that the input to 'Pat' patterns is sane.
llvm-svn: 24393
2005-11-17 17:43:52 +00:00
Chris Lattner
464f4402cf teach tblgen to be smart enough to handle tglobaladdr nodes
llvm-svn: 24391
2005-11-17 07:39:45 +00:00
Chris Lattner
b545ab1ac1 fix a tblgen bug that Evan ran into, where we would lose the '$src' name
on patterns like "(set R32:$dst, (i32 imm:$src))"

llvm-svn: 24383
2005-11-16 23:14:54 +00:00
Jim Laskey
42681c1d58 1. Remove ranges from itinerary data.
2. Tidy up the subtarget emittined code.

llvm-svn: 24172
2005-11-03 22:47:41 +00:00
Chris Lattner
5a4c453d60 Reject integer literals that are out of range for their type.
llvm-svn: 24162
2005-11-03 05:46:11 +00:00
Chris Lattner
e3897f6c24 Add support for immediates directly in the pattern, this allows itanium to
define:

def : Pat<(i1 1), (CMPEQ r0, r0)>;

llvm-svn: 24149
2005-11-02 06:49:14 +00:00
Jim Laskey
4cb1e29b27 Allow itineraries to be passed through the Target Machine.
llvm-svn: 24139
2005-11-01 20:06:59 +00:00
Jeff Cohen
1a0261fe4f Keep VC++ happy.
llvm-svn: 24137
2005-11-01 18:04:06 +00:00
Jim Laskey
1c66d7fb02 Emit itinerary class in instruction info.
llvm-svn: 24122
2005-10-31 17:16:46 +00:00
Jim Laskey
d79749c8a5 Generate cpu to itinerary map.
llvm-svn: 24121
2005-10-31 17:16:01 +00:00
Chris Lattner
9fd7ba3c84 Make negative immediates in patterns work correctly, silence some warnings
building the itanium backend.

llvm-svn: 24095
2005-10-29 16:39:40 +00:00
Chris Lattner
d44a96088b Switch more code over to using getValueAsListOfDefs. Look at all the -'s. :)
llvm-svn: 24074
2005-10-28 22:59:53 +00:00
Chris Lattner
06c5e018ef Rename Record::getValueAsListDef to getValueAsListOfDefs, to more accurately
reflect what it is.
Convert some more code over to use it.

llvm-svn: 24072
2005-10-28 22:49:02 +00:00
Chris Lattner
dea00d4a37 Use the new interface Jim added
llvm-svn: 24071
2005-10-28 22:43:25 +00:00
Jim Laskey
b86d73937d Removed Mr. Smith from the code.
llvm-svn: 24070
2005-10-28 21:47:29 +00:00
Jim Laskey
7bfb35c1ef 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
dba6376b92 Add some commentary.
llvm-svn: 24055
2005-10-28 15:20:43 +00:00
Jeff Cohen
744bfe72c0 Keep Visual Studio happy.
llvm-svn: 24052
2005-10-28 01:43:09 +00:00
Jim Laskey
1910cbd4dc Now generating instruction itineraries for scheduling. Not my best work, but...
llvm-svn: 24050
2005-10-27 19:47:21 +00:00
Jim Laskey
75494b3a8b Simplify.
llvm-svn: 24015
2005-10-26 17:49:21 +00:00
Jim Laskey
9ce53d8411 Give full control of subtarget features over to table generated code.
llvm-svn: 24013
2005-10-26 17:30:34 +00:00
Chris Lattner
b462de0868 Condcodes are in the ISD namespace
llvm-svn: 24010
2005-10-26 17:02:02 +00:00
Chris Lattner
acc8e41a83 Add support for CondCode's
llvm-svn: 24008
2005-10-26 16:59:37 +00:00
Chris Lattner
60d02fd01f Emit some boilerplate for targets
llvm-svn: 23983
2005-10-25 20:35:14 +00:00
Jim Laskey
bb03da2612 Refactored to make room for more stuff (scheduling info.)
llvm-svn: 23975
2005-10-25 15:16:36 +00:00
Chris Lattner
ffa72e8d79 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
b621e451ba 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
fbab2de9dd Remove the obsolete instr selector emitter
llvm-svn: 23894
2005-10-23 05:47:52 +00:00
Jim Laskey
f0f90be71c Sort the features and processor lists for the sake of search (and maintainers.)
llvm-svn: 23879
2005-10-22 07:59:56 +00:00