summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenIntrinsics.h
Commit message (Collapse)AuthorAgeFilesLines
* TableGen: Add IntrHasSideEffects property for intrinsicsMatt Arsenault2017-04-281-0/+4
| | | | | | | | | | | | | | | The IntrNoMem, IntrReadMem, IntrWriteMem, and IntrArgMemOnly intrinsic properties differ from their corresponding LLVM IR attributes by specifying that the intrinsic, in addition to its memory properties, has no other side effects. The IntrHasSideEffects flag used in combination with one of the memory flags listed above, makes it possible to define an intrinsic such that its properties at the CodeGen layer match its properties at the IR layer. Patch by Tom Stellard llvm-svn: 301685
* Add speculatable function attributeMatt Arsenault2017-04-281-0/+3
| | | | | | | | This attribute tells the optimizer that the function may be speculated. Patch by Tom Stellard llvm-svn: 301680
* Add IntrInaccessibleMemOnly property for intrinsicsAndrew Kaylor2016-11-221-6/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D26485 llvm-svn: 287680
* IR: Sort generic intrinsics before target specific onesJustin Bogner2016-07-151-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
* Add a 'Returned' intrinsic property corresponding to the 'returned' argument ↵Hal Finkel2016-07-111-1/+1
| | | | | | | | | | attribute This will be used by the upcoming llvm.noalias intrinsic. Differential Revision: http://reviews.llvm.org/D22201 llvm-svn: 275034
* TableGen: Update style in CodeGenIntrinsics. NFCJustin Bogner2016-07-081-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
* Add writeonly IR attributeNicolai Haehnle2016-07-041-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
* Split IntrReadArgMem into IntrReadMem and IntrArgMemOnlyNicolai Haehnle2016-04-211-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
* Add IntrWrite[Arg]Mem intrinsic propertyNicolai Haehnle2016-04-191-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
* Emit argmemonly attribute for intrinsics.Igor Laevsky2015-08-131-2/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D11352 llvm-svn: 244920
* Add initial support for the convergent attribute.Owen Anderson2015-05-261-0/+3
| | | | llvm-svn: 238264
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-131-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
* TableGen: introduce support for MSBuiltinSaleem Abdulrasool2014-07-041-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
* Expose "noduplicate" attribute as a property for intrinsics.Eli Bendersky2014-03-181-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
* Replace ValueTypes.h with MachineValueType.h if possible.Patrik Hagglund2014-03-151-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
* Extend 'readonly' and 'readnone' to work on function arguments as well asNick Lewycky2013-07-061-1/+3
| | | | | | | functions. Make the function attributes pass add it to known library functions and when it can deduce it. llvm-svn: 185735
* Sort the #include lines for utils/...Chandler Carruth2012-12-041-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
* rdar://11542750 - llvm.trap should be marked no return.Chris Lattner2012-05-271-1/+4
| | | | llvm-svn: 157551
* Change how tblgen generates attributes for intrinsics to use a singleJohn McCall2011-05-281-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
* Remove IntrWriteMem, as it's the default. Rename IntrWriteArgMemDan Gohman2010-08-051-1/+1
| | | | | | to IntrReadWriteArgMem, as it's for reading as well as writing. llvm-svn: 110395
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-4/+4
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-4/+4
| | | | | | own struct type. llvm-svn: 78610
* fix a few spelling errors and typosJim Grosbach2009-03-261-1/+1
| | | | llvm-svn: 67758
* Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen2009-02-051-1/+2
| | | | llvm-svn: 63812
* Reverting 63765. This broke the build of both clangDale Johannesen2009-02-041-2/+1
| | | | | | and llvm-gcc. llvm-svn: 63786
* New feature: add support for target intrinsics being defined in theNate Begeman2009-02-041-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
* add nocapture attribute to llvm.mem* intrinsics and have tblgenChris Lattner2009-01-121-4/+8
| | | | | | parse them. tblgen doesn't yet do anything with this info though. llvm-svn: 62065
* Modify the intrinsics pattern to separate out the "return" types from theBill Wendling2008-11-131-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
* - Add "Commutative" property to intrinsics. This allows tblgen to generate ↵Evan Cheng2008-06-161-0/+4
| | | | | | | | the commuted variants for dagisel matching code. - Mark lots of X86 intrinsics as "Commutative" to allow load folding. llvm-svn: 52353
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-061-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
* Move instruction flag inference out of InstrInfoEmitter and intoDan Gohman2008-04-031-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
* remove attributions from utils.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45419
* This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth2007-08-041-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
* Update a comment to reflect recent changes in the type system.Dan Gohman2007-04-261-1/+1
| | | | llvm-svn: 36486
* For PR1297:Reid Spencer2007-04-011-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
* For PR950:Reid Spencer2006-12-311-1/+1
| | | | | | Convert signed integer types to signless. llvm-svn: 32786
* Only compute intrinsic valuetypes when in a target .td file.Chris Lattner2006-03-281-1/+4
| | | | llvm-svn: 27197
* revert this, it breaks things.Chris Lattner2006-03-281-1/+1
| | | | llvm-svn: 27196
* Add support for decoding iPTR to the right pointer type.Chris Lattner2006-03-271-1/+2
| | | | llvm-svn: 27188
* Move CodeGenIntrinsic implementation to CodeGenTarget.cpp with the rest ofChris Lattner2006-03-241-0/+4
| | | | | | | | the CodeGen* implementations. Parse the MVT::ValueType for each operand of the intrinsics. llvm-svn: 27075
* Autogenerate code to map from GCC builtin to LLVM intrinsic.Chris Lattner2006-03-151-0/+1
| | | | llvm-svn: 26770
* emit a mapping from LLVM intrinsic -> GCC builtins.Chris Lattner2006-03-131-1/+2
| | | | llvm-svn: 26736
* Verify that packed type operands have the right size and base type.Chris Lattner2006-03-131-0/+4
| | | | llvm-svn: 26735
* parse intrinsic typesChris Lattner2006-03-091-0/+4
| | | | | | autogenerate an intrinsic verifier llvm-svn: 26666
* Fix pasteoChris Lattner2006-03-031-1/+1
| | | | llvm-svn: 26499
* initial implementation of intrinsic parsingChris Lattner2006-03-031-0/+42
llvm-svn: 26495
OpenPOWER on IntegriCloud