aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/IntrinsicEmitter.cpp
AgeCommit message (Collapse)AuthorFilesLines
2014-12-25Masked Load/Store - Changed the order of parameters in intrinsics.Elena Demikhovsky1-1/+5
No functional changes. The documentation is coming. llvm-svn: 224829
2014-12-04Masked Load / Store Intrinsics - the CodeGen part.Elena Demikhovsky1-1/+9
I'm recommiting the codegen part of the patch. The vectorizer part will be send to review again. Masked Vector Load and Store Intrinsics. Introduced new target-independent intrinsics in order to support masked vector loads and stores. The loop vectorizer optimizes loops containing conditional memory accesses by generating these intrinsics for existing targets AVX2 and AVX-512. The vectorizer asks the target about availability of masked vector loads and stores. Added SDNodes for masked operations and lowering patterns for X86 code generator. Examples: <16 x i32> @llvm.masked.load.v16i32(i8* %addr, <16 x i32> %passthru, i32 4 /* align */, <16 x i1> %mask) declare void @llvm.masked.store.v8f64(i8* %addr, <8 x double> %value, i32 4, <8 x i1> %mask) Scalarizer for other targets (not AVX2/AVX-512) will be done in a separate patch. http://reviews.llvm.org/D6191 llvm-svn: 223348
2014-11-28Revert "Masked Vector Load and Store Intrinsics."Duncan P. N. Exon Smith1-9/+1
This reverts commit r222632 (and follow-up r222636), which caused a host of LNT failures on an internal bot. I'll respond to the commit on the list with a reproduction of one of the failures. Conflicts: lib/Target/X86/X86TargetTransformInfo.cpp llvm-svn: 222936
2014-11-23Masked Vector Load and Store Intrinsics.Elena Demikhovsky1-1/+9
Introduced new target-independent intrinsics in order to support masked vector loads and stores. The loop vectorizer optimizes loops containing conditional memory accesses by generating these intrinsics for existing targets AVX2 and AVX-512. The vectorizer asks the target about availability of masked vector loads and stores. Added SDNodes for masked operations and lowering patterns for X86 code generator. Examples: <16 x i32> @llvm.masked.load.v16i32(i8* %addr, <16 x i32> %passthru, i32 4 /* align */, <16 x i1> %mask) declare void @llvm.masked.store.v8f64(i8* %addr, <8 x double> %value, i32 4, <8 x i1> %mask) Scalarizer for other targets (not AVX2/AVX-512) will be done in a separate patch. http://reviews.llvm.org/D6191 llvm-svn: 222632
2014-10-20Moved out IIT_V64 from common values section.Robert Khasanov1-5/+5
Thanks Juergen Ributzka for notice. llvm-svn: 220224
2014-09-30[AVX512] Added intrinsics for VPCMPEQB and VPCMPEQW.Robert Khasanov1-18/+20
Added new operand type for intrinsics (IIT_V64) llvm-svn: 218668
2014-08-27Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or ↵Craig Topper1-2/+1
just letting them be implicitly created. llvm-svn: 216525
2014-07-17[TABLEGEN] Do not crash on intrinsics with names longer than 40 charactersJustin Holewinski1-2/+3
Differential Revision: http://reviews.llvm.org/D4537 llvm-svn: 213253
2014-07-04TableGen: introduce support for MSBuiltinSaleem Abdulrasool1-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
2014-06-18Replace some assert(0)'s with llvm_unreachable.Craig Topper1-1/+1
llvm-svn: 211141
2014-04-20Fix redefinition of default argument, found by modules build. It's notRichard Smith1-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
2014-04-17remove some dead codeNuno Lopes1-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
2014-03-29Intrinsics: add LLVMHalfElementsVectorType constraintTim Northover1-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
2014-03-28Intrinsics: expand semantics of LLVMExtendedVectorType (& trunc)Tim Northover1-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
2014-03-18Expose "noduplicate" attribute as a property for intrinsics.Eli Bendersky1-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
2014-03-01Now that we have C++11, turn simple functors into lambdas and remove a ton ↵Benjamin Kramer1-17/+5
of boilerplate. No intended functionality change. llvm-svn: 202588
2014-02-20Stackmaps are used for OSR exits, which is a custom kind of unwinding. ↵Filip Pizlo1-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
2014-01-24Replace tablegen uses of EVT with MVT. Add isOverloaded() to MVT to ↵Craig Topper1-6/+5
facilitate. Remove TGValueTypes.cpp since its unused now (and may have been before). llvm-svn: 200036
2013-11-16Small improvement to InstrinsicEmitter::EmitAttributes. This change removes ↵Owen Anderson1-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
2013-10-31Enable variable arguments support for intrinsics.Andrew Trick1-1/+4
llvm-svn: 193766
2013-10-31whitespaceAndrew Trick1-49/+49
llvm-svn: 193765
2013-09-24Initial support for Neon scalar instructions.Jiangning Liu1-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
2013-07-25Fix a bug in TableGen where the intrinsic function name recognizer could ↵Justin Holewinski1-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
2013-07-06Extend 'readonly' and 'readnone' to work on function arguments as well asNick Lewycky1-0/+6
functions. Make the function attributes pass add it to known library functions and when it can deduce it. llvm-svn: 185735
2013-01-27Use the AttributeSet instead of AttributeWithIndex.Bill Wendling1-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
2013-01-11Support for half intrinsics. Pushes MMX into slower encoding path.Michael Ilseman1-18/+20
llvm-svn: 172159
2012-12-22Change 'AttrVal' to 'AttrKind' to better reflect that it's a kind of ↵Bill Wendling1-1/+1
attribute instead of the value of the attribute. llvm-svn: 170972
2012-12-19Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling1-6/+6
single attribute in the future. llvm-svn: 170502
2012-12-07s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling1-5/+5
in the near future. llvm-svn: 169651
2012-11-20Make the AttrListPtr object a part of the LLVMContext.Bill Wendling1-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
2012-10-25Remove exception handling usage from tblgen.Joerg Sonnenberger1-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
2012-10-15Add an enum for the return and function indexes into the AttrListPtr object. ↵Bill Wendling1-2/+2
This gets rid of some magic numbers. llvm-svn: 165924
2012-10-15Attributes RewriteBill Wendling1-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
2012-10-10Pass into the AttributeWithIndex::get method an ArrayRef of attributeBill Wendling1-35/+27
enums. These are then created via the correct Attributes creation method. llvm-svn: 165607
2012-06-11Write llvm-tblgen backends as functions instead of sub-classes.Jakob Stoklund Olesen1-45/+91
The TableGenBackend base class doesn't do much, and will be removed completely soon. Patch by Sean Silva! llvm-svn: 158311
2012-05-28switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.Chris Lattner1-1/+2
llvm-svn: 157556
2012-05-27rdar://11542750 - llvm.trap should be marked no return.Chris Lattner1-4/+21
llvm-svn: 157551
2012-05-27Reimplement the intrinsic verifier to use the same table as ↵Chris Lattner1-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
2012-05-27move some code around so that Verifier.cpp can get access to the intrinsic ↵Chris Lattner1-33/+4
info table. llvm-svn: 157540
2012-05-27enhance the intrinsic info table to encode what *kind* of Any argumentChris Lattner1-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
2012-05-26rearrange some code, no functionality change.Chris Lattner1-20/+24
llvm-svn: 157523
2012-05-23Fixed typo in r156905.Patrik Hägglund1-2/+2
llvm-svn: 157320
2012-05-23small refinement to r157218 to save a tiny amount of table size in the commonChris Lattner1-4/+10
case. llvm-svn: 157312
2012-05-21Added address space qualifier to intrinsic PointerType arguments.Pete Cooper1-0/+6
llvm-svn: 157218
2012-05-17enhance the intrinsic info stuff to emit encodings that don't fit in 32-bits ↵Chris Lattner1-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
2012-05-17finish encoding all of the interesting details of intrinsics. Now intrinsicsChris Lattner1-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
2012-05-17strengthen the intrinsic descriptor stuff to be able to handle sin, cos and ↵Chris Lattner1-54/+63
other intrinsics that use passed-in arguments. llvm-svn: 156977
2012-05-17simplify code generated by tblgen that is not necessary since we droppedChris Lattner1-20/+4
compatibility with LLVM 2.x bitcode files. llvm-svn: 156976
2012-05-17I forgot the #ifdef _MSC_VER guard in my last commit.Francois Pichet1-0/+5
llvm-svn: 156975
2012-05-17Fix the MSVC 2010 build: disable the optimizer for a problematic function.Francois Pichet1-0/+2
llvm-svn: 156973