Evan Cheng
07a4e5ceb1
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).
llvm-svn: 28458
2006-05-25 00:21:44 +00:00
Chris Lattner
e7549961cf
Don't make zero-sized static arrays
...
llvm-svn: 28448
2006-05-24 17:31:02 +00:00
Chris Lattner
aa2372562e
Patches to make the LLVM sources more -pedantic clean. Patch provided
...
by Anton Korobeynikov! This is a step towards closing PR786.
llvm-svn: 28447
2006-05-24 17:04:05 +00:00
Evan Cheng
886e8f35aa
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.
llvm-svn: 28389
2006-05-19 07:24:32 +00:00
Evan Cheng
d8e2f6ebc1
lib/Target/Target.td
...
llvm-svn: 28386
2006-05-18 20:42:07 +00:00
Evan Cheng
fe72285033
Don't generate getCalleeSaveReg and getCalleeSaveRegClasses anymore.
...
llvm-svn: 28376
2006-05-18 00:08:46 +00:00
Evan Cheng
318a68e1ee
Typo
...
llvm-svn: 28366
2006-05-17 20:55:51 +00:00
Evan Cheng
f5ef47fe74
Remove PointerType from target definition. Use abstract type MVT::iPTR to
...
represent pointer type.
llvm-svn: 28363
2006-05-17 20:37:59 +00:00
Evan Cheng
d985d66781
Allow patterns to refer to physical registers that belong to multiple
...
register classes.
llvm-svn: 28323
2006-05-16 07:05:30 +00:00
Reid Spencer
11b002365f
Don't try to reference uninitialized data. Make sure we can find "nm".
...
llvm-svn: 28277
2006-05-13 02:48:45 +00:00
Evan Cheng
21c7c23d7e
Noop instruction
...
llvm-svn: 28241
2006-05-12 07:47:00 +00:00
Evan Cheng
e2c1aedc23
Unused instruction
...
llvm-svn: 28240
2006-05-12 07:42:01 +00:00
Evan Cheng
229a6d0026
Also add super- register classes info.
...
llvm-svn: 28221
2006-05-11 07:30:26 +00:00
Evan Cheng
32982836b6
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.
llvm-svn: 28209
2006-05-10 02:47:57 +00:00
Evan Cheng
d2b8067748
Fix a load folding bug. It is exposed by a multi- resulting instructions
...
def : Pat<> pattern.
llvm-svn: 28208
2006-05-10 00:05:46 +00:00
Evan Cheng
5e7ba0b049
Add sub-register class information.
...
llvm-svn: 28195
2006-05-09 06:34:26 +00:00
Reid Spencer
bf98e9f001
Attempt to get this script working on Darwin.
...
llvm-svn: 28085
2006-05-03 18:16:01 +00:00
Evan Cheng
386fb9b0fd
Set isStore of instructions with ISD::TRUNCSTORE root node.
...
llvm-svn: 28075
2006-05-03 02:08:34 +00:00
Chris Lattner
4b177f089e
Put instruction names into the first non TargetInstrInfo namespace found.
...
llvm-svn: 28043
2006-05-01 23:46:16 +00:00
Chris Lattner
017b93dd7c
instructions can be in different namespaces. Make sure to use the right
...
one for each instruction.
llvm-svn: 28038
2006-05-01 17:01:17 +00:00
Evan Cheng
8e63393bc3
Formating
...
llvm-svn: 28036
2006-05-01 09:30:17 +00:00
Evan Cheng
c2ef5e34a8
Mark instructions whose pattern is (store ...) isStore.
...
llvm-svn: 28032
2006-05-01 09:04:20 +00:00
Evan Cheng
c5e8ce8b8c
Remove the temporary option: -no-isel-fold-inflight
...
llvm-svn: 28012
2006-04-28 18:54:11 +00:00
Evan Cheng
54acf6eddc
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.
llvm-svn: 28002
2006-04-28 02:08:10 +00:00
Nate Begeman
4ca2ea5b43
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.
llvm-svn: 27947
2006-04-22 18:53:45 +00:00
Reid Spencer
d835ea4c1c
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).
llvm-svn: 27928
2006-04-21 05:29:25 +00:00
Reid Spencer
5e6f97b7c9
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.
llvm-svn: 27921
2006-04-20 23:09:57 +00:00
Reid Spencer
0a1de79808
Remove the llvm-config directory. Its now in tools.
...
llvm-svn: 27918
2006-04-20 21:16:32 +00:00
Reid Spencer
6826031c70
llvm-config doesn't live here anymore ==> tools
...
llvm-svn: 27917
2006-04-20 21:15:41 +00:00
Reid Spencer
8794317843
Update the library dependencies for 1.8 with SparcV9 now gone.
...
llvm-svn: 27910
2006-04-20 19:50:53 +00:00
Reid Spencer
53345be5e2
Remove Burg as a directory to be considered.
...
llvm-svn: 27906
2006-04-20 18:47:13 +00:00
Chris Lattner
32150b90b7
remove some stuff
...
llvm-svn: 27903
2006-04-20 18:43:59 +00:00
Reid Spencer
06502b6135
Burg not needed any more now that SparcV9 is gone.
...
llvm-svn: 27901
2006-04-20 18:39:19 +00:00
Chris Lattner
778509c844
Don't fill in fields that no longer exist.
...
llvm-svn: 27898
2006-04-20 18:32:22 +00:00
Evan Cheng
9235d848b7
Rename AddedCost to AddedComplexity.
...
llvm-svn: 27841
2006-04-19 20:36:09 +00:00
Evan Cheng
aa3325e925
Allow "let AddedCost = n in" to increase pattern complexity.
...
llvm-svn: 27834
2006-04-19 18:07:24 +00:00
Chris Lattner
3db2056315
Fix a build failure on Vladimir's tester.
...
llvm-svn: 27785
2006-04-18 00:21:25 +00:00
Chris Lattner
e2e2cc5b28
Encode a cost of zero as a cost of 1.
...
llvm-svn: 27745
2006-04-17 05:25:16 +00:00
Chris Lattner
3dcfef6310
Really, I can count!
...
llvm-svn: 27743
2006-04-17 05:05:52 +00:00
Chris Lattner
895dba9714
assign stable opcodes to the various altivec ops.
...
llvm-svn: 27741
2006-04-17 00:47:18 +00:00
Chris Lattner
77a3ca6357
PPCPerfectShuffle.h is autogenerated, don't include it in the LOC counts.
...
llvm-svn: 27740
2006-04-17 00:46:09 +00:00
Chris Lattner
ac66b4a11d
Rename BuildShuffleTable -> PerfectShuffle
...
llvm-svn: 27738
2006-04-17 00:35:34 +00:00
Chris Lattner
156c85ea42
rename the table
...
llvm-svn: 27737
2006-04-17 00:33:35 +00:00
Chris Lattner
2951955da9
Initial checking of a perfect shuffle generation program for 4-element
...
Altivec vectors.
llvm-svn: 27736
2006-04-17 00:30:41 +00:00
Reid Spencer
9a20587c27
Allow an option, -with-externals, to be specified that provides the location
...
of the external tests. This turns into --with-externals option to configure.
llvm-svn: 27700
2006-04-14 13:53:56 +00:00
Reid Spencer
56fdf9ed40
Add missing things to the distribution.
...
llvm-svn: 27650
2006-04-13 06:27:20 +00:00
Chris Lattner
24c430c13a
one too many l's
...
llvm-svn: 27641
2006-04-13 04:21:31 +00:00
Reid Spencer
d76e0a835b
Fix a typo in the name of a file.
...
llvm-svn: 27636
2006-04-12 23:15:10 +00:00
Reid Spencer
6a02282098
Additional files to distribute.
...
llvm-svn: 27627
2006-04-12 20:54:01 +00:00
Reid Spencer
dc830e07b7
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
llvm-svn: 27623
2006-04-12 19:06:14 +00:00
Andrew Lenharth
e45e71a912
make recovering running_Olden data easier when the nightly tester eats the graphs
...
llvm-svn: 27615
2006-04-12 17:41:19 +00:00
Chris Lattner
989b16e488
Fix a typo: Instr* -> Intr*
...
llvm-svn: 27568
2006-04-10 22:02:59 +00:00
Chris Lattner
726df0bb82
Infer element types for shuffle masks
...
llvm-svn: 27456
2006-04-06 20:36:51 +00:00
Chris Lattner
09575a9b0a
rename a method, to avoid confusion with llvm intrinsics.
...
llvm-svn: 27455
2006-04-06 20:19:52 +00:00
Chris Lattner
89df307b61
Adjust the Intrinsics.gen interface a little bit
...
llvm-svn: 27345
2006-04-02 03:35:30 +00:00
Chris Lattner
470d0181e9
regenerate
...
llvm-svn: 27313
2006-03-31 21:54:11 +00:00
Chris Lattner
51ffbf18f0
Generalize the previous binary operator support and add a string concatenation
...
operation. This implements Regression/TableGen/strconcat.td.
llvm-svn: 27312
2006-03-31 21:53:49 +00:00
Chris Lattner
6b7ccbe4d8
Allow bits init values to be used in patterns, turn them into ints.
...
llvm-svn: 27286
2006-03-31 05:25:56 +00:00
Chris Lattner
03dfc41ba2
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.
llvm-svn: 27283
2006-03-31 04:48:26 +00:00
Chris Lattner
3abe174165
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.
llvm-svn: 27281
2006-03-31 04:24:58 +00:00
Chris Lattner
bab91842ba
regenerate
...
llvm-svn: 27264
2006-03-30 22:51:12 +00:00
Chris Lattner
b59cf3cff4
Implement Regression/TableGen/DagDefSubst.ll
...
llvm-svn: 27263
2006-03-30 22:50:40 +00:00
Evan Cheng
c2c8b58cf6
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. :-)
llvm-svn: 27237
2006-03-28 22:25:56 +00:00
Chris Lattner
7c9740a9ed
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
llvm-svn: 27202
2006-03-28 00:41:33 +00:00
Chris Lattner
8a2ae8b766
Only compute intrinsic valuetypes when in a target .td file.
...
llvm-svn: 27197
2006-03-28 00:15:00 +00:00
Chris Lattner
ac2512a261
revert this, it breaks things.
...
llvm-svn: 27196
2006-03-28 00:03:08 +00:00
Chris Lattner
c92f688ef3
Add support for decoding iPTR to the right pointer type.
...
llvm-svn: 27188
2006-03-27 22:48:18 +00:00
Chris Lattner
5386598187
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!
llvm-svn: 27185
2006-03-27 22:21:18 +00:00
Chris Lattner
8c46ff2d12
Add a missing check which cause an invalid .td file to crash tblgen
...
llvm-svn: 27126
2006-03-25 22:12:44 +00:00
Chris Lattner
23555e3947
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
llvm-svn: 27110
2006-03-25 06:47:53 +00:00
Chris Lattner
c8565ed651
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
llvm-svn: 27090
2006-03-24 23:10:39 +00:00
Chris Lattner
85586baee7
fix 80 column violations
...
llvm-svn: 27084
2006-03-24 21:52:20 +00:00
Chris Lattner
e352e7aa85
Parse intrinsics correctly and perform type propagation. This doesn't currently
...
emit the code to select intrinsics, but that is next :)
llvm-svn: 27082
2006-03-24 21:48:51 +00:00
Jim Laskey
f0729b4067
Add dwarf register numbering to register data.
...
llvm-svn: 27081
2006-03-24 21:15:58 +00:00
Chris Lattner
bbba823706
Make sure to initialize the TheDef field!
...
llvm-svn: 27078
2006-03-24 20:25:01 +00:00
Chris Lattner
2c58141fd9
Move CodeGenIntrinsic implementation to CodeGenTarget.cpp with the rest of
...
the CodeGen* implementations.
Parse the MVT::ValueType for each operand of the intrinsics.
llvm-svn: 27075
2006-03-24 19:49:31 +00:00
Chris Lattner
97b0d99651
extract some more information from the intrinsic table
...
llvm-svn: 27022
2006-03-24 01:13:55 +00:00
Reid Spencer
a5579d0642
Remove the interpreter component as its not working at the moment.
...
llvm-svn: 27021
2006-03-24 01:10:39 +00:00
Reid Spencer
e14a201031
Add a .cvsignore file to get rid of notices about gram.tab.[ch]
...
llvm-svn: 27012
2006-03-23 23:46:47 +00:00
Reid Spencer
1e0552f838
Add new generated files to be ignored.
...
llvm-svn: 27011
2006-03-23 23:45:32 +00:00
Reid Spencer
d731a8c5c4
Ignore temporary files generated by building.
...
llvm-svn: 27010
2006-03-23 23:44:24 +00:00
Reid Spencer
972bea5c69
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.
llvm-svn: 27005
2006-03-23 23:21:29 +00:00
Reid Spencer
9573f0e5fd
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.
llvm-svn: 27003
2006-03-23 23:04:50 +00:00
Reid Spencer
a42c0a0923
Don't print out ugly command line when building LibDeps.txt.
...
llvm-svn: 27001
2006-03-23 22:42:50 +00:00
Reid Spencer
4ef5ad14fa
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.
llvm-svn: 26976
2006-03-23 06:15:27 +00:00
Evan Cheng
eb0ce0c547
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)>;
llvm-svn: 26968
2006-03-23 02:35:32 +00:00
Reid Spencer
6f682b79af
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.
llvm-svn: 26952
2006-03-22 15:59:55 +00:00
Evan Cheng
c0af9c6478
Don't forget to promote xform function to an explicit node for def : Pat<>
...
patterns.
llvm-svn: 26929
2006-03-21 20:44:17 +00:00
Chris Lattner
02ad00ad93
minor code simplification
...
llvm-svn: 26918
2006-03-21 06:42:58 +00:00
Reid Spencer
1e2433f703
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.
llvm-svn: 26916
2006-03-21 01:21:39 +00:00
Evan Cheng
af7de1fba8
The node wrapped in PatLeaf<> should be treated as a leaf even if it isn't
...
one, i.e. don't select it.
llvm-svn: 26909
2006-03-20 22:53:06 +00:00
Evan Cheng
5ece6fa3e0
It should be ok for a xform output type to be different from input type.
...
llvm-svn: 26899
2006-03-20 08:09:17 +00:00
Evan Cheng
a84bdebfd2
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.
llvm-svn: 26892
2006-03-20 06:04:09 +00:00
Chris Lattner
c1b31d8a83
Add a new SDTCisIntVectorOfSameSize type constraint
...
llvm-svn: 26890
2006-03-20 05:39:48 +00:00
Reid Spencer
d2ff59bfed
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).
llvm-svn: 26876
2006-03-19 22:12:30 +00:00
Reid Spencer
80354c069a
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.
llvm-svn: 26875
2006-03-19 22:10:53 +00:00
Reid Spencer
89f33a14b8
Add a -flat option for generating the library dependencies in a flat
...
format with one library per line, similar to a makefile dependency list.
llvm-svn: 26873
2006-03-19 22:08:01 +00:00
Evan Cheng
f9d75843f3
getEnumName() missed v8i8, v4i16, and v2i32 types
...
llvm-svn: 26869
2006-03-19 07:57:34 +00:00
Chris Lattner
f878f6aa54
Fix miscodegen of V_SET0 in PPC.
...
llvm-svn: 26836
2006-03-18 00:40:36 +00:00
Reid Spencer
d1453ef454
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.
llvm-svn: 26825
2006-03-17 17:43:01 +00:00
Chris Lattner
09ffafcf54
allow the GCCBuiltinName field to be optional
...
llvm-svn: 26784
2006-03-15 19:15:26 +00:00
Jeff Cohen
c4e2468251
Fix VC++ build error.
...
llvm-svn: 26773
2006-03-15 02:51:05 +00:00
Chris Lattner
1c32e04b5f
remove typo
...
llvm-svn: 26772
2006-03-15 02:05:38 +00:00
Chris Lattner
da1a4cc6a4
Autogenerate a table of intrinsic names, so we can map from intrinsic ID to
...
LLVM intrinsic function name.
llvm-svn: 26771
2006-03-15 01:55:21 +00:00
Chris Lattner
402a573764
Autogenerate code to map from GCC builtin to LLVM intrinsic.
...
llvm-svn: 26770
2006-03-15 01:33:26 +00:00
Reid Spencer
3e2d463a87
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.
llvm-svn: 26751
2006-03-14 06:08:05 +00:00
Reid Spencer
552aa01d12
Change llvm.cs.uiuc.edu -> llvm.org
...
llvm-svn: 26750
2006-03-14 06:05:05 +00:00
Reid Spencer
3eb12e9a2a
Add a newline at the end to avoid gcc warnings.
...
llvm-svn: 26749
2006-03-14 05:59:52 +00:00
Reid Spencer
c67a060a51
Convert llvm.cs.uiuc.edu -> llvm.org
...
llvm-svn: 26748
2006-03-14 05:54:52 +00:00
Chris Lattner
fea17a9901
emit a mapping from LLVM intrinsic -> GCC builtins.
...
llvm-svn: 26736
2006-03-13 23:08:44 +00:00
Chris Lattner
5b6ec4a5ea
Verify that packed type operands have the right size and base type.
...
llvm-svn: 26735
2006-03-13 22:38:57 +00:00
Chris Lattner
69035f00e3
fix pasto in generate assertion msg
...
llvm-svn: 26706
2006-03-11 00:20:47 +00:00
Chris Lattner
e3c2db3955
generate side-effect info
...
llvm-svn: 26672
2006-03-09 22:37:52 +00:00
Chris Lattner
06c7300bf1
Parse mod/ref properties, autogen mod/ref information
...
llvm-svn: 26669
2006-03-09 22:30:49 +00:00
Chris Lattner
6efe863a70
parse intrinsic types
...
autogenerate an intrinsic verifier
llvm-svn: 26666
2006-03-09 22:05:04 +00:00
Chris Lattner
6d8104efd2
autogenerate the function name recognizer
...
llvm-svn: 26663
2006-03-09 20:34:19 +00:00
Evan Cheng
c47620b5d8
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.
llvm-svn: 26638
2006-03-09 08:19:11 +00:00
Evan Cheng
0fab08eae3
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.
llvm-svn: 26592
2006-03-07 08:31:27 +00:00
Chris Lattner
ae0f1512c9
Silence a warning.
...
llvm-svn: 26508
2006-03-03 19:34:28 +00:00
Chris Lattner
f6e846eee8
Fix pasteo
...
llvm-svn: 26499
2006-03-03 06:13:41 +00:00
Chris Lattner
94f300d15c
remove a bunch of long-dead testing code
...
llvm-svn: 26497
2006-03-03 02:34:28 +00:00
Chris Lattner
c313d0b712
initial implementation of intrinsic parsing
...
llvm-svn: 26495
2006-03-03 02:32:46 +00:00
Chris Lattner
73fbe145fd
remove out of date comment
...
llvm-svn: 26492
2006-03-03 02:04:07 +00:00
Chris Lattner
1edf15e48e
Add support for "-Ifoo" in addition to "-I foo"
...
llvm-svn: 26487
2006-03-03 01:53:40 +00:00
Chris Lattner
d7f6b55afa
Regenerate
...
llvm-svn: 26486
2006-03-03 01:47:37 +00:00
Chris Lattner
e7b74c5da1
add support for multiple include directories
...
llvm-svn: 26485
2006-03-03 01:47:14 +00:00
Evan Cheng
53a2d60bca
New vector type v2f32.
...
llvm-svn: 26437
2006-03-01 01:10:52 +00:00
Chris Lattner
dc445eadc0
Select inline asm memory operands.
...
llvm-svn: 26349
2006-02-24 02:13:31 +00:00
Evan Cheng
43070b7541
Added x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
...
packed word integer (v8i16), and 64-bit packed doubleword integer (v2i32).
llvm-svn: 26294
2006-02-20 22:34:53 +00:00
Jeff Cohen
0add83e969
Fix bugs identified by VC++.
...
llvm-svn: 26287
2006-02-18 03:20:33 +00:00
Evan Cheng
33f4156663
Bump up pattern cost if the resulting instruction is marked
...
usesCustomDAGSchedInserter.
llvm-svn: 26282
2006-02-18 02:33:09 +00:00
Chris Lattner
3e15eac81b
Check the new form for bison output into CVS
...
llvm-svn: 26208
2006-02-15 07:24:01 +00:00
Chris Lattner
ecd162d5cd
Adjust to new form of handling lexer dependencies, this way shouldn't have
...
the problems the old way did.
llvm-svn: 26161
2006-02-14 05:13:13 +00:00
Evan Cheng
5940bc210e
Call InsertISelMapEntry rather than map insertion operator to prevent overly
...
aggrssive inlining. This reduces Select_store frame size from 24k to 10k.
llvm-svn: 26095
2006-02-09 22:12:27 +00:00
Evan Cheng
9ce762d51f
Match getTargetNode() changes (now returns SDNode* instead of SDOperand).
...
llvm-svn: 26084
2006-02-09 07:16:09 +00:00
Evan Cheng
6dc90ca172
Change Select() from
...
SDOperand Select(SDOperand N);
to
void Select(SDOperand &Result, SDOperand N);
llvm-svn: 26067
2006-02-09 00:37:58 +00:00
Evan Cheng
df5ef770b6
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"
llvm-svn: 26057
2006-02-08 09:08:06 +00:00
Evan Cheng
0ba2808775
Remove -pedantic. It no longer works.
...
llvm-svn: 26055
2006-02-08 07:28:22 +00:00
Evan Cheng
1630c2848f
Hoist all SDOperand declarations within a Select_{opcode}() to the top level
...
to reduce stack memory usage. This is intended to work around the gcc bug.
llvm-svn: 26026
2006-02-07 00:37:41 +00:00
Chris Lattner
5c76b499aa
Add support for modifier strings in machine instr descriptions. This allows
...
us to avoid creating lots of "Operand" types with different printers, instead
we can fold several together and use modifiers. For example, we can now use:
${target:call} to say that the operand should be printed like a 'call' operand.
llvm-svn: 26024
2006-02-06 23:40:48 +00:00
Chris Lattner
033e32e5d9
Simplify the variant handling code, no functionality change.
...
llvm-svn: 26023
2006-02-06 22:43:28 +00:00
Evan Cheng
ebf05bea1b
At the end of isel, select a replacement node for each handle that does not
...
have one. This can happen if a load's real uses are dead (i.e. they do not
have uses themselves).
llvm-svn: 26014
2006-02-06 08:12:55 +00:00
Evan Cheng
308d0090e6
Name change.
...
llvm-svn: 26013
2006-02-06 06:03:35 +00:00
Evan Cheng
aa26555b25
Handle HANDLENODE: just return itself.
...
llvm-svn: 26011
2006-02-05 08:46:14 +00:00
Evan Cheng
368f20e53d
Allow more loads to be folded which were previously prevented from happening
...
due to ordering issue. i.e. they were selected for chain use first.
Now at load select time, check if it is being selected for a chain use and if
it has only a single real use. If so, return a HANDLENODE (with the load as
its operand) in its place and record it.
When it is folded or the load is selected for a real use, the isel records it
as the replacement for the HANDLENODE. The replacement is done when all nodes
are selected.
This scheme exposed a couple of problems where cycles can happen. (See comments
in EmitMatchCode() for descriptions of the problems and their workaround /
solutions.) These problems have been resolved with a small compile time
penality.
llvm-svn: 25995
2006-02-05 06:43:12 +00:00
Evan Cheng
7ab4579c68
Re-committing the last bit of change. It shouldn't break PPC this time.
...
llvm-svn: 25982
2006-02-05 05:22:18 +00:00
Chris Lattner
586b06281c
Temporarily revert the last change, which breaks PPC and other targets that
...
DO select things.
llvm-svn: 25970
2006-02-04 09:23:06 +00:00
Evan Cheng
ce87cac555
Complex pattern's custom matcher should not call Select() on any operands.
...
Select them afterwards if it returns true.
llvm-svn: 25968
2006-02-04 08:50:49 +00:00
Chris Lattner
2bcfc52af6
node predicates add to the complexity of a pattern. This ensures that the
...
X86 backend attempts to match small-immediate versions of instructions before
the full size immediate versions.
llvm-svn: 25937
2006-02-03 18:06:02 +00:00
Evan Cheng
717db484a5
(store (op (load ...))) folding problem. In the generated matching code,
...
Chain is initially set to the chain operand of store node, when it reaches
load, if it matches the load then Chain is set to the chain operand of the
load.
However, if the matching code that follows this fails, isel moves on to the
next pattern but it does not restore Chain to the chain operand of the store.
So when it tries to match the next store / op / load pattern it would fail on
the Chain == load.getOperand(0) test.
The solution is for each chain operand to get a unique name. e.g. Chain10.
llvm-svn: 25931
2006-02-03 06:22:41 +00:00
Chris Lattner
244e800c19
add a note, ya knoe
...
llvm-svn: 25880
2006-02-01 19:12:23 +00:00
Evan Cheng
88e616d803
If a pattern's root node is a constant, its size should be 3 rather than 2.
...
llvm-svn: 25870
2006-02-01 06:06:31 +00:00
Chris Lattner
af1fd048cb
solaris won't clobber an existing symlink with ln -sf apparently
...
llvm-svn: 25849
2006-01-31 16:10:53 +00:00
Chris Lattner
0d3ef40656
implement test/Regression/TableGen/DagIntSubst.ll
...
llvm-svn: 25836
2006-01-31 06:02:35 +00:00
Chris Lattner
a8821624d4
simplify some code
...
llvm-svn: 25791
2006-01-29 20:01:35 +00:00
Andrew Lenharth
1af077c0c7
it is nice not to chop off bits for those blessed with lots of bits
...
llvm-svn: 25766
2006-01-29 05:22:37 +00:00
Andrew Lenharth
49f323a90e
make the casts actually cast to the variable type
...
llvm-svn: 25765
2006-01-29 05:17:22 +00:00
Andrew Lenharth
c438c51e82
start of the 64bit safety cleanup
...
llvm-svn: 25764
2006-01-29 05:07:04 +00:00
Chris Lattner
0e352963fd
Emit series of conditionals with &&, emitting stuff like this:
...
if (N1.getOpcode() == ISD::LOAD &&
N1.hasOneUse() &&
!CodeGenMap.count(N1.getValue(0)) &&
!CodeGenMap.count(N1.getValue(1))) {
instead of this:
if (N1.getOpcode() == ISD::LOAD) {
if (N1.hasOneUse()) {
if (!CodeGenMap.count(N1.getValue(0))) {
if (!CodeGenMap.count(N1.getValue(1))) {
llvm-svn: 25763
2006-01-29 04:41:05 +00:00
Chris Lattner
7c0149d1d6
Factor matching code that is common between patterns. This works around
...
GCC not jump-threading across this common code, and produces far nicer
output.
llvm-svn: 25762
2006-01-29 04:25:26 +00:00
Chris Lattner
d3a63de91e
Split out code generation from analysis from emission
...
llvm-svn: 25759
2006-01-29 02:57:39 +00:00
Chris Lattner
afe9baeb69
move some code around, no change in the generated code
...
llvm-svn: 25758
2006-01-29 02:43:35 +00:00
Chris Lattner
5255c6c627
now that we have control over emission of the code, emit the code using nested
...
"if" statements (indenting it appropriately, of course) instead of using goto's.
This inverts the logic for all of the if statements, which makes things simpler
to understand in addition to making the generated code easier to read.
llvm-svn: 25757
2006-01-28 20:43:52 +00:00
Chris Lattner
4c4da201bf
Change PatternCodeEmitter to emit code into a buffer instead of emitting it
...
directly to the output file. This makes things simple because the code doesn't
have to worry about indentation or the case when there is no goto. It also
allows us to indent the code better without touching everything :)
llvm-svn: 25756
2006-01-28 20:31:24 +00:00
Reid Spencer
4bfd3b40b0
Make long warnings wrap and have less indent so other portions of the page
...
are not skewed out of view.
llvm-svn: 25753
2006-01-28 19:44:48 +00:00
Chris Lattner
a7d6bbff00
Fit to 80 columns, no functionality change
...
llvm-svn: 25752
2006-01-28 19:06:51 +00:00
Jeff Cohen
e251e92c23
Teach tablegen to generate code that is VC++ warning-free.
...
llvm-svn: 25709
2006-01-27 22:22:28 +00:00
Evan Cheng
e555a92c8d
(store (op (load ...)), ...)
...
If store's chain operand is load, then use load's chain operand instead. If
it isn't (likely a TokenFactor), then do not allow the folding.
llvm-svn: 25708
2006-01-27 22:13:45 +00:00
Evan Cheng
d98701c639
Subtarget feature can now set any variable to any value
...
llvm-svn: 25678
2006-01-27 08:09:42 +00:00
Chris Lattner
4d5a93ed28
Use printInlineAsm to, well, print inline asm's.
...
llvm-svn: 25677
2006-01-27 02:10:50 +00:00
Chris Lattner
543fe4b6aa
PHI and INLINEASM are now builtin instructions provided by Target.td
...
llvm-svn: 25673
2006-01-27 01:45:06 +00:00
Chris Lattner
db2a5f09f1
If we want to emit things in enum order, use getInstructionsByEnumValue to
...
get the order, don't compute it ourselves.
Don't emit stuff like (14<<0), emit 14 instead.
Don't attempt to get target properties for builtin instructions.
llvm-svn: 25672
2006-01-27 01:44:09 +00:00
Chris Lattner
ac8b13b32b
There is at least a 'noitinerary' itinerary now
...
llvm-svn: 25671
2006-01-27 01:41:55 +00:00
Chris Lattner
ec249a3d30
Don't emit JIT code for these instructions
...
llvm-svn: 25669
2006-01-27 01:39:38 +00:00
Chris Lattner
5815669251
Teach the dag selectors to select InlineAsm nodes.
...
Aren't we happy the pattern selectors are almost all gone?
llvm-svn: 25666
2006-01-26 23:08:55 +00:00
Evan Cheng
e9025f1f3b
Another folding problem: if a node r/w chain or flag, don't fold it if it
...
has already been selected. The number of use check is not strong enough since
a node can be replaced with newly created target node. e.g. If the original
node has two uses, when it is selected for one of the uses it is replaced with
another. Each node now has a single use but isel still should not fold it.
llvm-svn: 25651
2006-01-26 19:13:45 +00:00
Evan Cheng
dc8365d4f3
Add a FIXME comment.
...
llvm-svn: 25635
2006-01-26 02:13:31 +00:00
Evan Cheng
ecfaa0a1c9
Incoming (and optional) flag bugs. They may be embedded inside a inner node of
...
a pattern. Also, nodes which take incoming flag should not be folded if it has
more than one use.
llvm-svn: 25627
2006-01-26 00:22:25 +00:00
Evan Cheng
c5c228fa59
Fix an optional in flag bug.
...
llvm-svn: 25590
2006-01-24 20:46:50 +00:00
Evan Cheng
295e196558
Optional InFlag was not being included in node.
...
llvm-svn: 25588
2006-01-24 20:07:38 +00:00
Evan Cheng
e272b4ec17
Prevent folding of a node with multiple uses if the node already folds a load!
...
Here is an example where the load ended up being done twice:
%A = global uint 0
uint %test(uint %B, ubyte %C) {
%tmp = load uint *%A;
%X = shl uint %tmp, ubyte %C
%Cv = sub ubyte 32, %C
%Y = shr uint %B, ubyte %Cv
%Z = or uint %Y, %X
store uint %Z, uint* %A
ret uint %Z
}
==>
subl $4, %esp
movl %ebx, (%esp)
movl 8(%esp), %edx
movl A, %eax
movb 12(%esp), %bl
movb %bl, %cl
shldl %cl, %edx, %eax
movb %bl, %cl
shldl %cl, %edx, A
movl (%esp), %ebx
addl $4, %esp
ret
llvm-svn: 25471
2006-01-20 01:11:03 +00:00
Chris Lattner
823a00a8b5
Don't include generated lexer .cpp files.
...
llvm-svn: 25466
2006-01-19 22:01:51 +00:00
Evan Cheng
9e7fb7b2fc
Bug fix. Flag operand number may be calculated incorrectly.
...
llvm-svn: 25465
2006-01-19 21:57:10 +00:00
Evan Cheng
a15731cd50
Use pattern information to determine whether the use expects this
...
instruction to produce a result. e.g MUL8m, the instruction does not
produce a explicit result. However it produces an implicit result in
AL which would be copied to a temp. The root operator of the matching
pattern is a mul so the use would expect it to produce a result.
llvm-svn: 25458
2006-01-19 10:12:58 +00:00
Evan Cheng
acec02ebf5
Prevent unnecessary CopyToReg when the same HW register appears in two spots
...
in the pattern.
llvm-svn: 25437
2006-01-19 01:55:45 +00:00
Chris Lattner
dce31c8d70
fix a broken comment
...
llvm-svn: 25411
2006-01-17 21:31:18 +00:00
John Criswell
5ed803256d
Regenerated the Lex and Yacc output files on Linux. It seems that our
...
Linux machines don't like the source code generated on MacOS X for some
reason.
llvm-svn: 25394
2006-01-17 17:01:34 +00:00
Evan Cheng
61864ec3fe
Emit a type matching check for ComplexPatterns.
...
llvm-svn: 25392
2006-01-17 07:36:41 +00:00
Evan Cheng
a039d439dc
Type inferencing bug
...
llvm-svn: 25337
2006-01-15 10:04:45 +00:00
Evan Cheng
bd1de84121
Allow transformation from GlobalAddress to TargetGlobalAddress and
...
ExternalSymbol to TargetExternalSymbol.
llvm-svn: 25252
2006-01-12 19:35:54 +00:00
Evan Cheng
e6300aaabc
GlobalAddress -> TargetGlobalAddress; ExternalSymbol -> TargetExternalSymbol
...
llvm-svn: 25245
2006-01-12 07:54:57 +00:00
Evan Cheng
31686087cd
Some minor fixes.
...
llvm-svn: 25227
2006-01-11 22:16:13 +00:00
Chris Lattner
e18ad392d3
Always select target registers to themselves
...
llvm-svn: 25218
2006-01-11 19:52:27 +00:00
Chris Lattner
3857f6d067
Emit an error instead of an assertion if trying to do bogus things in result patterns.
...
llvm-svn: 25194
2006-01-11 01:33:49 +00:00
Robert Bocchino
230044839d
Added support for the extractelement operation.
...
llvm-svn: 25181
2006-01-10 19:05:34 +00:00
Evan Cheng
4b0623e141
* Remove instruction fields hasInFlag / hasOutFlag and added SNDPInFlag and
...
SNDPOutFlag to DAG nodes. These properties do not belong to target specific
instructions.
* Added DAG node property SNDPOptInFlag. It's same as SNDPInFlag except it's
optional. Used by ret / call, etc.
llvm-svn: 25154
2006-01-09 18:27:06 +00:00
Evan Cheng
482ef91d26
Pattern complexity calculation fix.
...
llvm-svn: 25133
2006-01-06 22:19:44 +00:00
Evan Cheng
46634d21e3
Tweak pattern complexity calc.
...
llvm-svn: 25122
2006-01-06 02:30:23 +00:00
Evan Cheng
6b037909ff
Bug fix wrt chain operand.
...
llvm-svn: 25115
2006-01-06 00:41:12 +00:00
Jeff Cohen
a69bb989f1
Replace fix with one less disruptive to the original code.
...
Also note that GCC 4.1 also correctly flags the syntax error.
llvm-svn: 25076
2006-01-04 03:23:30 +00:00
Jeff Cohen
7d17a6bc86
Tblgen was generating syntactically illegal C++ code like:
...
SDOperand Tmp0,Tmp1,Tmp2,Tmp3,;
GCC has a bug (24907) in which is fails to catch this, but VC++ correctly
notes its illegality, so tblgen must be taught to only generate legal C++.
llvm-svn: 25075
2006-01-04 03:15:19 +00:00
Chris Lattner
3d38031bef
Remove obsolete comment, make things look a bit nicer
...
llvm-svn: 25070
2006-01-04 00:32:01 +00:00
Chris Lattner
c29793a077
reduce stack usage of the recursive SelectCode function by out-lining each
...
case of the switch statement into its own method.
llvm-svn: 25069
2006-01-04 00:25:00 +00:00
Chris Lattner
81e4dbc6a1
Remove my previous ugly hack that tries to reduce the stack space usage
...
of SelectCode to make way for a better solution.
llvm-svn: 25068
2006-01-03 22:55:16 +00:00
Duraid Madina
def44bec82
HP-UX DVDs are crunchy and good to eat
...
llvm-svn: 25052
2005-12-30 16:41:48 +00:00
Duraid Madina
018da4f5ef
almost got the HP-UX tester up.. :)
...
llvm-svn: 25051
2005-12-30 14:56:37 +00:00
Nate Begeman
336dba6fb1
Add support for generating v4i32 altivec code
...
llvm-svn: 25046
2005-12-30 00:12:56 +00:00
Duraid Madina
ccb1aebcd3
This gets most of the backends building with HP HappyC++.
...
llvm-svn: 25029
2005-12-27 10:56:22 +00:00
Evan Cheng
14c53b45f5
Added field noResults to Instruction.
...
Currently tblgen cannot tell which operands in the operand list are results so
it assumes the first one is a result. This is bad. Ideally we would fix this
by separating results from inputs, e.g. (res R32:$dst),
(ops R32:$src1, R32:$src2). But that's a more distruptive change. Adding
'let noResults = 1' is the workaround to tell tblgen that the instruction does
not produces a result. It works for now since tblgen does not support
instructions which produce multiple results.
llvm-svn: 25017
2005-12-26 09:11:45 +00:00
Duraid Madina
14492afc23
more standards-compliance stuff
...
llvm-svn: 25014
2005-12-26 05:08:55 +00:00
Andrew Lenharth
0dc12c38e5
support targetexternalsym
...
llvm-svn: 25005
2005-12-24 23:36:59 +00:00
Evan Cheng
72aaf8e374
* Support for hasInFlag and hasOutFlag (on instructions). Remove nameless FLAG
...
support which is fragile.
* Fixed a number of bugs.
llvm-svn: 24996
2005-12-23 22:11:47 +00:00
Chris Lattner
d834d495b2
silence some bogus gcc warnings
...
llvm-svn: 24962
2005-12-22 20:37:36 +00:00
Evan Cheng
a87d743912
Attempt to fix a crash on WIN32.
...
llvm-svn: 24936
2005-12-22 02:35:21 +00:00
Evan Cheng
991bc6d6ba
* Added support for FLAG - a special nameless flag register. Can be used as
...
either an operand or a result.
* Fixed some more flag / chain bugs.
llvm-svn: 24933
2005-12-22 02:24:50 +00:00
Evan Cheng
f646926ecf
Allows instructions which no explicit operands. e.g. X86 RET which has but
...
an implicit flag operand.
llvm-svn: 24916
2005-12-21 20:20:49 +00:00
Chris Lattner
812a56e888
Eliminate some GCC warnings from the generated code
...
llvm-svn: 24897
2005-12-21 05:31:05 +00:00
Evan Cheng
4bf64a8ba4
Fix the semantic of Requires<[cond]> to mean if (!cond) goto PXXFail;
...
llvm-svn: 24883
2005-12-20 20:08:01 +00:00
Chris Lattner
777bb6eb45
This ugly patch works around a GCC bug where it is compiling SelectCode to
...
use too much stack space, overflowing the stack for large functions. Instead
of emitting new SDOperands in each match block, we emit some common ones at
the top of SelectCode then reuse them when possible.
This reduces the stack size of SelectCode from 28K to 21K. Note that GCC
compiles it to 512 bytes :-/
I've filed GCC PR 25505 to track this.
llvm-svn: 24882
2005-12-20 19:41:03 +00:00
Evan Cheng
9696f63d3e
Now support instructions with implicit write to non-flag registers.
...
llvm-svn: 24878
2005-12-20 07:37:41 +00:00
Patrick Meredith
2dd7e06d8e
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 ;-)
llvm-svn: 24876
2005-12-20 02:03:23 +00:00
Evan Cheng
fe90b604a4
Lefted out a fix in the previous check in.
...
llvm-svn: 24873
2005-12-20 00:06:17 +00:00
Evan Cheng
19b9f15377
Fix another bug related to chain / flag.
...
llvm-svn: 24868
2005-12-19 22:40:04 +00:00
Evan Cheng
9bd85c2f19
Fixes for a number of bugs: save flag results in CodeGenMap, folded chains
...
may not all have ResNo == 0.
llvm-svn: 24858
2005-12-19 07:18:51 +00:00
Patrick Meredith
136f465fa2
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.
llvm-svn: 24851
2005-12-19 01:23:31 +00:00
Chris Lattner
f7ae0a95fe
Handle basic block nodes
...
llvm-svn: 24833
2005-12-18 21:05:44 +00:00
Chris Lattner
abb11cc83e
More fixes for Selection of copyto/fromreg with a flag
...
llvm-svn: 24829
2005-12-18 15:45:51 +00:00
Chris Lattner
fc3d4f8fd8
Select copytoreg and copyfromreg nodes that have flag operands correctly.
...
llvm-svn: 24827
2005-12-18 15:28:25 +00:00
Evan Cheng
e22f9181f7
Support for read / write from explicit registers with FlagVT type.
...
llvm-svn: 24753
2005-12-17 01:19:28 +00:00
Evan Cheng
d296a43f96
Added support to specify predicates.
...
llvm-svn: 24715
2005-12-14 22:02:59 +00:00
Evan Cheng
6a31777c8e
Skip over srcvalue nodes when generating ISEL code.
...
llvm-svn: 24704
2005-12-14 02:21:57 +00:00
Evan Cheng
6148153230
Bug fix: CodeGenMap[N] = ... -> CodeGenMap[N.getValue(0)] = ...
...
llvm-svn: 24680
2005-12-12 23:45:21 +00:00
Evan Cheng
7e4c01eee3
At top of generated isel SelectCode() is this:
...
if (!N.Val->hasOneUse()) {
std::map<SDOperand, SDOperand>::iterator CGMI = CodeGenMap.find(N);
if (CGMI != CodeGenMap.end()) return CGMI->second;
}
Suppose a DAG like this:
X
^ ^
/ \
USE1 USE2
Suppose USE1 is being selected first and during which X is selected and
returned a new node. After this, USE1 is no longer an use of X. During USE2
selection, X will be selected again since it has only one use!
The fix is to always query CodeGenMap.
llvm-svn: 24679
2005-12-12 23:22:48 +00:00
Evan Cheng
cdb16ef6f3
Bug fix: finding the correct incoming chain for pattern with nested src operand. And a minor change to make output code slightly more readible.
...
llvm-svn: 24669
2005-12-12 19:37:43 +00:00
Chris Lattner
08dbd94632
Send an indicator to llvm-testresults if the build failed
...
llvm-svn: 24665
2005-12-11 19:55:39 +00:00
Nate Begeman
4e56db674c
Add support for TargetConstantPool nodes to the dag isel emitter, and use
...
them in the PPC backend, to simplify some logic out of Select and
SelectAddr.
llvm-svn: 24657
2005-12-10 02:36:00 +00:00
Evan Cheng
0da396ffe2
Stop emitting a redudant type check for complex pattern node.
...
llvm-svn: 24655
2005-12-10 01:57:33 +00:00
Evan Cheng
bac252c289
For instructions which produce no result, e.g. store, chain's Resno == 0.
...
llvm-svn: 24652
2005-12-10 00:09:17 +00:00
Chris Lattner
433573f4c6
Add a new SDTCisPtrTy constraint, which indicates that an operand must have
...
the same type as the pointer type for a target.
llvm-svn: 24649
2005-12-09 22:57:42 +00:00
Evan Cheng
499ab2a9fa
* Do not allow nodes which produce chain results (e.g. loads) to be folded if
...
it has more than one real use (non-chain uses).
* Record folded chain producing node in CodeGenMap.
* Do not fold a chain producing node if it has already been selected as an
operand of a chain use.
llvm-svn: 24647
2005-12-09 22:45:35 +00:00
Evan Cheng
c1f911a238
Prevent folding of instructions which produce chains that have more than 1 real use
...
llvm-svn: 24643
2005-12-09 06:06:08 +00:00
Evan Cheng
f423a17e33
* Make sure complex pattern operands are selected first since their select
...
functions can return false and causing the instruction pattern match to fail.
* Code clean up.
llvm-svn: 24642
2005-12-09 00:48:42 +00:00
Evan Cheng
c9a620060b
* Added an explicit type field to ComplexPattern.
...
* Renamed MatchingNodes to RootNodes.
llvm-svn: 24636
2005-12-08 02:14:08 +00:00
Evan Cheng
9b9567bfb5
Added support for ComplexPattern. These are patterns that require C++ pattern
...
matching code that is not currently auto-generated by tblgen, e.g. X86
addressing mode. Selection routines for complex patterns can return multiple operands, e.g. X86 addressing mode returns 4.
llvm-svn: 24634
2005-12-08 02:00:36 +00:00
Evan Cheng
0fe76d1585
* Infer instruction property hasCtrlDep from pattern if it has one.
...
* Fixed a bug related to hasCtrlDep property use.
llvm-svn: 24610
2005-12-05 23:08:55 +00:00
Chris Lattner
ba369ae8f1
Implement PR673: for explicit register references, use type information
...
if available
llvm-svn: 24597
2005-12-05 02:36:37 +00:00
Chris Lattner
3717b4c830
Add some methods
...
llvm-svn: 24596
2005-12-05 02:35:08 +00:00
Chris Lattner
d49489f01e
Generate code to silence bogus GCC warnings.
...
llvm-svn: 24593
2005-12-05 00:48:51 +00:00
Evan Cheng
f02bb9af8b
* Commit the fix (by Chris) for a tblgen type inferencing bug.
...
* Enhanced tblgen to handle instructions which have chain operand and writes a
chain result.
* Enhanced tblgen to handle instructions which produces no results. Part of
the change is a temporary hack which relies on instruction property (e.g.
isReturn, isBranch). The proper fix would be to change the .td syntax to
separate results dag from ops dag.
llvm-svn: 24587
2005-12-04 08:18:16 +00:00
Nate Begeman
006bb04f3a
Support multiple ValueTypes per RegisterClass, needed for upcoming vector
...
work. This change has no effect on generated code.
llvm-svn: 24563
2005-12-01 04:51:06 +00:00
Evan Cheng
fed83adbe3
Teach tblgen to accept register source operands in patterns, e.g.
...
def SHL8rCL : I<0xD2, MRM4r, (ops R8 :$dst, R8 :$src),
"shl{b} {%cl, $dst|$dst, %CL}",
[(set R8:$dst, (shl R8:$src, CL))]>, Imp<[CL],[]>;
This generates a CopyToReg operand and added its 2nd result to the shl as
a flag operand.
llvm-svn: 24557
2005-12-01 00:18:45 +00:00
Nate Begeman
faad542d24
Nuke CodeGenInstruction's ValueType member, it is no longer used.
...
llvm-svn: 24556
2005-12-01 00:12:04 +00:00
Nate Begeman
cdf2c67888
Stop checking the ValueType of the CodeGenInstruction. Instead, use the
...
ValueType from the RegisterClass or Operands. This step is necessary to
allow RegisterClasses to have multiple ValueTypes.
llvm-svn: 24555
2005-12-01 00:06:14 +00:00
Nate Begeman
e479ccb27b
fit into 80 columns
...
llvm-svn: 24554
2005-11-30 23:58:18 +00:00
Chris Lattner
3e63dc00da
Make the code generated by tblgen return the result of SelectNodeTo, to
...
permit future changes.
llvm-svn: 24553
2005-11-30 23:08:45 +00:00
Nate Begeman
6f8c1ace6e
No longer track value types for asm printer operands, and remove them as
...
an argument to every operand printing function. Requires some slight
tweaks to x86, the only user.
llvm-svn: 24541
2005-11-30 18:54:35 +00:00
Nate Begeman
f621b333f3
Fix some copy and paste typos.
...
llvm-svn: 24540
2005-11-30 18:37:14 +00:00
Evan Cheng
c8af0cb893
Better error message when unrecognized opcode is seen.
...
llvm-svn: 24519
2005-11-29 18:44:58 +00:00
Nate Begeman
4d0251ad55
Add the new vector types to tablegen
...
llvm-svn: 24514
2005-11-29 06:19:38 +00:00
Chris Lattner
f2807be3da
Initialize this variable on all paths, fixing a crasher in windows. Thanks
...
to JeffC for pointing this out.
llvm-svn: 24426
2005-11-19 07:48:33 +00:00
Chris Lattner
6bc0304c91
Teach tblgen about instruction operands that have multiple MachineInstr
...
operands, digging into them to find register values (used on X86). Patch
by Evan Cheng!
llvm-svn: 24424
2005-11-19 07:05:57 +00:00
Chris Lattner
a70c7dff2e
Validate that the input to 'Pat' patterns is sane.
...
llvm-svn: 24393
2005-11-17 17:43:52 +00:00
Chris Lattner
2a230e1c1a
teach tblgen to be smart enough to handle tglobaladdr nodes
...
llvm-svn: 24391
2005-11-17 07:39:45 +00:00
Chris Lattner
b22950df6c
fix a tblgen bug that Evan ran into, where we would lose the '$src' name
...
on patterns like "(set R32:$dst, (i32 imm:$src))"
llvm-svn: 24383
2005-11-16 23:14:54 +00:00
Chris Lattner
3ea1e255f7
remove these labels, there are now bigger jumps in the graph that are unlabeled
...
llvm-svn: 24365
2005-11-15 06:44:15 +00:00
Jim Laskey
d6d3afb05e
1. Remove ranges from itinerary data.
...
2. Tidy up the subtarget emittined code.
llvm-svn: 24172
2005-11-03 22:47:41 +00:00
Chris Lattner
64209fd14b
Reject integer literals that are out of range for their type.
...
llvm-svn: 24162
2005-11-03 05:46:11 +00:00
Chris Lattner
590176be16
Add support for immediates directly in the pattern, this allows itanium to
...
define:
def : Pat<(i1 1), (CMPEQ r0, r0)>;
llvm-svn: 24149
2005-11-02 06:49:14 +00:00
Jim Laskey
802748cd61
Allow itineraries to be passed through the Target Machine.
...
llvm-svn: 24139
2005-11-01 20:06:59 +00:00
Jeff Cohen
9e1784d738
Keep VC++ happy.
...
llvm-svn: 24137
2005-11-01 18:04:06 +00:00
Chris Lattner
1deb86dbf4
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
llvm-svn: 24136
2005-11-01 17:59:42 +00:00
Jim Laskey
0433df136f
Emit itinerary class in instruction info.
...
llvm-svn: 24122
2005-10-31 17:16:46 +00:00
Jim Laskey
3763a50d82
Generate cpu to itinerary map.
...
llvm-svn: 24121
2005-10-31 17:16:01 +00:00
Chris Lattner
af6b34ff44
Revert an accidental commit.
...
llvm-svn: 24098
2005-10-29 17:01:41 +00:00
Chris Lattner
d91df9d941
Make negative immediates in patterns work correctly, silence some warnings
...
building the itanium backend.
llvm-svn: 24095
2005-10-29 16:39:40 +00:00
Chris Lattner
742606ad30
Switch more code over to using getValueAsListOfDefs. Look at all the -'s. :)
...
llvm-svn: 24074
2005-10-28 22:59:53 +00:00
Chris Lattner
7ad0bed89f
Rename Record::getValueAsListDef to getValueAsListOfDefs, to more accurately
...
reflect what it is.
Convert some more code over to use it.
llvm-svn: 24072
2005-10-28 22:49:02 +00:00
Chris Lattner
802bd8d94f
Use the new interface Jim added
...
llvm-svn: 24071
2005-10-28 22:43:25 +00:00
Jim Laskey
dffe5978a3
Removed Mr. Smith from the code.
...
llvm-svn: 24070
2005-10-28 21:47:29 +00:00
Jim Laskey
b04feb633f
Added method to return a vector of records for a ListInit of Def field. This
...
simplifies using list of records.
llvm-svn: 24069
2005-10-28 21:46:31 +00:00
Chris Lattner
db53c998de
The nightly tester report doesn't report JIT code size anymore, remove it
...
from the olden graph.
llvm-svn: 24057
2005-10-28 16:35:18 +00:00
Jim Laskey
1959575208
Add some commentary.
...
llvm-svn: 24055
2005-10-28 15:20:43 +00:00
Jeff Cohen
b0aa47b043
Keep Visual Studio happy.
...
llvm-svn: 24052
2005-10-28 01:43:09 +00:00
Jim Laskey
86f002cc32
Now generating instruction itineraries for scheduling. Not my best work, but...
...
llvm-svn: 24050
2005-10-27 19:47:21 +00:00
Jim Laskey
777a26efc3
Simplify.
...
llvm-svn: 24015
2005-10-26 17:49:21 +00:00
Jim Laskey
a2b5235fac
Give full control of subtarget features over to table generated code.
...
llvm-svn: 24013
2005-10-26 17:30:34 +00:00
Chris Lattner
f277ac7caa
Condcodes are in the ISD namespace
...
llvm-svn: 24010
2005-10-26 17:02:02 +00:00
Chris Lattner
611b0c634c
Add support for CondCode's
...
llvm-svn: 24008
2005-10-26 16:59:37 +00:00
Chris Lattner
d980c46f52
Emit some boilerplate for targets
...
llvm-svn: 23983
2005-10-25 20:35:14 +00:00
Jim Laskey
1b7369b1ae
Refactored to make room for more stuff (scheduling info.)
...
llvm-svn: 23975
2005-10-25 15:16:36 +00:00
Chris Lattner
fc9f5773d0
Fix an incompatibility with GCC 4.1, thanks to Vladimir Merzliakov
...
for pointing this out!
llvm-svn: 23963
2005-10-24 15:04:15 +00:00
Chris Lattner
4f48e67c6c
Add the needed #include, emit enums with the sizes of tables, remove
...
definitions from the LLVM namespace, since they are all static.
llvm-svn: 23907
2005-10-23 22:33:08 +00:00
Chris Lattner
49f7b69997
Remove the obsolete instr selector emitter
...
llvm-svn: 23894
2005-10-23 05:47:52 +00:00
Jim Laskey
a1beea6c7d
Sort the features and processor lists for the sake of search (and maintainers.)
...
llvm-svn: 23879
2005-10-22 07:59:56 +00:00
Jim Laskey
9ed9032e22
Plugin new subtarget backend into the build.
...
llvm-svn: 23870
2005-10-21 19:05:19 +00:00
Jim Laskey
cfda85ad91
New TableGen backends for subtarget information. Only command line stuff
...
active now. Scheduling itinerary next.
llvm-svn: 23869
2005-10-21 19:00:04 +00:00
Chris Lattner
8bda5afd91
Make tblgen emit:
...
tblgen: In ZAPNOTi: Cannot use 'IZAPX' in an input pattern!
for a bad pattern, instead of an ugly assertion.
llvm-svn: 23854
2005-10-21 01:19:59 +00:00
Chris Lattner
c9ad735e78
add support for literal immediates in patterns to match, allowing us to
...
write things like this:
def : Pat<(add GPRC:$in, 12),
(ADD12 GPRC:$in)>;
Andrew: if this isn't enough or doesn't work for you, please lemme know.
llvm-svn: 23819
2005-10-19 04:41:05 +00:00
Chris Lattner
7f6f565846
Add basic support for integer constants in pattern results.
...
llvm-svn: 23817
2005-10-19 04:30:56 +00:00
Chris Lattner
2ae2f99326
Fix some checking that was causing duraid to get a perplexing assertion
...
instead of a happy error message
llvm-svn: 23816
2005-10-19 04:12:14 +00:00