Commit Graph

18 Commits

Author SHA1 Message Date
Evan Cheng 49bad4c9e1 - Add "Commutative" property to intrinsics. This allows tblgen to generate the commuted variants for dagisel matching code.
- Mark lots of X86 intrinsics as "Commutative" to allow load folding.

llvm-svn: 52353
2008-06-16 20:29:38 +00:00
Duncan Sands 13237ac3b9 Wrap MVT::ValueType in a struct to get type safety
and better control the abstraction.  Rename the type
to MVT.  To update out-of-tree patches, the main
thing to do is to rename MVT::ValueType to MVT, and
rewrite expressions like MVT::getSizeInBits(VT) in
the form VT.getSizeInBits().  Use VT.getSimpleVT()
to extract a MVT::SimpleValueType for use in switch
statements (you will get an assert failure if VT is
an extended value type - these shouldn't exist after
type legalization).
This results in a small speedup of codegen and no
new testsuite failures (x86-64 linux).

llvm-svn: 52044
2008-06-06 12:08:01 +00:00
Dan Gohman fc4ad7de66 Move instruction flag inference out of InstrInfoEmitter and into
CodeGenDAGPatterns, where it can be used in other tablegen backends.
This allows the inference to be done for DAGISelEmitter so that it
gets accurate mayLoad/mayStore/isSimpleLoad flags. 

This brings MemOperand functionality back to where it was before
48329. However, it doesn't solve the problem of anonymous patterns
which expand to code that does loads or stores.

llvm-svn: 49123
2008-04-03 00:02:49 +00:00
Chris Lattner 8adcd9f32e remove attributions from utils.
llvm-svn: 45419
2007-12-29 20:37:13 +00:00
Chandler Carruth 7132e00de7 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 2966c9072b Update a comment to reflect recent changes in the type system.
llvm-svn: 36486
2007-04-26 19:43:14 +00:00
Reid Spencer e67d0c226d 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
Reid Spencer bc013ba367 For PR950:
Convert signed integer types to signless.

llvm-svn: 32786
2006-12-31 05:50:28 +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 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 402a573764 Autogenerate code to map from GCC builtin to LLVM intrinsic.
llvm-svn: 26770
2006-03-15 01:33:26 +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 6efe863a70 parse intrinsic types
autogenerate an intrinsic verifier

llvm-svn: 26666
2006-03-09 22:05:04 +00:00
Chris Lattner f6e846eee8 Fix pasteo
llvm-svn: 26499
2006-03-03 06:13:41 +00:00
Chris Lattner c313d0b712 initial implementation of intrinsic parsing
llvm-svn: 26495
2006-03-03 02:32:46 +00:00