summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/IntrinsicEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* TableGen: introduce support for MSBuiltinSaleem Abdulrasool2014-07-041-0/+54
| | | | | | | | | | | | | 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
* Replace some assert(0)'s with llvm_unreachable.Craig Topper2014-06-181-1/+1
| | | | llvm-svn: 211141
* Fix redefinition of default argument, found by modules build. It's notRichard Smith2014-04-201-5/+4
| | | | | | | | | entirely clear whether this should be valid with modules enabled, but the fixed code is cleaner regardless. Also fix a TU-local type that accidentally had external linkage. llvm-svn: 206714
* remove some dead codeNuno Lopes2014-04-171-2/+0
| | | | | | | | | | | | | | | lib/Analysis/IPA/InlineCost.cpp | 18 ------------------ lib/Analysis/RegionPass.cpp | 1 - lib/Analysis/TypeBasedAliasAnalysis.cpp | 1 - lib/Transforms/Scalar/LoopUnswitch.cpp | 21 --------------------- lib/Transforms/Utils/LCSSA.cpp | 2 -- lib/Transforms/Utils/LoopSimplify.cpp | 6 ------ utils/TableGen/AsmWriterEmitter.cpp | 13 ------------- utils/TableGen/DFAPacketizerEmitter.cpp | 7 ------- utils/TableGen/IntrinsicEmitter.cpp | 2 -- 9 files changed, 71 deletions(-) llvm-svn: 206506
* Intrinsics: add LLVMHalfElementsVectorType constraintTim Northover2014-03-291-1/+4
| | | | | | | | | | This is like the LLVMMatchType, except the verifier checks that the second argument is a vector with the same base type and half the number of elements. This will be used by the ARM64 backend. llvm-svn: 205079
* Intrinsics: expand semantics of LLVMExtendedVectorType (& trunc)Tim Northover2014-03-281-6/+6
| | | | | | | | | | | | These are used in the ARM backends to aid type-checking on patterns involving intrinsics. By making sure one argument is an extended/truncated version of another. However, there's no reason to limit them to just vectors types. For example AArch64 has the instruction "uqshrn sD, dN, #imm" which would naturally use an intrinsic taking an i64 and returning an i32. llvm-svn: 205003
* Expose "noduplicate" attribute as a property for intrinsics.Eli Bendersky2014-03-181-1/+11
| | | | | | | | | | | | 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
* Now that we have C++11, turn simple functors into lambdas and remove a ton ↵Benjamin Kramer2014-03-011-17/+5
| | | | | | | | of boilerplate. No intended functionality change. llvm-svn: 202588
* Stackmaps are used for OSR exits, which is a custom kind of unwinding. ↵Filip Pizlo2014-02-201-0/+1
| | | | | | | | | | | | | | | | | Hence, they should not be marked nounwind. Marking them nounwind caused crashes in the WebKit FTL JIT, because if we enable sufficient optimizations, LLVM starts eliding compact_unwind sections (or any unwind data for that matter), making deoptimization via stackmaps impossible. This changes the stackmap intrinsic to be may-throw, adds a test for exactly the sympton that WebKit saw, and fixes TableGen to handle un-attributed intrinsics. Thanks to atrick and philipreames for reviewing this. llvm-svn: 201826
* Replace tablegen uses of EVT with MVT. Add isOverloaded() to MVT to ↵Craig Topper2014-01-241-6/+5
| | | | | | facilitate. Remove TGValueTypes.cpp since its unused now (and may have been before). llvm-svn: 200036
* Small improvement to InstrinsicEmitter::EmitAttributes. This change removes ↵Owen Anderson2013-11-161-17/+38
| | | | | | | | the “pushing” and “clearing” of the SmallVector and instead uses const arrays to pass the attributeKinds to AttributeSet::get . Patch by Aditya Nandakumar. llvm-svn: 194899
* Enable variable arguments support for intrinsics.Andrew Trick2013-10-311-1/+4
| | | | llvm-svn: 193766
* whitespaceAndrew Trick2013-10-311-49/+49
| | | | llvm-svn: 193765
* Initial support for Neon scalar instructions.Jiangning Liu2013-09-241-1/+3
| | | | | | | | | | Patch by Ana Pazos. 1.Added support for v1ix and v1fx types. 2.Added Scalar Pairwise Reduce instructions. 3.Added initial implementation of Scalar Arithmetic instructions. llvm-svn: 191263
* Fix a bug in TableGen where the intrinsic function name recognizer could ↵Justin Holewinski2013-07-251-0/+18
| | | | | | | | | | | | | | | | | mis-identify names if one was a prefix substring of the other For two intrinsics 'llvm.nvvm.texsurf.handle' and 'llvm.nvvm.texsurf.handle.internal', TableGen was emitting matching code like: if (Name.startswith("llvm.nvvm.texsurf.handle")) ... if (Name.startswith("llvm.nvvm.texsurf.handle.internal")) ... We can never match "llvm.nvvm.texsurf.handle.internal" here because it will always be erroneously matched by the first condition. The fix is to sort the intrinsic names and emit them in reverse order. llvm-svn: 187119
* Extend 'readonly' and 'readnone' to work on function arguments as well asNick Lewycky2013-07-061-0/+6
| | | | | | | functions. Make the function attributes pass add it to known library functions and when it can deduce it. llvm-svn: 185735
* Use the AttributeSet instead of AttributeWithIndex.Bill Wendling2013-01-271-7/+6
| | | | | | | In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the internals of the AttributeSet to outside users, which isn't goodness. llvm-svn: 173606
* Support for half intrinsics. Pushes MMX into slower encoding path.Michael Ilseman2013-01-111-18/+20
| | | | llvm-svn: 172159
* Change 'AttrVal' to 'AttrKind' to better reflect that it's a kind of ↵Bill Wendling2012-12-221-1/+1
| | | | | | attribute instead of the value of the attribute. llvm-svn: 170972
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-6/+6
| | | | | | single attribute in the future. llvm-svn: 170502
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-071-5/+5
| | | | | | in the near future. llvm-svn: 169651
* Make the AttrListPtr object a part of the LLVMContext.Bill Wendling2012-11-201-1/+1
| | | | | | | | | When code deletes the context, the AttributeImpls that the AttrListPtr points to are now invalid. Therefore, instead of keeping a separate managed static for the AttrListPtrs that's reference counted, move it into the LLVMContext and delete it when deleting the AttributeImpls. llvm-svn: 168354
* Remove exception handling usage from tblgen.Joerg Sonnenberger2012-10-251-5/+6
| | | | | | | | | | | Most places can use PrintFatalError as the unwinding mechanism was not used for anything other than printing the error. The single exception was CodeGenDAGPatterns.cpp, where intermediate errors during type resolution were ignored to simplify incremental platform development. This use is replaced by an error flag in TreePattern and bailout earlier in various places if it is set. llvm-svn: 166712
* Add an enum for the return and function indexes into the AttrListPtr object. ↵Bill Wendling2012-10-151-2/+2
| | | | | | This gets rid of some magic numbers. llvm-svn: 165924
* Attributes RewriteBill Wendling2012-10-151-4/+4
| | | | | | | | | | Convert the internal representation of the Attributes class into a pointer to an opaque object that's uniqued by and stored in the LLVMContext object. The Attributes class then becomes a thin wrapper around this opaque object. Eventually, the internal representation will be expanded to include attributes that represent code generation options, etc. llvm-svn: 165917
* Pass into the AttributeWithIndex::get method an ArrayRef of attributeBill Wendling2012-10-101-35/+27
| | | | | | enums. These are then created via the correct Attributes creation method. llvm-svn: 165607
* Write llvm-tblgen backends as functions instead of sub-classes.Jakob Stoklund Olesen2012-06-111-45/+91
| | | | | | | | | The TableGenBackend base class doesn't do much, and will be removed completely soon. Patch by Sean Silva! llvm-svn: 158311
* switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.Chris Lattner2012-05-281-1/+2
| | | | llvm-svn: 157556
* rdar://11542750 - llvm.trap should be marked no return.Chris Lattner2012-05-271-4/+21
| | | | llvm-svn: 157551
* Reimplement the intrinsic verifier to use the same table as ↵Chris Lattner2012-05-271-137/+0
| | | | | | | | | | | | | Intrinsic::getDefinition, making it stronger and more sane. Delete the code from tblgen that produced the old code. Besides being a path forward in intrinsic sanity, this also eliminates a bunch of machine generated code that was compiled into Function.o llvm-svn: 157545
* move some code around so that Verifier.cpp can get access to the intrinsic ↵Chris Lattner2012-05-271-33/+4
| | | | | | info table. llvm-svn: 157540
* enhance the intrinsic info table to encode what *kind* of Any argumentChris Lattner2012-05-271-12/+20
| | | | | | | it is (at the cost of 45 bytes of extra table space) so that the verifier can start using it. llvm-svn: 157536
* rearrange some code, no functionality change.Chris Lattner2012-05-261-20/+24
| | | | llvm-svn: 157523
* Fixed typo in r156905.Patrik Hägglund2012-05-231-2/+2
| | | | llvm-svn: 157320
* small refinement to r157218 to save a tiny amount of table size in the commonChris Lattner2012-05-231-4/+10
| | | | | | case. llvm-svn: 157312
* Added address space qualifier to intrinsic PointerType arguments.Pete Cooper2012-05-211-0/+6
| | | | llvm-svn: 157218
* enhance the intrinsic info stuff to emit encodings that don't fit in 32-bits ↵Chris Lattner2012-05-171-164/+73
| | | | | | | | | into a separate side table, using the handy SequenceToOffsetTable class. This encodes all these weird things into another 256 bytes, allowing all intrinsics to be encoded this way. llvm-svn: 156995
* finish encoding all of the interesting details of intrinsics. Now intrinsicsChris Lattner2012-05-171-45/+45
| | | | | | | are only rejected because they can't be encoded into a 32-bit unit, not because they contain an unencodable feature. llvm-svn: 156978
* strengthen the intrinsic descriptor stuff to be able to handle sin, cos and ↵Chris Lattner2012-05-171-54/+63
| | | | | | | | other intrinsics that use passed-in arguments. llvm-svn: 156977
* simplify code generated by tblgen that is not necessary since we droppedChris Lattner2012-05-171-20/+4
| | | | | | compatibility with LLVM 2.x bitcode files. llvm-svn: 156976
* I forgot the #ifdef _MSC_VER guard in my last commit.Francois Pichet2012-05-171-0/+5
| | | | llvm-svn: 156975
* Fix the MSVC 2010 build: disable the optimizer for a problematic function.Francois Pichet2012-05-171-0/+2
| | | | llvm-svn: 156973
* Significantly reduce the compiled size of Functions.cpp by turning a big ↵Chris Lattner2012-05-161-117/+307
| | | | | | | | | | blob of tblgen generated code (for Intrinsic::getType) into a table. This handles common cases right now, but I plan to extend it to handle all cases and merge in type verification logic as well in follow-on patches. llvm-svn: 156905
* have tblgen emit cast<> instead of dyn_cast<> when we know it must succeed.Chris Lattner2012-05-161-2/+2
| | | | llvm-svn: 156902
* Move llvm-tblgen's StringMatcher into the TableGen library so it canDouglas Gregor2012-05-021-1/+1
| | | | | | be used by clang-tblgen. llvm-svn: 156000
* Fix target specific intrinsic handling to adjust intrinsic number before ↵Craig Topper2012-04-131-9/+15
| | | | | | doing attribute table lookup. Also fix attribute table lookup to handle 'invalid' intrinsic correctly. Fixes PR12542 llvm-svn: 154658
* TableGen: Don't emit the llvm intrinsic -> gcc builtin table, its only user ↵Benjamin Kramer2012-03-261-19/+0
| | | | | | was the c backend. llvm-svn: 153432
* Emit the "is an intrinsic overloaded" table as a bitfield.Benjamin Kramer2012-03-011-7/+10
| | | | llvm-svn: 151792
* Emit the intrinsic modref info as a lookup table instead of a huge switch.Benjamin Kramer2012-03-011-16/+18
| | | | | | Shrinks BasicAliasAnalysis.o from 106k to 56k on i386. llvm-svn: 151781
* Convert generated intrinsic attributes to use an array lookup as Chris ↵Craig Topper2012-02-281-18/+26
| | | | | | suggested in PR11951. llvm-svn: 151622
OpenPOWER on IntegriCloud