Commit Graph

837 Commits

Author SHA1 Message Date
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