summaryrefslogtreecommitdiff
path: root/utils/TableGen/IntrinsicEmitter.cpp
Commit message (Collapse)AuthorAge
* Merging r168354: into 3.2 release branchPawel Wodnicki2012-11-22
| | | | | | | | | | | Make the AttrListPtr object a part of the LLVMContext. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168486 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting 168457Pawel Wodnicki2012-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168465 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r168354, r168355 and r168379 into the 3.2 release branch.Pawel Wodnicki2012-11-21
| | | | | | | | | | | | | | | | | | | Set of Attributes patches. Merging r168354: Make the AttrListPtr object a part of the LLVMContext. 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. Merging r168355: Merging r168379 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168457 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove exception handling usage from tblgen.Joerg Sonnenberger2012-10-25
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166712 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an enum for the return and function indexes into the AttrListPtr object. ↵Bill Wendling2012-10-15
| | | | | | This gets rid of some magic numbers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165924 91177308-0d34-0410-b5e6-96231b3b80d8
* Attributes RewriteBill Wendling2012-10-15
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165917 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass into the AttributeWithIndex::get method an ArrayRef of attributeBill Wendling2012-10-10
| | | | | | | enums. These are then created via the correct Attributes creation method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165607 91177308-0d34-0410-b5e6-96231b3b80d8
* Write llvm-tblgen backends as functions instead of sub-classes.Jakob Stoklund Olesen2012-06-11
| | | | | | | | | The TableGenBackend base class doesn't do much, and will be removed completely soon. Patch by Sean Silva! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158311 91177308-0d34-0410-b5e6-96231b3b80d8
* switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.Chris Lattner2012-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157556 91177308-0d34-0410-b5e6-96231b3b80d8
* rdar://11542750 - llvm.trap should be marked no return.Chris Lattner2012-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157551 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement the intrinsic verifier to use the same table as ↵Chris Lattner2012-05-27
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157545 91177308-0d34-0410-b5e6-96231b3b80d8
* move some code around so that Verifier.cpp can get access to the intrinsic ↵Chris Lattner2012-05-27
| | | | | | info table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157540 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance the intrinsic info table to encode what *kind* of Any argumentChris Lattner2012-05-27
| | | | | | | | it is (at the cost of 45 bytes of extra table space) so that the verifier can start using it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157536 91177308-0d34-0410-b5e6-96231b3b80d8
* rearrange some code, no functionality change.Chris Lattner2012-05-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157523 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed typo in r156905.Patrik Hägglund2012-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157320 91177308-0d34-0410-b5e6-96231b3b80d8
* small refinement to r157218 to save a tiny amount of table size in the commonChris Lattner2012-05-23
| | | | | | | case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157312 91177308-0d34-0410-b5e6-96231b3b80d8
* Added address space qualifier to intrinsic PointerType arguments.Pete Cooper2012-05-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157218 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance the intrinsic info stuff to emit encodings that don't fit in 32-bits ↵Chris Lattner2012-05-17
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156995 91177308-0d34-0410-b5e6-96231b3b80d8
* finish encoding all of the interesting details of intrinsics. Now intrinsicsChris Lattner2012-05-17
| | | | | | | | are only rejected because they can't be encoded into a 32-bit unit, not because they contain an unencodable feature. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156978 91177308-0d34-0410-b5e6-96231b3b80d8
* strengthen the intrinsic descriptor stuff to be able to handle sin, cos and ↵Chris Lattner2012-05-17
| | | | | | | | | other intrinsics that use passed-in arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156977 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify code generated by tblgen that is not necessary since we droppedChris Lattner2012-05-17
| | | | | | | compatibility with LLVM 2.x bitcode files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156976 91177308-0d34-0410-b5e6-96231b3b80d8
* I forgot the #ifdef _MSC_VER guard in my last commit.Francois Pichet2012-05-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156975 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the MSVC 2010 build: disable the optimizer for a problematic function.Francois Pichet2012-05-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156973 91177308-0d34-0410-b5e6-96231b3b80d8
* Significantly reduce the compiled size of Functions.cpp by turning a big ↵Chris Lattner2012-05-16
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156905 91177308-0d34-0410-b5e6-96231b3b80d8
* have tblgen emit cast<> instead of dyn_cast<> when we know it must succeed.Chris Lattner2012-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156902 91177308-0d34-0410-b5e6-96231b3b80d8
* Move llvm-tblgen's StringMatcher into the TableGen library so it canDouglas Gregor2012-05-02
| | | | | | | be used by clang-tblgen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156000 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix target specific intrinsic handling to adjust intrinsic number before ↵Craig Topper2012-04-13
| | | | | | doing attribute table lookup. Also fix attribute table lookup to handle 'invalid' intrinsic correctly. Fixes PR12542 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154658 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen: Don't emit the llvm intrinsic -> gcc builtin table, its only user ↵Benjamin Kramer2012-03-26
| | | | | | was the c backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153432 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit the "is an intrinsic overloaded" table as a bitfield.Benjamin Kramer2012-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151792 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit the intrinsic modref info as a lookup table instead of a huge switch.Benjamin Kramer2012-03-01
| | | | | | Shrinks BasicAliasAnalysis.o from 106k to 56k on i386. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151781 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert generated intrinsic attributes to use an array lookup as Chris ↵Craig Topper2012-02-28
| | | | | | suggested in PR11951. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151622 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149814 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic generic CodeGen support for half.Dan Gohman2011-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146927 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TableGen's parser and entry point into a libraryPeter Collingbourne2011-10-01
| | | | | | This is the first step towards splitting LLVM and Clang's tblgen executables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140951 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Intrinsic::getDeclaration and friends to take an ArrayRef.Benjamin Kramer2011-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135154 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the varargs version of StructType::get to not require an LLVMContext, ↵Chris Lattner2011-06-18
| | | | | | | | | making usage much cleaner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133364 91177308-0d34-0410-b5e6-96231b3b80d8
* Change how tblgen generates attributes for intrinsics to use a singleJohn McCall2011-05-28
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132252 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename AccessesArguments and AccessesArgumentsReadonly, and rewriteDan Gohman2010-11-10
| | | | | | | their comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118696 91177308-0d34-0410-b5e6-96231b3b80d8
* Translate IntrReadArgMem to AccessesArgumentsReadonly.Dan Gohman2010-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118622 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of pop_macro warnings on MSVC.Michael J. Spencer2010-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114750 91177308-0d34-0410-b5e6-96231b3b80d8
* CBackend: Fix MSVC build.Michael J. Spencer2010-09-14
| | | | | | This may produce warnings on MSVS, but it's better than failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113834 91177308-0d34-0410-b5e6-96231b3b80d8
* Add x86mmx to TableGen.Dale Johannesen2010-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113671 91177308-0d34-0410-b5e6-96231b3b80d8
* emit the LLVM intrinsic name -> intrinsic number mapping table withChris Lattner2010-09-06
| | | | | | | StringMatcher instead of a linear sequence of memcmps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113145 91177308-0d34-0410-b5e6-96231b3b80d8
* emit the __builtin -> intrinsic map with StringMatcher instead of aChris Lattner2010-09-06
| | | | | | | copy of a close relative of it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113142 91177308-0d34-0410-b5e6-96231b3b80d8
* slightly improve the runtime and code size of the Intrinsics info table by notChris Lattner2010-09-06
| | | | | | | comparing the "llvm." prefix in the memcmp, and not storing it in the string literal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113136 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove IntrWriteMem, as it's the default. Rename IntrWriteArgMemDan Gohman2010-08-05
| | | | | | | to IntrReadWriteArgMem, as it's for reading as well as writing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110395 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!Douglas Gregor2010-05-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103457 91177308-0d34-0410-b5e6-96231b3b80d8
* Change intrinsic result type for void to store it as an empty listChris Lattner2010-03-22
| | | | | | | | instead of as a single element list with VoidTy. Now with a fix for the verifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99206 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r99009 temporarily it seems to be breaking the bots.Eric Christopher2010-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99011 91177308-0d34-0410-b5e6-96231b3b80d8
* Change intrinsic result type for void to store it as an empty listChris Lattner2010-03-19
| | | | | | | instead of as a single element list with VoidTy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99009 91177308-0d34-0410-b5e6-96231b3b80d8