Commit Graph

1497 Commits

Author SHA1 Message Date
Evan Cheng
fceb57a917 Reduce instruction selection code size and stack frame size by factoring
code that emit target specific nodes into emit functions that are uniquified
and shared among selection routines.
e.g. This reduces X86ISelDAGToDAG.o (release) from ~2M to ~1.5M. Stack frame
size of Select_store from ~13k down to ~8k.
This is the first step. Further work to enable more sharing will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29158 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-15 08:45:20 +00:00
Chris Lattner
fb5115e84c The generated index array should be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29155 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 23:14:02 +00:00
Chris Lattner
6af022f255 Emit the string information for the asm writer as a single large string
and index into it, instead of emitting it like this:

  static const char * const OpStrs[] = {
    "PHINODE\n",        // PHI
    0,  // INLINEASM
    "adc ",     // ADC32mi
    "adc ",     // ADC32mi8
   ...

The old way required thousands of relocations that slows down link time and
dynamic load times.

This also cuts about 10K off each of the X86 asmprinters, and should shrink
the others as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29152 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 22:59:11 +00:00
Patrick Jenkins
79fbf7fe27 Fixed an issue where the user specified gcc was not the gcc we report to the nightly test server.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 20:44:09 +00:00
Jim Laskey
cb12903147 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29137 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 22:17:08 +00:00
Jim Laskey
f1b05bf755 1. Simplfy bit operations.
2. Coalesce instruction cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29135 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 21:02:53 +00:00
Patrick Jenkins
0b7ae54da7 Syntax error. I will run perl -c before commiting perl scripts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29133 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 16:58:42 +00:00
Patrick Jenkins
4bde3bc5ea Fixed some small bugs exposed when trying to get a sparc machine to run the script. Specifically some misnamed variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29132 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 16:56:48 +00:00
Jim Laskey
ed393433d2 Move base value of instruction to lookup table to prepare for case reduction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29122 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-12 19:15:43 +00:00
Jim Laskey
16d42c6ac6 It was pointed out that DEBUG() is only available with -debug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 18:25:13 +00:00
Jim Laskey
e37fe9b3a1 Ensure that dump calls that are associated with asserts are removed from
non-debug build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29105 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 17:58:07 +00:00
Jim Laskey
1406bdab85 Reduce bloat in target libraries by removing per machine instruction assertion
from code emitter generation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29097 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 01:25:59 +00:00
Patrick Jenkins
7267bd6c1a Fixed some output issues where newlines were not being printed after error messages
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29082 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-10 18:35:41 +00:00
Patrick Jenkins
7b4bb60e9a Fixed an issue that tried to cat externalprogramstable.txt from the testresults directory when it doesnt exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29080 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-10 16:36:19 +00:00
Patrick Jenkins
00fbdf1471 Syntax error in NewNightlyTest.pl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29074 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 21:47:24 +00:00
Patrick Jenkins
4c4e356037 Fixed a variable naming issue for the External Program Results table. Also fixed an issue with printing the sent data to a sentdata.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29073 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 21:40:34 +00:00
Patrick Jenkins
215b48f9a8 Updated comments at top of file to reflect relevant command line options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29065 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 18:50:51 +00:00
Patrick Jenkins
a5c04d6806 Added the -noremoveresults option which will not remove the $WebDir from the nightly test runs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29056 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:31:38 +00:00
Patrick Jenkins
b26d39eae5 Fixed variable naming issue that prevented $Prefix-senddata.txt from having any information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29046 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:08:02 +00:00
Chris Lattner
a539c03271 tblgen uses EH
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29034 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 00:21:17 +00:00
Patrick Jenkins
c6d945f91f Fixed a bug that looked for -Warnings.txt and -Tests.txt in ridiculous places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29027 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 22:32:15 +00:00
Patrick Jenkins
fe030d7869 The first commit of NewNightlyTest.pl which instead of generating a webpage submits the results of the test to a central server for storage and display.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29023 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 21:19:32 +00:00
Evan Cheng
322812e603 Ugly hack! Add helper functions InsertInFlightSetEntry and
RemoveInFlightSetEntry. They are used in place of direct set operators to
reduce instruction selection function stack size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28987 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 23:57:05 +00:00
Evan Cheng
2a0f984771 Added -disable-cbe to disable C backend testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28981 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 00:54:37 +00:00
Evan Cheng
14c299ebca Fix -extraflags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28937 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 20:30:28 +00:00
Evan Cheng
6d11ddbd8d Rename EXTRA_FLAGS to EXTRA_OPTIONS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28872 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 18:49:13 +00:00
Chris Lattner
02cdb377ec Fix an error message regression. Print:
LI8:    (LI8:i64 (imm:i64):$imm)
instead of:
  LI8:    (LI8:MVT::i64 (imm:MVT::i64):$imm)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28868 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:56:37 +00:00
Chris Lattner
186fb7d131 Don't require src/dst patterns to be able to fully resolve their types,
because information about one can help refine the other.  This allows us to
write:

def : Pat<(i32 (extload xaddr:$src, i8)),
          (LBZX xaddr:$src)>;

as:

def : Pat<(extload xaddr:$src, i8),
          (LBZX xaddr:$src)>;

because tblgen knows LBZX returns i32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28865 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:31:27 +00:00
Chris Lattner
a354849c27 Make sure to use the result of the pattern to infer the result type of the
instruction, and the result type of the instruction to refine the pattern.
This allows us to write things like this:

def : Pat<(v2i64 (bitconvert (v16i8 VR128:$src))), (v2i64 VR128:$src)>;

as:
def : Pat<(v2i64 (bitconvert (v16i8 VR128:$src))), (VR128:$src)>

and fixes a ppc64 issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28863 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:18:02 +00:00
Chris Lattner
8f60d54fb1 Improve a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28833 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:25:06 +00:00
Evan Cheng
8d3af5e7d0 Instructions with variable operands (variable_ops) can have a number required
operands. e.g.
def CALL32r : I<0xFF, MRM2r, (ops GR32:$dst, variable_ops),
                "call {*}$dst", [(X86call GR32:$dst)]>;
TableGen should emit operand informations for the "required" operands.

Added a target instruction info flag M_VARIABLE_OPS to indicate the target
instruction may have more operands in addition to the minimum required
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 07:22:16 +00:00
Evan Cheng
d7c2c86239 Allow more use of iPTR in patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28790 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 00:16:37 +00:00
Evan Cheng
e945f4d3d4 Added support for variable_ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28788 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 22:22:20 +00:00
Evan Cheng
bc6b86a89e Fix support for optional input flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28784 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 19:27:50 +00:00
Evan Cheng
50c997e26a getOperandNum(): error if specified operand number is out of range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28775 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 21:47:27 +00:00
Chris Lattner
f6dc20fcc0 Add a new -compileflags options, remove old externals location specifiers.
People should just use -with-externals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 19:03:17 +00:00
Chris Lattner
11bcd28dff Wrap to 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 23:59:44 +00:00
Evan Cheng
19fd7ef730 Add -extraflags FLAGS to pass extra compilation options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28707 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 05:28:07 +00:00
Reid Spencer
d386e55e33 Don't build tblgen with -pedantic or -Wno-long-long
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28638 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 18:20:23 +00:00
Evan Cheng
553ef1be94 Can't trust NodeDepth when checking for possibility of load folding creating
a cycle. This increase the search space and will increase compile time (in
practice it appears to be small, e.g. 176.gcc goes from 62 sec to 65 sec)
that will be addressed later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-25 20:16:55 +00:00
Evan Cheng
b0793f9741 Fixed a really ugly bug. The TableGen'd isel is not freeing the "inflight set"
correctly. That is causing non-deterministic behavior (and possibly preventing
some load folding from happening).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28458 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-25 00:21:44 +00:00
Chris Lattner
243be2c80d Don't make zero-sized static arrays
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28448 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:31:02 +00:00
Chris Lattner
d74ea2bbd8 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:04:05 +00:00
Evan Cheng
d15531b430 Now that iPTR is a fully resolved type. We end up losing the type check for
patterns that look like this:

def : Pat<(i32 (X86Wrapper tconstpool  :$dst)), (MOV32ri tconstpool  :$dst)>;

InsertOneTypeCheck should copy the type from the resolved pattern to the
unresolved one as long as there types are different.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28389 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 07:24:32 +00:00
Evan Cheng
21d03f2de0 lib/Target/Target.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28386 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 20:42:07 +00:00
Evan Cheng
764811f145 Don't generate getCalleeSaveReg and getCalleeSaveRegClasses anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 00:08:46 +00:00
Evan Cheng
6b12516f1a Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 20:55:51 +00:00
Evan Cheng
2618d07765 Remove PointerType from target definition. Use abstract type MVT::iPTR to
represent pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28363 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 20:37:59 +00:00
Evan Cheng
44a65fa552 Allow patterns to refer to physical registers that belong to multiple
register classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 07:05:30 +00:00
Reid Spencer
dd73e7fa09 Don't try to reference uninitialized data. Make sure we can find "nm".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28277 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-13 02:48:45 +00:00
Evan Cheng
9812f1ca97 Noop instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28241 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 07:47:00 +00:00
Evan Cheng
d9d4518a86 Unused instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28240 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 07:42:01 +00:00
Evan Cheng
2ca0efd71a Also add super- register classes info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28221 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-11 07:30:26 +00:00
Evan Cheng
3eff89bf89 Watch out for the following case:
1. Use expects a chain output.
2. Node is expanded into multiple target ops.
3. One of the inner node produces a chain, the outer most one doesn't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28209 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-10 02:47:57 +00:00
Evan Cheng
045953c37a Fix a load folding bug. It is exposed by a multi- resulting instructions
def : Pat<> pattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28208 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-10 00:05:46 +00:00
Evan Cheng
8d58e6a9be Add sub-register class information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 06:34:26 +00:00
Reid Spencer
829bcb172a Attempt to get this script working on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28085 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 18:16:01 +00:00
Evan Cheng
108714c14f Set isStore of instructions with ISD::TRUNCSTORE root node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28075 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 02:08:34 +00:00
Chris Lattner
eff5c36238 Put instruction names into the first non TargetInstrInfo namespace found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28043 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 23:46:16 +00:00
Chris Lattner
a1e8a80b96 instructions can be in different namespaces. Make sure to use the right
one for each instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28038 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 17:01:17 +00:00
Evan Cheng
afba446d99 Formating
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28036 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 09:30:17 +00:00
Evan Cheng
6f6360d9ab Mark instructions whose pattern is (store ...) isStore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28032 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 09:04:20 +00:00
Evan Cheng
55d0fa1bfa Remove the temporary option: -no-isel-fold-inflight
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28012 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 18:54:11 +00:00
Evan Cheng
61a0209a8a When isel'ing a node, mark its operands "InFlight" before selecting them. These
nodes should not be folded into other nodes.
This fixes the miscompilation of PR 749.
Temporarily under flag control.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28002 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 02:08:10 +00:00
Nate Begeman
37efe67645 JumpTable support! What this represents is working asm and jit support for
x86 and ppc for 100% dense switch statements when relocations are non-PIC.
This support will be extended and enhanced in the coming days to support
PIC, and less dense forms of jump tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27947 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-22 18:53:45 +00:00
Reid Spencer
444b2cf4c3 Remove the extraneous --defined-only option to nm. This is the default and
some versions of nm don't recognize it (its a gnu option).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27928 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-21 05:29:25 +00:00
Reid Spencer
44fa691873 Don't require the "dot" program if -flat option is given, and don't produce
any of the fancy graphs or other output. Just produce the flat, makefile
style output on stdout.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27921 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 23:09:57 +00:00
Reid Spencer
ca40bb95b1 Remove the llvm-config directory. Its now in tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27918 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:16:32 +00:00
Reid Spencer
ca432acc52 llvm-config doesn't live here anymore ==> tools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27917 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:15:41 +00:00
Reid Spencer
d075dfb0cf Update the library dependencies for 1.8 with SparcV9 now gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27910 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 19:50:53 +00:00
Reid Spencer
118af5f6d6 Remove Burg as a directory to be considered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27906 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 18:47:13 +00:00
Chris Lattner
ab38f5be3a remove some stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27903 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 18:43:59 +00:00
Reid Spencer
63ed92e882 Burg not needed any more now that SparcV9 is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27901 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 18:39:19 +00:00
Chris Lattner
719c2fc97f Don't fill in fields that no longer exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 18:32:22 +00:00
Evan Cheng
c81d2a041d Rename AddedCost to AddedComplexity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27841 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 20:36:09 +00:00
Evan Cheng
5941320c0d Allow "let AddedCost = n in" to increase pattern complexity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27834 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 18:07:24 +00:00
Chris Lattner
309db81c10 Fix a build failure on Vladimir's tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 00:21:25 +00:00
Chris Lattner
8c3e847159 Encode a cost of zero as a cost of 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27745 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 05:25:16 +00:00
Chris Lattner
195d8adac9 Really, I can count!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 05:05:52 +00:00
Chris Lattner
cf1f6440d9 assign stable opcodes to the various altivec ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:47:18 +00:00
Chris Lattner
2f97623bda PPCPerfectShuffle.h is autogenerated, don't include it in the LOC counts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:46:09 +00:00
Chris Lattner
4ad53bdd19 Rename BuildShuffleTable -> PerfectShuffle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:35:34 +00:00
Chris Lattner
3033d4d375 rename the table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27737 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:33:35 +00:00
Chris Lattner
27e98aa07c Initial checking of a perfect shuffle generation program for 4-element
Altivec vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27736 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:30:41 +00:00
Reid Spencer
43fdfdcfd1 Allow an option, -with-externals, to be specified that provides the location
of the external tests. This turns into --with-externals option to configure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 13:53:56 +00:00
Reid Spencer
28421d0a80 Add missing things to the distribution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-13 06:27:20 +00:00
Chris Lattner
7f71e21972 one too many l's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-13 04:21:31 +00:00
Reid Spencer
42aa3a59c9 Fix a typo in the name of a file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 23:15:10 +00:00
Reid Spencer
db4f336165 Additional files to distribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27627 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 20:54:01 +00:00
Reid Spencer
d853fd6b6d Add the llvm-config directory to the EXTRA_DIST line so it gets distributed
even though its not being built currently. This prevents dist-check from
failing because configure can't find llvm-config.in.in


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27623 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 19:06:14 +00:00
Andrew Lenharth
65c1e46ebd make recovering running_Olden data easier when the nightly tester eats the graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27615 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 17:41:19 +00:00
Chris Lattner
4b2362e247 Fix a typo: Instr* -> Intr*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27568 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-10 22:02:59 +00:00
Chris Lattner
91ded08224 Infer element types for shuffle masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27456 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-06 20:36:51 +00:00
Chris Lattner
52793e2c41 rename a method, to avoid confusion with llvm intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27455 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-06 20:19:52 +00:00
Chris Lattner
5348e393df Adjust the Intrinsics.gen interface a little bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27345 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-02 03:35:30 +00:00
Chris Lattner
b83169195c regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 21:54:11 +00:00
Chris Lattner
711e5d96aa Generalize the previous binary operator support and add a string concatenation
operation.  This implements Regression/TableGen/strconcat.td.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 21:53:49 +00:00
Chris Lattner
ffa4fdcd17 Allow bits init values to be used in patterns, turn them into ints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 05:25:56 +00:00
Chris Lattner
f124b46b4f Final bugfix for PR724. GCC won't inline varargs functions, so use one to
validate the prototype of intrinsic functions.  This prevents GCC from going
crazy and inlining too much stuff, eventually running out of memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27283 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 04:48:26 +00:00
Chris Lattner
c4d9b240b1 When emitting code for the verifier, instead of emitting each case statement
independently, batch up checks so that identically typed intrinsics share
verifier code.  This dramatically reduces the size of the verifier function,
which should help avoid GCC running out of memory compiling Verifier.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 04:24:58 +00:00
Chris Lattner
8177969be0 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27264 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-30 22:51:12 +00:00
Chris Lattner
8c06318821 Implement Regression/TableGen/DagDefSubst.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27263 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-30 22:50:40 +00:00
Evan Cheng
f065a6f711 Don't sort the names before outputing the intrinsic name table. It causes a
mismatch against the enum table.
This is a part of Sabre's master plan to drive me nuts with subtle bugs that
happens to only affect x86 be. :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27237 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-28 22:25:56 +00:00
Chris Lattner
b026e70462 Tblgen doesn't like multiple SDNode<> definitions that map to the sameenum value. Split them into separate enums.
Also, don't emit dynamic checks when we can compute them statically


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27202 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-28 00:41:33 +00:00
Chris Lattner
6a160fba22 Only compute intrinsic valuetypes when in a target .td file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27197 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-28 00:15:00 +00:00
Chris Lattner
76f8c7c4cc revert this, it breaks things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27196 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-28 00:03:08 +00:00
Chris Lattner
8850a1bcef Add support for decoding iPTR to the right pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27188 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-27 22:48:18 +00:00
Chris Lattner
2c4e65d460 Print error messages like this:
tblgen: In STVEBX: Intrinsic 'llvm.ppc.altivec.stvebx' expects 3 operands, not 2 operands!

instead of like this:
tblgen: In STVEBX: Intrinsic 'intrinsic_void expects 3 operands, not 2 operands!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27185 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-27 22:21:18 +00:00
Chris Lattner
5c4c774c75 Add a missing check which cause an invalid .td file to crash tblgen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27126 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-25 22:12:44 +00:00
Chris Lattner
9bf2d3e6d6 When failing selection for an intrinsic, print this:
Cannot yet select: intrinsic %llvm.ppc.altivec.lvx

instead of this:

Cannot yet select: 0x9b047e0: v4i32,ch = INTRINSIC 0x9b04540:1, 0x9b04710, 0x9b04790, 0x9b04540


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27110 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-25 06:47:53 +00:00
Chris Lattner
5a1df389a6 Change approach so that we get codegen for free for intrinsics. With this,
intrinsics that don't take pointer arguments now work.  For example, we can
compile this:

int test3( __m128d *A) {
  return _mm_movemask_pd(*A);
}
int test4( __m128 *A) {
  return _mm_movemask_ps(*A);
}

to this:

_test3:
        movl 4(%esp), %eax
        movapd (%eax), %xmm0
        movmskpd %xmm0, %eax
        ret
_test4:
        movl 4(%esp), %eax
        movaps (%eax), %xmm0
        movmskps %xmm0, %eax
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27090 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 23:10:39 +00:00
Chris Lattner
947604b0e2 fix 80 column violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27084 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 21:52:20 +00:00
Chris Lattner
550525e3cf Parse intrinsics correctly and perform type propagation. This doesn't currently
emit the code to select intrinsics, but that is next :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27082 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 21:48:51 +00:00
Jim Laskey
47622e3721 Add dwarf register numbering to register data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 21:15:58 +00:00
Chris Lattner
2ca956f8de Make sure to initialize the TheDef field!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27078 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 20:25:01 +00:00
Chris Lattner
43fbbc36dc Move CodeGenIntrinsic implementation to CodeGenTarget.cpp with the rest of
the CodeGen* implementations.

Parse the MVT::ValueType for each operand of the intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27075 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 19:49:31 +00:00
Chris Lattner
7056de375d extract some more information from the intrinsic table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27022 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 01:13:55 +00:00
Reid Spencer
1c070fc10b Remove the interpreter component as its not working at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27021 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 01:10:39 +00:00
Reid Spencer
96bfd4a40e Add a .cvsignore file to get rid of notices about gram.tab.[ch]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27012 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:46:47 +00:00
Reid Spencer
4d9f05cdcb Add new generated files to be ignored.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27011 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:45:32 +00:00
Reid Spencer
f39fcc787b Ignore temporary files generated by building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27010 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:44:24 +00:00
Reid Spencer
b195d9d365 Update to llvm-config tool, by Erik Kidd:
1. Check for Perl and only build llvm-config if its available.
2. Add some virtual components
3. Don't depend on "standard" location for Perl, but configured location
4. Document the tool with a POD file.

This version is now ready for testing by users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27005 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:21:29 +00:00
Reid Spencer
2fee235bf3 A little script to find LLVM symbols. Ideally this would use c++filt for
both input and output to render everything in C++, but that will be the
next patch. For now, it just runs nm and greps each .o or .a file for
the desired symbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27003 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:04:50 +00:00
Reid Spencer
025213e9f2 Don't print out ugly command line when building LibDeps.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27001 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 22:42:50 +00:00
Reid Spencer
ff9b038b20 Updated for library changes:
1. LLVMCBackend.o now depends on LLVMCodeGen.o (why we're not sure)
2. LLVMExecutionEngine.o no longer depends on LLVMInterpreter.o nor LLVMJIT.o
Thanks, Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26976 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 06:15:27 +00:00
Evan Cheng
83e1a6ab95 Allow result node to be a simple leaf node. This enable bitconvert patterns
like this:
def : Pat<(v4i32 (bitconvert (v4f32 VR128:$src))), (v4i32 VR128:$src)>;


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26968 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 02:35:32 +00:00
Reid Spencer
f2722ca339 These changes are necessary to support the new llvm-config tool. llvm-config
is a handy tool for users of LLVM who want to be able to quickly get
information about LLVM's configuration. It is intended to be used in the
command line of other tools. Documentation will be forthcoming in a
subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26952 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-22 15:59:55 +00:00
Evan Cheng
3a7a14b0ae Don't forget to promote xform function to an explicit node for def : Pat<>
patterns.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26929 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-21 20:44:17 +00:00
Chris Lattner
4e2f54d99e minor code simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26918 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-21 06:42:58 +00:00
Reid Spencer
7d6a5155a4 Cause the various warnings list to be generated via a <ul> list with
text enclosed in <tt>. This ensures that (a) the text is in a fixed width
font (to indicated generated text) and (b) the text wraps without causing
the page width to be extended. The main result of this is that the report
will wrap to conform to the window size in which it is displayed instead of
having a very wide length if a warning message is long.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26916 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-21 01:21:39 +00:00
Evan Cheng
863bf5afb0 The node wrapped in PatLeaf<> should be treated as a leaf even if it isn't
one, i.e. don't select it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26909 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-20 22:53:06 +00:00
Evan Cheng
f26ba69725 It should be ok for a xform output type to be different from input type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26899 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-20 08:09:17 +00:00
Evan Cheng
420132e1eb Copy matching pattern's output type info to instruction result pattern.
The instruction patterns do not contain enough information to resolve the
exact type of the destination if it of a generic vector type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26892 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-20 06:04:09 +00:00
Chris Lattner
697f88456c Add a new SDTCisIntVectorOfSameSize type constraint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26890 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-20 05:39:48 +00:00
Reid Spencer
355ef219d2 The library dependency file in flat format. This file is generated by the
makefile using the utils/GenLibDeps.pl script with the -flat option. It
records the dependencies between libraries in such a way that the
llvm-config script can easily read it (in makefile dependency format).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26876 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 22:12:30 +00:00
Reid Spencer
0fab2b15ab First cut at the Makefile for llvm-config. This initial version just provides
the rule for building the LibDeps.txt file using GenLibDeps.pl. This needs
to be done from time to time manually in order to keep LibDeps.txt up to
date.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26875 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 22:10:53 +00:00
Reid Spencer
0bf1177f6f Add a -flat option for generating the library dependencies in a flat
format with one library per line, similar to a makefile dependency list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26873 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 22:08:01 +00:00
Evan Cheng
dcfccac13b getEnumName() missed v8i8, v4i16, and v2i32 types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26869 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 07:57:34 +00:00
Chris Lattner
485c00f7e8 Fix miscodegen of V_SET0 in PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26836 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-18 00:40:36 +00:00
Reid Spencer
a165d57dad Use the <tt> tag instead of <pre> tag to get code/file/warning lists to
wrap but also still be in a fixed-width font.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26825 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-17 17:43:01 +00:00
Chris Lattner
0da3130a98 allow the GCCBuiltinName field to be optional
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26784 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 19:15:26 +00:00
Jeff Cohen
71c3bc3d96 Fix VC++ build error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26773 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 02:51:05 +00:00
Chris Lattner
ad45b00d6a remove typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26772 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 02:05:38 +00:00
Chris Lattner
fda6affb95 Autogenerate a table of intrinsic names, so we can map from intrinsic ID to
LLVM intrinsic function name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26771 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 01:55:21 +00:00
Chris Lattner
3f8b8913bc Autogenerate code to map from GCC builtin to LLVM intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26770 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 01:33:26 +00:00
Reid Spencer
09a053a777 Allow a sequence of digits at the end of the directory name when trying to
determine the top directory. This allows the tool to find the correct top
directory when you have something like:

   /x/llvm
   /x/llvm2
   /x/llvm3

Previously the scripts would always find /x/llvm even if you were in the
llvm2 or llvm3 directory because the pattern didn't allow the digits at
the end of the path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 06:08:05 +00:00
Reid Spencer
b7b8317388 Change llvm.cs.uiuc.edu -> llvm.org
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26750 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 06:05:05 +00:00
Reid Spencer
767a25b878 Add a newline at the end to avoid gcc warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26749 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 05:59:52 +00:00
Reid Spencer
9dce2b3380 Convert llvm.cs.uiuc.edu -> llvm.org
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 05:54:52 +00:00
Chris Lattner
022f64fbbc emit a mapping from LLVM intrinsic -> GCC builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26736 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:08:44 +00:00
Chris Lattner
18faf5d9f7 Verify that packed type operands have the right size and base type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26735 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 22:38:57 +00:00
Chris Lattner
78167faa18 fix pasto in generate assertion msg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26706 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-11 00:20:47 +00:00
Chris Lattner
4e5f35973c generate side-effect info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26672 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 22:37:52 +00:00
Chris Lattner
6448ee44c6 Parse mod/ref properties, autogen mod/ref information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26669 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 22:30:49 +00:00
Chris Lattner
f97a00e681 parse intrinsic types
autogenerate an intrinsic verifier


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26666 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 22:05:04 +00:00
Chris Lattner
9b843b2494 autogenerate the function name recognizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26663 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:34:19 +00:00
Evan Cheng
ed66e855ec Temporary hack to enable more (store (op (load ...))) folding. This makes
it possible when a TokenFactor is between the load and store. But is still
missing some cases due to ordering issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26638 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 08:19:11 +00:00
Evan Cheng
6f8aaf2cb0 Don't generate silly matching code like this:
if (N1.getOpcode() == ISD::ADD &&
     ...)
   if (... &&
       (N1.getNumOperands() == 1 || !isNonImmUse(N1.Val, N10.Val))) &&
       ...)

TableGen knows N1 must have more than one operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26592 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 08:31:27 +00:00
Chris Lattner
56879b2d96 Silence a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26508 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 19:34:28 +00:00
Chris Lattner
b672d981a8 Fix pasteo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26499 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 06:13:41 +00:00
Chris Lattner
3b2397211b remove a bunch of long-dead testing code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26497 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 02:34:28 +00:00
Chris Lattner
9e493cfcc3 initial implementation of intrinsic parsing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26495 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 02:32:46 +00:00
Chris Lattner
3d87811ce0 remove out of date comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26492 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 02:04:07 +00:00
Chris Lattner
ed5424196d Add support for "-Ifoo" in addition to "-I foo"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26487 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:53:40 +00:00
Chris Lattner
c1d6e4eba7 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26486 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:47:37 +00:00
Chris Lattner
d9f5d90af1 add support for multiple include directories
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26485 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:47:14 +00:00
Evan Cheng
9073dea7c0 New vector type v2f32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26437 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 01:10:52 +00:00
Chris Lattner
fd105d464a Select inline asm memory operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26349 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-24 02:13:31 +00:00
Evan Cheng
aea20f50e5 Added x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
packed word integer (v8i16), and 64-bit packed doubleword integer (v2i32).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-20 22:34:53 +00:00
Jeff Cohen
bce4805d6f Fix bugs identified by VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 03:20:33 +00:00
Evan Cheng
fbad70808c Bump up pattern cost if the resulting instruction is marked
usesCustomDAGSchedInserter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26282 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-18 02:33:09 +00:00
Chris Lattner
bdd3c1604e Check the new form for bison output into CVS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26208 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-15 07:24:01 +00:00
Chris Lattner
e8242b168c Adjust to new form of handling lexer dependencies, this way shouldn't have
the problems the old way did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26161 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 05:13:13 +00:00
Evan Cheng
67212a05e6 Call InsertISelMapEntry rather than map insertion operator to prevent overly
aggrssive inlining. This reduces Select_store frame size from 24k to 10k.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26095 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 22:12:27 +00:00
Evan Cheng
d7805a741d Match getTargetNode() changes (now returns SDNode* instead of SDOperand).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26084 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 07:16:09 +00:00
Evan Cheng
34167215a8 Change Select() from
SDOperand Select(SDOperand N);
to
void Select(SDOperand &Result, SDOperand N);


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 00:37:58 +00:00
Evan Cheng
3468864f08 Added options -cflag, -cxxflags, and -ldflags to override the default C
compilation, C++ compilation, and linker options.
e.g. This is the options I use for testing on my x86 iMac:
nice ./NightlyTest.pl -release -cflags "-Os -DNDEBUG -fomit-frame-pointer" -cxxflags "-Os -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26057 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-08 09:08:06 +00:00
Evan Cheng
917707a73f Remove -pedantic. It no longer works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26055 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-08 07:28:22 +00:00
Evan Cheng
21ad392ee6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26026 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-07 00:37:41 +00:00
Chris Lattner
04cadb3684 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26024 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-06 23:40:48 +00:00
Chris Lattner
b03b080a82 Simplify the variant handling code, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26023 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-06 22:43:28 +00:00
Evan Cheng
7cd19d038f 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26014 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-06 08:12:55 +00:00
Evan Cheng
024524fe9b Name change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26013 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-06 06:03:35 +00:00
Evan Cheng
0a83ed506c Handle HANDLENODE: just return itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26011 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-05 08:46:14 +00:00
Evan Cheng
e41bf82107 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25995 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-05 06:43:12 +00:00
Evan Cheng
2216d8ad2f Re-committing the last bit of change. It shouldn't break PPC this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25982 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-05 05:22:18 +00:00
Chris Lattner
9ed44818c5 Temporarily revert the last change, which breaks PPC and other targets that
DO select things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25970 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 09:23:06 +00:00
Evan Cheng
9c4815a036 Complex pattern's custom matcher should not call Select() on any operands.
Select them afterwards if it returns true.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25968 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 08:50:49 +00:00
Chris Lattner
3e1798086b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25937 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-03 18:06:02 +00:00
Evan Cheng
e4a8a6e645 (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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-03 06:22:41 +00:00
Chris Lattner
1cf9d961b2 add a note, ya knoe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25880 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-01 19:12:23 +00:00
Evan Cheng
657416cfba If a pattern's root node is a constant, its size should be 3 rather than 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25870 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-01 06:06:31 +00:00
Chris Lattner
d9aadd4d15 solaris won't clobber an existing symlink with ln -sf apparently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25849 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-31 16:10:53 +00:00
Chris Lattner
273d463bef implement test/Regression/TableGen/DagIntSubst.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25836 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-31 06:02:35 +00:00
Chris Lattner
7859313bae simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 20:01:35 +00:00
Andrew Lenharth
8e51773bb7 it is nice not to chop off bits for those blessed with lots of bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25766 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 05:22:37 +00:00
Andrew Lenharth
2cba57cb09 make the casts actually cast to the variable type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25765 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 05:17:22 +00:00
Andrew Lenharth
5c6bdf71d4 start of the 64bit safety cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25764 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 05:07:04 +00:00
Chris Lattner
24e00a4ac1 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))) {


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 04:41:05 +00:00
Chris Lattner
8bc7472a0c Factor matching code that is common between patterns. This works around
GCC not jump-threading across this common code, and produces far nicer
output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25762 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 04:25:26 +00:00
Chris Lattner
2bd4dd7668 Split out code generation from analysis from emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25759 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 02:57:39 +00:00
Chris Lattner
355408bcb7 move some code around, no change in the generated code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25758 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 02:43:35 +00:00
Chris Lattner
67a202bc42 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25757 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 20:43:52 +00:00
Chris Lattner
8a0604b523 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 20:31:24 +00:00
Reid Spencer
24200d63fd Make long warnings wrap and have less indent so other portions of the page
are not skewed out of view.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25753 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 19:44:48 +00:00
Chris Lattner
488580c1ed Fit to 80 columns, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25752 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 19:06:51 +00:00
Jeff Cohen
9b0ffca478 Teach tablegen to generate code that is VC++ warning-free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 22:22:28 +00:00
Evan Cheng
c15d18c501 (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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25708 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 22:13:45 +00:00
Evan Cheng
19c9550744 Subtarget feature can now set any variable to any value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 08:09:42 +00:00
Chris Lattner
0cfcc1e807 Use printInlineAsm to, well, print inline asm's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25677 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 02:10:50 +00:00
Chris Lattner
aa77d77a43 PHI and INLINEASM are now builtin instructions provided by Target.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25673 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 01:45:06 +00:00
Chris Lattner
f52e2618f3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25672 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 01:44:09 +00:00
Chris Lattner
387e4bdf00 There is at least a 'noitinerary' itinerary now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25671 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 01:41:55 +00:00
Chris Lattner
188454ae2b Don't emit JIT code for these instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25669 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 01:39:38 +00:00
Chris Lattner
fabcb7abc5 Teach the dag selectors to select InlineAsm nodes.
Aren't we happy the pattern selectors are almost all gone?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25666 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 23:08:55 +00:00
Evan Cheng
1feeeecf4c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25651 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 19:13:45 +00:00
Evan Cheng
8eab3608de Add a FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25635 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 02:13:31 +00:00
Evan Cheng
545977371a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25627 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 00:22:25 +00:00
Evan Cheng
9789aaad63 Fix an optional in flag bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25590 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-24 20:46:50 +00:00
Evan Cheng
18667c4545 Optional InFlag was not being included in node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25588 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-24 20:07:38 +00:00
Evan Cheng
76356d9594 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25471 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 01:11:03 +00:00
Chris Lattner
485a350bed Don't include generated lexer .cpp files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25466 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 22:01:51 +00:00
Evan Cheng
823b752d75 Bug fix. Flag operand number may be calculated incorrectly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25465 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 21:57:10 +00:00
Evan Cheng
7419de89fb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25458 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 10:12:58 +00:00
Evan Cheng
b4ad33c4ae Prevent unnecessary CopyToReg when the same HW register appears in two spots
in the pattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25437 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 01:55:45 +00:00
Chris Lattner
09fb7d4dad fix a broken comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25411 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 21:31:18 +00:00
John Criswell
d788124317 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25394 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 17:01:34 +00:00
Evan Cheng
57c517d30c Emit a type matching check for ComplexPatterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25392 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 07:36:41 +00:00
Evan Cheng
37e9005db3 Type inferencing bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25337 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 10:04:45 +00:00
Evan Cheng
f805c2ed7f Allow transformation from GlobalAddress to TargetGlobalAddress and
ExternalSymbol to TargetExternalSymbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25252 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 19:35:54 +00:00
Evan Cheng
bb48e33bcd GlobalAddress -> TargetGlobalAddress; ExternalSymbol -> TargetExternalSymbol
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25245 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 07:54:57 +00:00
Evan Cheng
b2c6d4957a Some minor fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25227 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 22:16:13 +00:00
Chris Lattner
8020a5233c Always select target registers to themselves
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25218 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 19:52:27 +00:00
Chris Lattner
7893f13ad6 Emit an error instead of an assertion if trying to do bogus things in result patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25194 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 01:33:49 +00:00
Robert Bocchino
b52ee7f5ff Added support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25181 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:05:34 +00:00
Evan Cheng
51fecc80f7 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25154 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 18:27:06 +00:00
Evan Cheng
4a7c284b35 Pattern complexity calculation fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25133 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 22:19:44 +00:00
Evan Cheng
e1050d616b Tweak pattern complexity calc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25122 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 02:30:23 +00:00
Evan Cheng
1cf6db2d3b Bug fix wrt chain operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25115 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 00:41:12 +00:00
Jeff Cohen
60e9187a90 Replace fix with one less disruptive to the original code.
Also note that GCC 4.1 also correctly flags the syntax error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25076 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 03:23:30 +00:00
Jeff Cohen
f356d70ec3 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++.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25075 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 03:15:19 +00:00
Chris Lattner
11966a0179 Remove obsolete comment, make things look a bit nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25070 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 00:32:01 +00:00
Chris Lattner
602f692461 reduce stack usage of the recursive SelectCode function by out-lining each
case of the switch statement into its own method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25069 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 00:25:00 +00:00
Chris Lattner
4e3c8e516f Remove my previous ugly hack that tries to reduce the stack space usage
of SelectCode to make way for a better solution.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25068 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-03 22:55:16 +00:00
Duraid Madina
d47ae09dab HP-UX DVDs are crunchy and good to eat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25052 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 16:41:48 +00:00
Duraid Madina
42d24c71df almost got the HP-UX tester up.. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25051 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 14:56:37 +00:00
Nate Begeman
b73628b5ab Add support for generating v4i32 altivec code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25046 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 00:12:56 +00:00
Duraid Madina
12f7578214 This gets most of the backends building with HP HappyC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25029 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-27 10:56:22 +00:00
Evan Cheng
2b4ea795a2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25017 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 09:11:45 +00:00
Duraid Madina
6fb9a84e79 more standards-compliance stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25014 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 05:08:55 +00:00
Andrew Lenharth
330851a8f6 support targetexternalsym
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25005 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 23:36:59 +00:00
Evan Cheng
7b05bd5814 * Support for hasInFlag and hasOutFlag (on instructions). Remove nameless FLAG
support which is fragile.
* Fixed a number of bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24996 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 22:11:47 +00:00
Chris Lattner
7a8054f5f2 silence some bogus gcc warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24962 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 20:37:36 +00:00
Evan Cheng
3a217f3e53 Attempt to fix a crash on WIN32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24936 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 02:35:21 +00:00
Evan Cheng
9793888be8 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24933 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 02:24:50 +00:00
Evan Cheng
87bddeb2af Allows instructions which no explicit operands. e.g. X86 RET which has but
an implicit flag operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24916 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 20:20:49 +00:00
Chris Lattner
4e6a1d2433 Eliminate some GCC warnings from the generated code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24897 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 05:31:05 +00:00
Evan Cheng
5fb5e10cdc Fix the semantic of Requires<[cond]> to mean if (!cond) goto PXXFail;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24883 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 20:08:01 +00:00
Chris Lattner
2f0f9a6973 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24882 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 19:41:03 +00:00
Evan Cheng
4fba28116c Now support instructions with implicit write to non-flag registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24878 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 07:37:41 +00:00
Patrick Meredith
dae87b6536 Added a break that I meant to include originally, for efficiency. Basically
it keeps it from trying to add the same node to the node set
over and over if it matches multiple given patterns.  Also in cases where there
are a lot of patterns to be matched, and it matches an early one, this
will make the script run slightly faster.  It's more there because it logically
should be, than anything else, I mean, Python is never going to be fast ;-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24876 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 02:03:23 +00:00
Evan Cheng
e08705134f Lefted out a fix in the previous check in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24873 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 00:06:17 +00:00
Evan Cheng
f9fc25db32 Fix another bug related to chain / flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24868 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 22:40:04 +00:00
Evan Cheng
1b80f4d2c6 Fixes for a number of bugs: save flag results in CodeGenMap, folded chains
may not all have ResNo == 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24858 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 07:18:51 +00:00
Patrick Meredith
7e1cf1c8f4 This is a script to extract nodes and edges associated with those nodes
from a dot file that is the output of DSA.  Nodes to extract
are specified by giving the name of the node seen in the graphical
representation, i.e. in the .ps if the node is specified %xyz
asking for just x, xy, or xyz will retain it in the output file.
Because it operates on substrings underspecifying may result
in additional unexpected nodes.  Be as specific as possible.
Obviously, however, if you ask for %xyz and there is a
getelementptr of %xyz you will get both nodes.  Some manual
editing may still be necessary because of this, but this script
can pare down 10,000 line files to 20 line files, making like easier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24851 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:23:31 +00:00
Chris Lattner
5216c698de Handle basic block nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24833 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 21:05:44 +00:00
Chris Lattner
dc464de9b0 More fixes for Selection of copyto/fromreg with a flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24829 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 15:45:51 +00:00
Chris Lattner
755dd09815 Select copytoreg and copyfromreg nodes that have flag operands correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24827 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 15:28:25 +00:00
Evan Cheng
bcecf33dc2 Support for read / write from explicit registers with FlagVT type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24753 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 01:19:28 +00:00
Evan Cheng
58e84a69f5 Added support to specify predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24715 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-14 22:02:59 +00:00
Evan Cheng
01f318bfca Skip over srcvalue nodes when generating ISEL code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24704 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-14 02:21:57 +00:00
Evan Cheng
0e65b27e28 Bug fix: CodeGenMap[N] = ... -> CodeGenMap[N.getValue(0)] = ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24680 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-12 23:45:21 +00:00
Evan Cheng
481c8e0501 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24679 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-12 23:22:48 +00:00
Evan Cheng
8621789fcc Bug fix: finding the correct incoming chain for pattern with nested src operand. And a minor change to make output code slightly more readible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24669 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-12 19:37:43 +00:00
Chris Lattner
0831310441 Send an indicator to llvm-testresults if the build failed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24665 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-11 19:55:39 +00:00
Nate Begeman
28a6b02626 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24657 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-10 02:36:00 +00:00
Evan Cheng
ba7fa0b5d4 Stop emitting a redudant type check for complex pattern node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24655 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-10 01:57:33 +00:00
Evan Cheng
1129e87ff4 For instructions which produce no result, e.g. store, chain's Resno == 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24652 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-10 00:09:17 +00:00
Chris Lattner
5b21be76e1 Add a new SDTCisPtrTy constraint, which indicates that an operand must have
the same type as the pointer type for a target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24649 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-09 22:57:42 +00:00
Evan Cheng
b915f3110d * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24647 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-09 22:45:35 +00:00
Evan Cheng
cbc09c8eaa Prevent folding of instructions which produce chains that have more than 1 real use
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24643 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-09 06:06:08 +00:00
Evan Cheng
c45146ace5 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24642 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-09 00:48:42 +00:00
Evan Cheng
3aa39f439a * Added an explicit type field to ComplexPattern.
* Renamed MatchingNodes to RootNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24636 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-08 02:14:08 +00:00
Evan Cheng
0fc7198890 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24634 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-08 02:00:36 +00:00
Evan Cheng
dd304dd4bd * Infer instruction property hasCtrlDep from pattern if it has one.
* Fixed a bug related to hasCtrlDep property use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24610 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-05 23:08:55 +00:00
Chris Lattner
22faeabb3a Implement PR673: for explicit register references, use type information
if available


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-05 02:36:37 +00:00
Chris Lattner
5c4736a3da Add some methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24596 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-05 02:35:08 +00:00
Chris Lattner
7292c5ee32 Generate code to silence bogus GCC warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24593 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-05 00:48:51 +00:00
Evan Cheng
1c3d19eb15 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24587 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-04 08:18:16 +00:00
Nate Begeman
6510b22cec Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24563 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 04:51:06 +00:00
Evan Cheng
66a48bbc35 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24557 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 00:18:45 +00:00
Nate Begeman
86193d1190 Nuke CodeGenInstruction's ValueType member, it is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24556 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 00:12:04 +00:00
Nate Begeman
ddb395463c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24555 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 00:06:14 +00:00
Nate Begeman
8ef9d16d39 fit into 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24554 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 23:58:18 +00:00
Chris Lattner
5d28ffdfec Make the code generated by tblgen return the result of SelectNodeTo, to
permit future changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24553 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 23:08:45 +00:00
Nate Begeman
391c5d231a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24541 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 18:54:35 +00:00
Nate Begeman
004a833ab8 Fix some copy and paste typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24540 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 18:37:14 +00:00
Evan Cheng
76021f010b Better error message when unrecognized opcode is seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24519 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 18:44:58 +00:00
Nate Begeman
02fc8ff800 Add the new vector types to tablegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24514 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 06:19:38 +00:00
Chris Lattner
3367079b0b Initialize this variable on all paths, fixing a crasher in windows. Thanks
to JeffC for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24426 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 07:48:33 +00:00
Chris Lattner
65303d6bd7 Teach tblgen about instruction operands that have multiple MachineInstr
operands, digging into them to find register values (used on X86).  Patch
by Evan Cheng!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24424 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 07:05:57 +00:00
Chris Lattner
09c033962b Validate that the input to 'Pat' patterns is sane.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24393 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 17:43:52 +00:00
Chris Lattner
b120a64e13 teach tblgen to be smart enough to handle tglobaladdr nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24391 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 07:39:45 +00:00
Chris Lattner
12cf9090a4 fix a tblgen bug that Evan ran into, where we would lose the '$src' name
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-16 23:14:54 +00:00
Chris Lattner
811da6d889 remove these labels, there are now bigger jumps in the graph that are unlabeled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24365 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-15 06:44:15 +00:00
Jim Laskey
7f39c14f52 1. Remove ranges from itinerary data.
2. Tidy up the subtarget emittined code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24172 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-03 22:47:41 +00:00
Chris Lattner
465c737467 Reject integer literals that are out of range for their type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24162 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-03 05:46:11 +00:00
Chris Lattner
0614b628cf Add support for immediates directly in the pattern, this allows itanium to
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-11-02 06:49:14 +00:00
Jim Laskey
6cee630070 Allow itineraries to be passed through the Target Machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24139 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 20:06:59 +00:00
Jeff Cohen
cb366d980a Keep VC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24137 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 18:04:06 +00:00
Chris Lattner
b0ddb49419 Let people who run the nightly tester specify paths to external tests, instead
of having to hack the nightly tester script itself.

as an example, I use the following for my machine:

$HOME/llvm/utils/NightlyTest.pl -parallel -release -enable-llcbeta \
     -spec2000path /Volumes/ProjectsDisk/cvs/benchmarks/speccpu2000-llvm/benchspec/ \
     -povraypath /Volumes/ProjectsDisk/cvs/benchmarks/povray31 \
     -namdpath /Volumes/ProjectsDisk/cvs/benchmarks/namd


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24136 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 17:59:42 +00:00
Jim Laskey
b5a0c0ee05 Emit itinerary class in instruction info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24122 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-31 17:16:46 +00:00
Jim Laskey
10b1dd99f3 Generate cpu to itinerary map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24121 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-31 17:16:01 +00:00
Chris Lattner
4734630576 Revert an accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24098 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 17:01:41 +00:00
Chris Lattner
9d1a02345c Make negative immediates in patterns work correctly, silence some warnings
building the itanium backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24095 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 16:39:40 +00:00
Chris Lattner
366080c5e6 Switch more code over to using getValueAsListOfDefs. Look at all the -'s. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24074 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 22:59:53 +00:00
Chris Lattner
b0e103d46b Rename Record::getValueAsListDef to getValueAsListOfDefs, to more accurately
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-28 22:49:02 +00:00
Chris Lattner
6bc0d742c2 Use the new interface Jim added
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24071 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 22:43:25 +00:00
Jim Laskey
f7bcde0854 Removed Mr. Smith from the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24070 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 21:47:29 +00:00
Jim Laskey
fd306bfdd2 Added method to return a vector of records for a ListInit of Def field. This
simplifies using list of records.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24069 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 21:46:31 +00:00
Chris Lattner
e50caac6b0 The nightly tester report doesn't report JIT code size anymore, remove it
from the olden graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24057 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 16:35:18 +00:00
Jim Laskey
908ae27a90 Add some commentary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24055 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 15:20:43 +00:00
Jeff Cohen
9489c04efc Keep Visual Studio happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24052 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 01:43:09 +00:00
Jim Laskey
0d841e0567 Now generating instruction itineraries for scheduling. Not my best work, but...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24050 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 19:47:21 +00:00
Jim Laskey
6c302fc075 Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24015 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 17:49:21 +00:00
Jim Laskey
581a8f79bc Give full control of subtarget features over to table generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24013 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 17:30:34 +00:00
Chris Lattner
a7ad198f89 Condcodes are in the ISD namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24010 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 17:02:02 +00:00
Chris Lattner
1531f2025c Add support for CondCode's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24008 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 16:59:37 +00:00
Chris Lattner
f071bb5b87 Emit some boilerplate for targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23983 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 20:35:14 +00:00
Jim Laskey
b3b1d5f097 Refactored to make room for more stuff (scheduling info.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23975 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 15:16:36 +00:00
Chris Lattner
dc93efe30e Fix an incompatibility with GCC 4.1, thanks to Vladimir Merzliakov
for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23963 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 15:04:15 +00:00
Chris Lattner
d4d0797851 Add the needed #include, emit enums with the sizes of tables, remove
definitions from the LLVM namespace, since they are all static.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23907 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:33:08 +00:00
Chris Lattner
2dc74dd831 Remove the obsolete instr selector emitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23894 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 05:47:52 +00:00
Jim Laskey
7dc02047fb Sort the features and processor lists for the sake of search (and maintainers.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23879 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-22 07:59:56 +00:00
Jim Laskey
f5fc2cbd6b Plugin new subtarget backend into the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23870 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 19:05:19 +00:00
Jim Laskey
4bb9cbb730 New TableGen backends for subtarget information. Only command line stuff
active now.  Scheduling itinerary next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23869 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 19:00:04 +00:00
Chris Lattner
edbd8711de Make tblgen emit:
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-21 01:19:59 +00:00
Chris Lattner
2f041d49a9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23819 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19 04:41:05 +00:00
Chris Lattner
5d5a056092 Add basic support for integer constants in pattern results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23817 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19 04:30:56 +00:00
Chris Lattner
2ac8510d68 Fix some checking that was causing duraid to get a perplexing assertion
instead of a happy error message


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23816 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19 04:12:14 +00:00
Chris Lattner
4c59309f59 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23815 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19 02:07:26 +00:00
Chris Lattner
ab1bf27be5 Asserting here is to violent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23814 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19 01:55:23 +00:00
Chris Lattner
0c0cfa741f Nate wants to define 'Pat's which turn into instructions that don't have
patterns.  Certainly a logical request.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23810 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-19 01:27:22 +00:00
Chris Lattner
b277cbc087 Duraid pointed out that it is impolite to emit PPC:: into the IA64 backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23780 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-18 04:41:01 +00:00
Chris Lattner
5024d93c8b Make the generated code significantly more memory efficient, by using
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-16 01:41:58 +00:00
Chris Lattner
7e82f1322c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-15 21:34:21 +00:00
Chris Lattner
603d78c9de 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23730 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14 06:25:00 +00:00
Chris Lattner
3c7e18d690 Fairly serious rework of the typing code to add new int/fp lattice values.
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-14 06:12:03 +00:00
Chris Lattner
e0583b1b92 simplify the code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23728 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14 05:08:37 +00:00
Chris Lattner
03ebd802c7 Add basic support for recognizing a new SDTCisOpSmallerThanOp type constraint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23725 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14 04:53:53 +00:00
Chris Lattner
0ee7cff4fb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23724 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14 04:11:13 +00:00
Chris Lattner
75ee2eb4e2 Do not let getLegalValueTypes return a list with duplicates in it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23723 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-14 03:54:49 +00:00
Patrick Meredith
d223f5ee78 Updated to be less restrictive on what is matched
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23712 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-13 17:31:30 +00:00
Chris Lattner
e08fe8d7e5 apparently one of the makefile changes changed libprofile.so to profile.so
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23709 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-13 16:34:24 +00:00
Patrick Meredith
b89dd23b43 This script is used to remove nodes with the label %tmp(.#)* and all
edges associated with said node from the dot files produced by
DSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23708 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-13 16:26:50 +00:00
Chris Lattner
80bec12f96 put the right labels on the data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23599 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-02 21:51:38 +00:00
Chris Lattner
4b2e5a680f Emit the value type for each register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23584 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-02 06:23:37 +00:00
Chris Lattner
0f21fd5204 Rename MRegisterDesc -> TargetRegisterDesc for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23564 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 17:49:27 +00:00
Chris Lattner
22842105de remove some more initializers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23562 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 17:41:05 +00:00
Chris Lattner
2f02ed9a1f trim down the target info structs now that we have a preferred spill register class for each callee save register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23560 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 17:35:22 +00:00
Chris Lattner
4794797f12 Compute a preferred spill register class for each callee-save register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23553 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 06:44:45 +00:00
Chris Lattner
88b7e6e304 Fix a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23550 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 06:09:50 +00:00
Chris Lattner
946ac939c6 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23549 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 04:53:25 +00:00
Chris Lattner
c3bec0e401 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23548 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 04:53:04 +00:00
Chris Lattner
0a28405089 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23546 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 04:42:56 +00:00
Chris Lattner
583a0249b6 Generate a parse error instead of a checked exception if template args are
used on a def.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23545 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 04:42:31 +00:00
Chris Lattner
8d354e901f regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23543 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 04:11:27 +00:00
Chris Lattner
be88b50c01 Refactor the grammar a bit to implement TableGen/ForwardRef.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23542 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 04:10:49 +00:00
Chris Lattner
0d0b73e9f8 allow regs to be in multiple reg classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23540 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-30 01:33:48 +00:00
Chris Lattner
af302914d1 Teach tablegen to reassociate operators when possible. This allows it to
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-29 22:36:54 +00:00
Chris Lattner
e46e17b7fb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23526 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-29 19:28:10 +00:00
Chris Lattner
7cf2fe6c48 add support for an associative marker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23502 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28 20:58:06 +00:00
Chris Lattner
e97603f1bd Emit an error if instructions or patterns are defined but can never match.
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-28 19:27:25 +00:00
Chris Lattner
a1a68ae061 collect commutativity information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23499 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28 18:28:29 +00:00
Chris Lattner
05814af29f Prefer cheaper patterns to more expensive ones. Print the costs to the generated
file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23492 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28 17:57:56 +00:00
Chris Lattner
f6f9416363 Select Constant nodes to TargetConstant nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23488 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-28 16:58:06 +00:00
Chris Lattner
fab3728801 memoize the assert results
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23457 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-26 22:10:24 +00:00
Chris Lattner
3748147aaf Emit the switch stmt cases in alphabetical order instead of pointer order,
which is not stable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23456 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-26 21:59:35 +00:00
Chris Lattner
6bc7e513d5 implement a fixme: only select values once, even if used multiple times.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23454 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-26 21:53:26 +00:00
Jeff Cohen
a48283baa3 Fix VC++ build errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23431 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-25 19:04:43 +00:00
Chris Lattner
296dfe3b8a memoize translations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23419 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-24 00:50:51 +00:00
Chris Lattner
72fe91c4dd Teach the DAG isel generator to emit code that creates nodes.
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-24 00:40:24 +00:00
Chris Lattner
8fc3568d98 Emit better code (no more copies for var references), and support DAG patterns
(e.g. things like rotates).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23 23:16:51 +00:00
Chris Lattner
547394ca38 Fix a fixme by passing around SDOperand's instead of SDNode*'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23415 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23 21:53:45 +00:00
Chris Lattner
d1ff35a49d Emit code that matches the incoming DAG pattern and checks predicates.
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-23 21:33:23 +00:00
Chris Lattner
3f7e91477e emit information about the order patterns are to be matched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23413 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23 20:52:47 +00:00
Chris Lattner
813033248c start filling in the switch stmt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23412 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23 19:36:15 +00:00
Chris Lattner
b9f01eb7bc Fix a minor bug, add comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23370 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-16 00:29:46 +00:00
Chris Lattner
a28aec1da7 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23369 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15 22:23:50 +00:00
Chris Lattner
ae5b350b3b put instructions into a map instead of a vector for quick lookup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23368 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15 21:57:35 +00:00
Chris Lattner
ae6d828de8 when parsing instructions remember information about the types taken and
returned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23367 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15 21:51:12 +00:00
Chris Lattner
abbb605d80 Start parsing "Pattern" nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23365 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15 21:42:00 +00:00
Chris Lattner
b39e4be1e1 rename a couple of methods, add structure for pattern parsing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23364 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-15 02:38:02 +00:00
Chris Lattner
f1311843d5 Verify that xform functions only occur in logical places
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23363 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 23:05:13 +00:00
Chris Lattner
2175c18c4f Promote xform fns to be explicit nodes in result patterns, and clean off
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
2005-09-14 23:01:59 +00:00
Chris Lattner
b0276200e6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23361 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 22:55:26 +00:00
Chris Lattner
7da852fbab catch unnamed inputs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23360 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 22:06:36 +00:00
Chris Lattner
0b59225fe1 check that there are no unexpected operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23359 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 21:59:34 +00:00
Chris Lattner
c4a8b73ab3 force all instruction operands to be named.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23358 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 21:13:50 +00:00
Chris Lattner
5d7d3dba9c Check that operands have unique names. REJECT instructions with broken operand
lists: only don't parse them if they are entirely missing (sparcv9).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23355 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 21:05:02 +00:00
Chris Lattner
3a7319d5ed fix a broke range check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23354 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 21:04:12 +00:00
Chris Lattner
d8a3bde6fd Parse significantly more of the instruction pattern, now collecting and
verifying information about the operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23353 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 20:53:42 +00:00
Chris Lattner
39e8af9913 Verify that set destinations occur first in the instruction operand list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23351 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 18:19:25 +00:00
Chris Lattner
a974b20cae add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23349 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 18:02:53 +00:00
Chris Lattner
71cdb7fc7a remove some code that isn't ready for prime time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23346 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 06:03:10 +00:00
Chris Lattner
ec67643e86 Switch to a slightly more structured representation for instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23345 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 04:03:16 +00:00
Chris Lattner
5f8cb2a28a Add some more checking/verification code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23344 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 02:11:12 +00:00
Chris Lattner
1f39e2910b start parsing instructions into patterns, start doing many more checks of
'set's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23343 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-14 00:09:24 +00:00
Chris Lattner
f4f33ba518 don't emit the namespace inside the class!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23341 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-13 22:05:02 +00:00
Chris Lattner
1048b7a67e Emit code suitable for emission into the ISel class, allowing us to use/define
methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23340 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-13 22:03:37 +00:00
Chris Lattner
6de8b53230 continue xform function parsing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23338 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-13 21:59:15 +00:00
Chris Lattner
24eeeb8c3e Start parsing node transformation information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23337 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-13 21:51:00 +00:00
Chris Lattner
8f493130bb Add a new Record::getValueAsCode method to mirror the other getValueAs*
methods.  Use it to simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23336 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-13 21:44:28 +00:00
Chris Lattner
ee9f0c3c2e completely eliminate TreePattern::PatternType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23335 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-13 21:20:49 +00:00
Chris Lattner
2b931e8035 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23311 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12 05:30:06 +00:00
Chris Lattner
2fc4f120c6 Rearrange two rules, which apparently makes some versions of bison happier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23310 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12 05:29:43 +00:00
Jeff Cohen
8337b0797b Fix miscellaneous Visual Studio build problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23307 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-10 02:00:02 +00:00
Chris Lattner
3793709e89 add an accessor to provide more checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23289 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09 01:15:01 +00:00
Chris Lattner
f2a17a70f4 use new accessors to simplify code. Add checking to make sure top-level instr
definitions are void


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23288 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09 01:11:44 +00:00
Chris Lattner
2018005096 add some accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23287 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09 01:11:17 +00:00
Chris Lattner
95f6b76817 Fix incorrect comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23285 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 23:26:30 +00:00
Chris Lattner
327076005d 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)))


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23284 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 23:22:48 +00:00
Chris Lattner
e9f4ba8dd4 Compute the value types that are natively supported by a target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23282 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 21:43:21 +00:00
Chris Lattner
33c92e9296 Parse information about type constraints on SDNodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23281 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 21:27:15 +00:00
Chris Lattner
6af14a629d use node info in the one place we currently use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23280 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 21:04:46 +00:00
Chris Lattner
ca559d0654 start parsing SDNode info records
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23279 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 21:03:01 +00:00
Chris Lattner
751eabf7bd Fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23276 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 19:47:28 +00:00
Chris Lattner
ca572be3a1 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23275 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:48:47 +00:00
Chris Lattner
a1207a5add Add support for automatically created anonymous definitions.
This implements Regression/TableGen/AnonDefinitionOnDemand.td


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23274 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:48:23 +00:00
Chris Lattner
ba4b144764 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23271 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:22:57 +00:00
Chris Lattner
69b545e877 Tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23270 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:22:35 +00:00
Chris Lattner
fbf8e57639 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")


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23269 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 17:45:12 +00:00
Chris Lattner
54cb8fd814 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23261 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 23:44:43 +00:00
Chris Lattner
6b5d9cdfcf Rename a class. These files are being migrated to the new isel and I want to
reuse the names


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23252 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 22:51:34 +00:00
Chris Lattner
46a780056b regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23249 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 21:23:27 +00:00
Chris Lattner
9978332473 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23248 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 21:23:09 +00:00
Chris Lattner
4a24c645c8 Add an option and stuff implementation of a dag isel emitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23236 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-03 01:14:03 +00:00
Reid Spencer
68a24bdba4 Implement PR614:
These changes modify the makefiles so that the output of flex and bison are
placed in the SRC directory, not the OBJ directory. It is intended that they
be checked in as any other LLVM source so that platforms without convenient
access to flex/bison can be compiled. From now on, if you change a .y or
.l file you *must* also commit the generated .cpp and .h files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23115 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-27 18:50:39 +00:00
Chris Lattner
e3cbf823f0 spell this right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23099 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-26 20:55:40 +00:00
Chris Lattner
5f89bf0f9d spell this variable right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23095 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-26 20:42:52 +00:00
Chris Lattner
8b50f9b8dc Expose a new flag to TargetInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23094 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-26 20:40:46 +00:00
Chris Lattner
9fdd6e3f50 add a marker at the end of the instruction enum list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23090 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-26 20:17:00 +00:00
Chris Lattner
8d30c23d26 Emit this:
static const TargetOperandInfo OperandInfo6[] = { { &PPC32::CRRCRegClass }, { 0 }, };

instead of this:

static const TargetOperandInfo OperandInfo6[] = { { PPC32::CRRCRegisterClass }, { 0 }, };

For operand information, which does not require dynamic (startup-time)
initialization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22931 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 20:29:14 +00:00
Chris Lattner
60200e5d32 Expose the derived register classes to the public header, allowing them
to be accessed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22930 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 20:23:42 +00:00
Chris Lattner
ac46893e24 Split register class "Methods" into MethodProtos and MethodBodies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22928 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 19:12:51 +00:00
Chris Lattner
42de581b2f Refactor to use Target.getRegisterClasses consistently, which provides
anonymous regclass definition renaming.

Change the generated code to emit register classes as properly namespace
qualified entities like everything else.

expose the actual class definition as an object, though this isn't quite
usable yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22920 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 18:47:59 +00:00
Chris Lattner
d5aa3e26bb Emit real operand info for instructions. This currently works but is bad
in one way: the generated tables require dynamic initialization for the
register classes.  This will be fixed in a future patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22919 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 18:46:26 +00:00
Chris Lattner
c67c18fd23 Read the namespace field from register classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22918 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 18:45:20 +00:00
Chris Lattner
22c6202bb3 add a setName method to record
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22912 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 17:58:49 +00:00
Chris Lattner
936dd9274a Add a setName method to Record.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22911 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 17:58:11 +00:00
Chris Lattner
0e384b66a7 For now, just emit empty operand info structures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22910 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 16:57:28 +00:00
Chris Lattner
bfd4f55202 Fix a problem jeffc noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22903 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 06:16:04 +00:00
Chris Lattner
fcd60a010b The code emitter generator only supports targets with 32-bit instruction
words.  There is no way for one of these targets to have a > 32-bit immediate!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22897 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 01:04:33 +00:00
Chris Lattner
d98958f4bd now that all of the targets are clean w.r.t. the number of operands for each
instruction defined, actually emit this to the InstrInfoDescriptor, which
allows an assert in the machineinstrbuilder to do some checking for us,
and is required by the dag->dag emitter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22895 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 00:59:49 +00:00
Chris Lattner
cfbf96aa9c Figure out how many operands each instruction has, keep track of whether
or not it's variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22885 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-18 23:38:41 +00:00
Chris Lattner
f372ae6ebc revert this change, which causes breakage, temporarily
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22880 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-18 22:12:31 +00:00
Chris Lattner
a3ac88d8ab When emitting implicit use/def lists, only emit each unique list once. Though
LLVM is able to merge identical static const globals, GCC isn't, and this caused
some bloat in the generated data.  This has a marginal effect on PPC, shrinking
the implicit sets from 10->4, but shrinks X86 from 179 to 23, a much bigger
reduction.

This should speed up the register allocator as well by reducing the dcache
footprint for this static data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22879 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-18 21:36:47 +00:00
Chris Lattner
dcfa353d74 Fill in the numOperands field of the TargetInstrDescriptor struct from the
.td file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22873 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-18 19:45:37 +00:00
Chris Lattner
e96e376833 make is the standard name, not gmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22573 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-02 00:10:52 +00:00
Jeff Cohen
00b16889ab Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 06:12:32 +00:00
Chris Lattner
3e3def9c19 Fix PR595: These error messages should not be looking at CGI.Name, they
should be looking at CGI.TheDef->getName().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22445 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-15 22:43:04 +00:00
Nate Begeman
afc545616a Add support for a TODO; instructions in .td files can now have arguments
printed as part of the opcode.  This allows something like
cmp${cc}ss in the x86 backed to be printed as cmpltss, cmpless, etc.
depending on what the value of $cc is.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22439 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-14 22:50:30 +00:00
Misha Brukman
4391bb537d * Add ability to specify the target LLVM will compile for via configure
* Minor whitespace cleanups


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22197 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-06 19:17:05 +00:00
Misha Brukman
f5f37f0d8f Add a -cvstag option for testing specific branches, such as release candidates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22176 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-26 16:28:55 +00:00
Andrew Lenharth
edd47f21c5 now with a legend, and multiple lines work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22153 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 17:50:51 +00:00
Andrew Lenharth
24d77506d0 OK, the simple scheme for the db plus a couple of cgi scripts that
do the dynamic plotting of stuff.  Still being tested, but makes graphs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22152 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 17:33:42 +00:00
Reid Spencer
74b0f11191 It would help if the headings were sorted properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22096 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-16 19:33:21 +00:00
Reid Spencer
bfb7ca9ccb Fix a brain blunder in the HTML output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22094 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-16 18:52:57 +00:00
Reid Spencer
4dd4e6ae1b Sometimes tab completion is *not* your friend. Added the wrong file, by
accident so now I'm correcting it. The script is userloc.pl not userloc.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22093 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-16 18:30:38 +00:00
Reid Spencer
05eaeae23a Add a script to generate information about the number of lines of code a
user has checked in (not necessarily authored) based on cvs annotate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22091 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-16 18:26:47 +00:00
Chris Lattner
af26d3ea03 add support for fastcc and friends
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21979 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13 20:40:52 +00:00
Misha Brukman
2bb550864d * Fix wording of the warning
* Add autoindent, smartindent, and smarttab options to the file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21905 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-12 21:41:48 +00:00
Chris Lattner
653488d166 Hilight tail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21726 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 06:07:34 +00:00
Andrew Lenharth
e3142bee52 import fix and plot multiple lines at once
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21596 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-27 17:32:41 +00:00
Andrew Lenharth
e43b3fbb5f Generate a gnuplot script for any program and any test (like llc or gcc)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21593 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-27 16:41:50 +00:00
Andrew Lenharth
91aa9eec5f So you want to import nightly tester data into a data base? Have we got the perl script for you
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21592 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-27 16:03:01 +00:00
Andrew Lenharth
6e92729e98 fix for parse, and a start at db import. Using CVS as scp :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21591 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-27 14:57:26 +00:00
Andrew Lenharth
4430e3a4a8 A first step towards being able to do more interesting things with the nightly tester data. Moreinteresting things will come soon, so tune in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21584 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-27 02:13:20 +00:00
Misha Brukman
55d2a1a546 elisp code to help with LLVM code standards compliance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21497 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 17:09:19 +00:00
Misha Brukman
3d6eea518c .vimrc file to aid in LLVM coding standards conformance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21496 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 17:05:04 +00:00
Jeff Cohen
ea3e5e56fd Eliminate tabs and trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21441 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 04:13:13 +00:00
Misha Brukman
3da94aec4d Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21428 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 00:00:37 +00:00
Chris Lattner
a6dcd0ef73 ignore generated files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21362 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-19 15:34:36 +00:00
Chris Lattner
6e19b5b792 fix bogus warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21361 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-19 15:32:30 +00:00
Chris Lattner
7dda395004 Major change to tblgen: instead of resolving values every time a class is
finished up, only resolve fully when the def is defined.  This allows things
to be changed and all uses to be propagated through.  This implements
TableGen/LazyChange.td and fixes TemplateArgRename.td in the process.

None of the .td files used in LLVM backends are changed at all by this
patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21344 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-19 03:36:21 +00:00
Chris Lattner
577057faaa implementing shifting of literal integers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21336 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-19 01:17:35 +00:00
Chris Lattner
b9266f880a Add initial lexer and parser support for shifting values. Every use of this
will lead to it being rejected though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21335 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-19 01:11:03 +00:00
Chris Lattner
8f45731da5 spiff up the nightly tester output one more notch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20650 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 16:07:45 +00:00
Chris Lattner
5e5d2203cd Print out who commits and what files were modified at the bottom of the test summary log sent to llvm-commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20641 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-16 17:09:53 +00:00
Chris Lattner
0bb4828f17 Fix computation of compiled objects, contributed by Vladimir Merzliakov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20564 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-11 20:17:04 +00:00
Misha Brukman
d3a5412d1d Replace tabs with spaces, separate function arguments with a space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20538 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 16:32:33 +00:00
Chris Lattner
453d062182 Improve formatting of the sent mail for the dj test results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20537 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 16:26:50 +00:00
Chris Lattner
004e19e38d Include local time on the web page for start/end times.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20150 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 16:08:30 +00:00
Chris Lattner
417c4d5b4a This method takes sys::Path objects now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19773 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:32:16 +00:00
Chris Lattner
220df9c13d Drop dead #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19768 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:16:56 +00:00
Chris Lattner
537a49a85a The meat of this utility has been moved to FileUtilities, where it can be
used by other tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19767 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:15:47 +00:00
Chris Lattner
131ca38c60 Minor fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19761 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 20:59:38 +00:00
Chris Lattner
38c0751a12 This is the final big of factoring. This shares cases in suboperand
differences, which means that identical instructions (after stripping off
the first literal string) do not run any different code at all.  On the X86,
this turns this code:

    switch (MI->getOpcode()) {
    case X86::ADC32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::ADC32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::ADC32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::ADD32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::ADD32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::ADD32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::AND32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::AND32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::AND32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::CMP32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::CMP32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::MOV32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::MOV32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::OR32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::OR32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::OR32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::ROL32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::ROR32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::SAR32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::SBB32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::SBB32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::SBB32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::SHL32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::SHLD32mrCL: printOperand(MI, 4, MVT::i32); break;
    case X86::SHR32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::SHRD32mrCL: printOperand(MI, 4, MVT::i32); break;
    case X86::SUB32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::SUB32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::SUB32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::TEST32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::TEST32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::TEST8mi: printOperand(MI, 4, MVT::i8); break;
    case X86::XCHG32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::XOR32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
    }

into this:

    switch (MI->getOpcode()) {
    case X86::ADC32mi:
    case X86::ADC32mr:
    case X86::ADD32mi:
    case X86::ADD32mr:
    case X86::AND32mi:
    case X86::AND32mr:
    case X86::CMP32mi:
    case X86::CMP32mr:
    case X86::MOV32mi:
    case X86::MOV32mr:
    case X86::OR32mi:
    case X86::OR32mr:
    case X86::SBB32mi:
    case X86::SBB32mr:
    case X86::SHLD32mrCL:
    case X86::SHRD32mrCL:
    case X86::SUB32mi:
    case X86::SUB32mr:
    case X86::TEST32mi:
    case X86::TEST32mr:
    case X86::XCHG32mr:
    case X86::XOR32mi:
    case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::ADC32mi8:
    case X86::ADD32mi8:
    case X86::AND32mi8:
    case X86::OR32mi8:
    case X86::ROL32mi:
    case X86::ROR32mi:
    case X86::SAR32mi:
    case X86::SBB32mi8:
    case X86::SHL32mi:
    case X86::SHR32mi:
    case X86::SUB32mi8:
    case X86::TEST8mi:
    case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
    }

After this, the generated asmwriters look pretty much as though they were
generated by hand.  This shrinks the X86 asmwriter.inc files from 55101->39669
and 55429->39551 bytes each, and PPC from 16766->12859 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19760 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 20:31:17 +00:00
Chris Lattner
f876668518 Implement *even more* factoring. In particular, if all of the instruction
strings starts out with a constant string, we emit the string first, using
a table lookup (instead of a switch statement).

Because this is usually the opcode portion of the asm string, the differences
between the instructions have now been greatly reduced.  This allows many
more case statements to be grouped together.

This patch also allows instruction cases to be grouped together when the
instruction patterns are exactly identical (common after the opcode string
has been ripped off), and when the differing operand is a MachineInstr
operand that needs to be formatted.

The end result of this is a mean and lean generated AsmPrinter!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19759 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 19:22:23 +00:00
Chris Lattner
d648867173 Refactor code for numbering instructions into CodeGenTarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19758 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 18:58:51 +00:00