1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

39 Commits

Author SHA1 Message Date
Duncan Sands
1e2e4972ff Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).

llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Dale Johannesen
e61886cee4 Add sqrt and powi intrinsics for long double.
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Dan Gohman
b499ea1cf6 Add MVT::fAny for overloading intrinsics on floating-point types.
llvm-svn: 41128
2007-08-16 21:57:19 +00:00
Chandler Carruth
67d3119773 This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search.
llvm-svn: 40872
2007-08-06 20:57:16 +00:00
Chandler Carruth
00e56b0e81 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Dan Gohman
b7c799015b Fix a pasto in a comment.
llvm-svn: 40527
2007-07-26 15:11:00 +00:00
Dan Gohman
550ec9362b Fix a typo in a comment.
llvm-svn: 37727
2007-06-26 00:43:18 +00:00
Reid Spencer
31622dd4a9 The Intrinsic::getDeclaration function's Tys parameter only contains the
types of the iAny types involved in the overloaded intrinsic. Thus, we
can't use the argument number as the index but have to count them separately
in order to index Tys correctly. This patch rectifies this situation.

llvm-svn: 37296
2007-05-22 19:30:31 +00:00
Reid Spencer
f12ab5a55b For PR1328:
Don't assert everytime an intrinsic name isn't recognized. Instead, make
the assert optional when callin getIntrinsicID(). This allows the assembler
to handle invalid intrinsic names gracefully.

llvm-svn: 36120
2007-04-16 06:54:34 +00:00
Reid Spencer
5b8b959d29 For PR1297:
Implement code generation for overloaded intrinsic functions. The basic
difference is that "actual" argument types must be provided when
constructing intrinsic names and types. Also, for recognition, only the
prefix is examined. If it matches, the suffix is assumed to match. The
suffix is checked by the Verifier, however.

llvm-svn: 35539
2007-04-01 07:20:02 +00:00
Chris Lattner
ddb46d765a the lengths of the strings are known, just use memcmp
llvm-svn: 34321
2007-02-15 19:26:16 +00:00
Chris Lattner
5d0b16f797 Implement Function::getIntrinsicID without it needing to call Value::getName,
which allocates a string.  This speeds up instcombine on 447.dealII by 5%.

llvm-svn: 34318
2007-02-15 19:17:16 +00:00
Reid Spencer
e7ff3305d6 For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.

llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer
55e4e98a2a For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Jim Laskey
c27aed3dc0 Automatically generating intrinsic declarations from Dan Gohman. Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.

llvm-svn: 34008
2007-02-07 20:38:26 +00:00
Jim Laskey
52c07ebe15 Error check and eliminate unnecessary value.
llvm-svn: 33966
2007-02-06 18:30:58 +00:00
Jim Laskey
7d5ddeb668 Support var arg intrinsics.
llvm-svn: 33962
2007-02-06 18:02:54 +00:00
Reid Spencer
373d2bccea For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.

llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Chris Lattner
d55928d5f6 Fix more static dtor issues
llvm-svn: 30725
2006-10-04 21:52:35 +00:00
Chris Lattner
9eacf6b01c Adjust the Intrinsics.gen interface a little bit
llvm-svn: 27345
2006-04-02 03:35:30 +00:00
Chris Lattner
f9e5ac8c9a 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
7ae6895610 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
Evan Cheng
86b5b7cf18 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
522211a435 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
e6a8522990 extract some more information from the intrinsic table
llvm-svn: 27022
2006-03-24 01:13:55 +00:00
Chris Lattner
6c339fec5a allow the GCCBuiltinName field to be optional
llvm-svn: 26784
2006-03-15 19:15:26 +00:00
Jeff Cohen
4bf914ebcc Fix VC++ build error.
llvm-svn: 26773
2006-03-15 02:51:05 +00:00
Chris Lattner
0339c2ab58 remove typo
llvm-svn: 26772
2006-03-15 02:05:38 +00:00
Chris Lattner
bbca65b845 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
697e830c63 Autogenerate code to map from GCC builtin to LLVM intrinsic.
llvm-svn: 26770
2006-03-15 01:33:26 +00:00
Reid Spencer
13a38e914a Add a newline at the end to avoid gcc warnings.
llvm-svn: 26749
2006-03-14 05:59:52 +00:00
Chris Lattner
ecc2db9f6d emit a mapping from LLVM intrinsic -> GCC builtins.
llvm-svn: 26736
2006-03-13 23:08:44 +00:00
Chris Lattner
5efaeff492 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
8930c740ac fix pasto in generate assertion msg
llvm-svn: 26706
2006-03-11 00:20:47 +00:00
Chris Lattner
fa0acde009 generate side-effect info
llvm-svn: 26672
2006-03-09 22:37:52 +00:00
Chris Lattner
67900dea61 Parse mod/ref properties, autogen mod/ref information
llvm-svn: 26669
2006-03-09 22:30:49 +00:00
Chris Lattner
35d32c232a parse intrinsic types
autogenerate an intrinsic verifier

llvm-svn: 26666
2006-03-09 22:05:04 +00:00
Chris Lattner
f4bb4b3b11 autogenerate the function name recognizer
llvm-svn: 26663
2006-03-09 20:34:19 +00:00
Chris Lattner
0b3c1c1fe2 initial implementation of intrinsic parsing
llvm-svn: 26495
2006-03-03 02:32:46 +00:00