Commit Graph

448 Commits

Author SHA1 Message Date
Reid Spencer 56fdf9ed40 Add missing things to the distribution.
llvm-svn: 27650
2006-04-13 06:27:20 +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 1e0552f838 Add new generated files to be ignored.
llvm-svn: 27011
2006-03-23 23:45:32 +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
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
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
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
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 3eb12e9a2a Add a newline at the end to avoid gcc warnings.
llvm-svn: 26749
2006-03-14 05:59: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