aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenIntrinsics.h
AgeCommit message (Collapse)AuthorFilesLines
2016-07-15IR: Sort generic intrinsics before target specific onesJustin Bogner1-3/+21
This splits out the intrinsic table such that generic intrinsics come first and target specific intrinsics are grouped by target. From here we can find out which target an intrinsic is for or differentiate between generic and target intrinsics. The motivation here is to make it easier to move target specific intrinsic handling out of generic code. llvm-svn: 275575
2016-07-11Add a 'Returned' intrinsic property corresponding to the 'returned' argument ↵Hal Finkel1-1/+1
attribute This will be used by the upcoming llvm.noalias intrinsic. Differential Revision: http://reviews.llvm.org/D22201 llvm-svn: 275034
2016-07-08TableGen: Update style in CodeGenIntrinsics. NFCJustin Bogner1-103/+96
Ran clang-format to remove the namespace indentation, and stopped repeating names in doc comments since I was updating every line anyway. llvm-svn: 274919
2016-07-04Add writeonly IR attributeNicolai Haehnle1-0/+1
Summary: This complements the earlier addition of IntrWriteMem and IntrWriteArgMem LLVM intrinsic properties, see D18291. Also start using the attribute for memset, memcpy, and memmove intrinsics, and remove their special-casing in BasicAliasAnalysis. Reviewers: reames, joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D18714 llvm-svn: 274485
2016-04-21Split IntrReadArgMem into IntrReadMem and IntrArgMemOnlyNicolai Haehnle1-1/+1
Summary: IntrReadWriteArgMem simply becomes IntrArgMemOnly. So there are fewer intrinsic properties that express their orthogonality better, and correspond more closely to the corresponding IR attributes. Suggested by: Philip Reames Reviewers: joker.eph, reames, tstellarAMD Subscribers: jholewinski, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D19291 llvm-svn: 267021
2016-04-19Add IntrWrite[Arg]Mem intrinsic propertyNicolai Haehnle1-4/+29
Summary: This property is used to mark an intrinsic that only writes to memory, but neither reads from memory nor has other side effects. An example where this is useful is the llvm.amdgcn.buffer.store.format.* intrinsic, which corresponds to a store instruction that goes through a special buffer descriptor rather than through a plain pointer. With this property, the intrinsic should still be handled as having side effects at the LLVM IR level, but machine scheduling can make smarter decisions. Reviewers: tstellarAMD, arsenm, joker.eph, reames Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D18291 llvm-svn: 266826
2015-08-13Emit argmemonly attribute for intrinsics.Igor Laevsky1-2/+3
Differential Revision: http://reviews.llvm.org/D11352 llvm-svn: 244920
2015-05-26Add initial support for the convergent attribute.Owen Anderson1-0/+3
llvm-svn: 238264
2014-08-13Canonicalize header guards into a common format.Benjamin Kramer1-2/+2
Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
2014-07-04TableGen: introduce support for MSBuiltinSaleem Abdulrasool1-0/+1
Add MSBuiltin which is similar in vein to GCCBuiltin. This allows for adding intrinsics for Microsoft compatibility to individual instructions. This is needed to permit the creation of ARM specific MSVC extensions. This is not currently in use, and requires an associated change in clang to enable use of the intrinsics defined by this new class. This merely sets the LLVM portion of the infrastructure in place to permit the use of this functionality. A separate set of changes will enable the new intrinsics. llvm-svn: 212350
2014-03-18Expose "noduplicate" attribute as a property for intrinsics.Eli Bendersky1-0/+3
The "noduplicate" function attribute exists to prevent certain optimizations from duplicating calls to the function. This is important on platforms where certain function call duplications are unsafe (for example execution barriers for CUDA and OpenCL). This patch makes it possible to specify intrinsics as "noduplicate" and translates that to the appropriate function attribute. llvm-svn: 204200
2014-03-15Replace ValueTypes.h with MachineValueType.h if possible.Patrik Hagglund1-1/+1
Utilize the previous move of MVT to a separate header for all trivial cases (that don't need any further restructuring). Reviewed By: Tim Northover llvm-svn: 204003
2013-07-06Extend 'readonly' and 'readnone' to work on function arguments as well asNick Lewycky1-1/+3
functions. Make the function attributes pass add it to known library functions and when it can deduce it. llvm-svn: 185735
2012-12-04Sort the #include lines for utils/...Chandler Carruth1-1/+1
I've tried to find main moudle headers where possible, but the TableGen stuff may warrant someone else looking at it. llvm-svn: 169251
2012-05-27rdar://11542750 - llvm.trap should be marked no return.Chris Lattner1-1/+4
llvm-svn: 157551
2011-05-28Change how tblgen generates attributes for intrinsics to use a singleJohn McCall1-0/+3
switch. With this newfound organization, teach tblgen how not to give all intrinsics the 'nounwind' attribute. Introduce a new intrinsic, llvm.eh.resume, which does not have this attribute. Documentation and uses to follow. llvm-svn: 132252
2010-08-05Remove IntrWriteMem, as it's the default. Rename IntrWriteArgMemDan Gohman1-1/+1
to IntrReadWriteArgMem, as it's for reading as well as writing. llvm-svn: 110395
2009-08-11Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson1-4/+4
while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
2009-08-10Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson1-4/+4
own struct type. llvm-svn: 78610
2009-03-26fix a few spelling errors and typosJim Grosbach1-1/+1
llvm-svn: 67758
2009-02-05Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen1-1/+2
llvm-svn: 63812
2009-02-04Reverting 63765. This broke the build of both clangDale Johannesen1-2/+1
and llvm-gcc. llvm-svn: 63786
2009-02-04New feature: add support for target intrinsics being defined in theNate Begeman1-1/+2
target directories themselves. This also means that VMCore no longer needs to know about every target's list of intrinsics. Future work will include converting the PowerPC target to this interface as an example implementation. llvm-svn: 63765
2009-01-12add nocapture attribute to llvm.mem* intrinsics and have tblgenChris Lattner1-4/+8
parse them. tblgen doesn't yet do anything with this info though. llvm-svn: 62065
2008-11-13Modify the intrinsics pattern to separate out the "return" types from theBill Wendling1-9/+27
"parameter" types. An intrinsic can now return a multiple return values like this: def add_with_overflow : Intrinsic<[llvm_i32_ty, llvm_i1_ty], [LLVMMatchType<0>, LLVMMatchType<0>]>; llvm-svn: 59237
2008-06-16- Add "Commutative" property to intrinsics. This allows tblgen to generate ↵Evan Cheng1-0/+4
the commuted variants for dagisel matching code. - Mark lots of X86 intrinsics as "Commutative" to allow load folding. llvm-svn: 52353
2008-06-06Wrap MVT::ValueType in a struct to get type safetyDuncan Sands1-7/+7
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-04-03Move instruction flag inference out of InstrInfoEmitter and intoDan Gohman1-1/+1
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
2007-12-29remove attributions from utils.Chris Lattner1-2/+2
llvm-svn: 45419
2007-08-04This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth1-4/+0
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-04-26Update a comment to reflect recent changes in the type system.Dan Gohman1-1/+1
llvm-svn: 36486
2007-04-01For PR1297:Reid Spencer1-1/+5
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
2006-12-31For PR950:Reid Spencer1-1/+1
Convert signed integer types to signless. llvm-svn: 32786
2006-03-28Only compute intrinsic valuetypes when in a target .td file.Chris Lattner1-1/+4
llvm-svn: 27197
2006-03-28revert this, it breaks things.Chris Lattner1-1/+1
llvm-svn: 27196
2006-03-27Add support for decoding iPTR to the right pointer type.Chris Lattner1-1/+2
llvm-svn: 27188
2006-03-24Move CodeGenIntrinsic implementation to CodeGenTarget.cpp with the rest ofChris Lattner1-0/+4
the CodeGen* implementations. Parse the MVT::ValueType for each operand of the intrinsics. llvm-svn: 27075
2006-03-15Autogenerate code to map from GCC builtin to LLVM intrinsic.Chris Lattner1-0/+1
llvm-svn: 26770
2006-03-13emit a mapping from LLVM intrinsic -> GCC builtins.Chris Lattner1-1/+2
llvm-svn: 26736
2006-03-13Verify that packed type operands have the right size and base type.Chris Lattner1-0/+4
llvm-svn: 26735
2006-03-09parse intrinsic typesChris Lattner1-0/+4
autogenerate an intrinsic verifier llvm-svn: 26666
2006-03-03Fix pasteoChris Lattner1-1/+1
llvm-svn: 26499
2006-03-03initial implementation of intrinsic parsingChris Lattner1-0/+42
llvm-svn: 26495