summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/IntrinsicEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-061-8/+9
| | | | | | | | | | | | | | | | 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
* Change the builtin matcher to emit a decision tree, which should help out Chris Lattner2008-01-041-8/+108
| | | | | | the VC++ 'nesting depth' issue. llvm-svn: 45567
* Don't let IntrinsicID be uninitialized if it doesn't match.Chris Lattner2008-01-041-1/+1
| | | | llvm-svn: 45563
* Remove the default else. This was ending in code that looked like this:Bill Wendling2008-01-031-2/+0
| | | | | | | | | | if (!strcmp(Target, "x86")) { // ... } else IntrinsicID = Intrinsic::not_intrinsic; llvm-svn: 45557
* Fix a build problem with VC++ by not doing the target prefixChris Lattner2008-01-021-13/+24
| | | | | | | comparison for every builtin. This reduces the depth of the if/elseif chain dramatically. llvm-svn: 45500
* remove attributions from utils.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45419
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-1/+1
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-44/+10
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* Add sqrt and powi intrinsics for long double.Dale Johannesen2007-09-281-0/+6
| | | | llvm-svn: 42423
* Add MVT::fAny for overloading intrinsics on floating-point types.Dan Gohman2007-08-161-1/+1
| | | | llvm-svn: 41128
* This resolves a regression of BasicAA which failed to find any memory ↵Chandler Carruth2007-08-061-2/+2
| | | | | | information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search. llvm-svn: 40872
* This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth2007-08-041-43/+58
| | | | | | | | 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
* Fix a pasto in a comment.Dan Gohman2007-07-261-1/+1
| | | | llvm-svn: 40527
* Fix a typo in a comment.Dan Gohman2007-06-261-1/+1
| | | | llvm-svn: 37727
* The Intrinsic::getDeclaration function's Tys parameter only contains theReid Spencer2007-05-221-5/+12
| | | | | | | | types of the iAny types involved in the overloaded intrinsic. Thus, we can't use the argument number as the index but have to count them separately in order to index Tys correctly. This patch rectifies this situation. llvm-svn: 37296
* For PR1328:Reid Spencer2007-04-161-2/+0
| | | | | | | | Don't assert everytime an intrinsic name isn't recognized. Instead, make the assert optional when callin getIntrinsicID(). This allows the assembler to handle invalid intrinsic names gracefully. llvm-svn: 36120
* For PR1297:Reid Spencer2007-04-011-13/+23
| | | | | | | | | | 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
* the lengths of the strings are known, just use memcmpChris Lattner2007-02-151-1/+1
| | | | llvm-svn: 34321
* Implement Function::getIntrinsicID without it needing to call Value::getName,Chris Lattner2007-02-151-2/+4
| | | | | | which allocates a string. This speeds up instcombine on 447.dealII by 5%. llvm-svn: 34318
* For PR1195:Reid Spencer2007-02-151-1/+1
| | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. llvm-svn: 34300
* For PR1195:Reid Spencer2007-02-151-3/+3
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* Automatically generating intrinsic declarations from Dan Gohman. ModifiedJim Laskey2007-02-071-0/+71
| | | | | | | to construct FunctionType in separate function, and, have getDeclaration return a Function instead of a Constant. llvm-svn: 34008
* Error check and eliminate unnecessary value.Jim Laskey2007-02-061-8/+15
| | | | llvm-svn: 33966
* Support var arg intrinsics.Jim Laskey2007-02-061-0/+5
| | | | llvm-svn: 33962
* For PR1064:Reid Spencer2007-01-121-4/+6
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Fix more static dtor issuesChris Lattner2006-10-041-2/+2
| | | | llvm-svn: 30725
* Adjust the Intrinsics.gen interface a little bitChris Lattner2006-04-021-2/+2
| | | | llvm-svn: 27345
* Final bugfix for PR724. GCC won't inline varargs functions, so use one toChris Lattner2006-03-311-17/+9
| | | | | | | validate the prototype of intrinsic functions. This prevents GCC from going crazy and inlining too much stuff, eventually running out of memory. llvm-svn: 27283
* When emitting code for the verifier, instead of emitting each case statementChris Lattner2006-03-311-9/+42
| | | | | | | | independently, batch up checks so that identically typed intrinsics share verifier code. This dramatically reduces the size of the verifier function, which should help avoid GCC running out of memory compiling Verifier.cpp. llvm-svn: 27281
* Don't sort the names before outputing the intrinsic name table. It causes aEvan Cheng2006-03-281-7/+2
| | | | | | | | mismatch against the enum table. This is a part of Sabre's master plan to drive me nuts with subtle bugs that happens to only affect x86 be. :-) llvm-svn: 27237
* Move CodeGenIntrinsic implementation to CodeGenTarget.cpp with the rest ofChris Lattner2006-03-241-83/+0
| | | | | | | | the CodeGen* implementations. Parse the MVT::ValueType for each operand of the intrinsics. llvm-svn: 27075
* extract some more information from the intrinsic tableChris Lattner2006-03-241-1/+23
| | | | llvm-svn: 27022
* allow the GCCBuiltinName field to be optionalChris Lattner2006-03-151-1/+2
| | | | llvm-svn: 26784
* Fix VC++ build error.Jeff Cohen2006-03-151-0/+1
| | | | llvm-svn: 26773
* remove typoChris Lattner2006-03-151-1/+1
| | | | llvm-svn: 26772
* Autogenerate a table of intrinsic names, so we can map from intrinsic ID toChris Lattner2006-03-151-4/+20
| | | | | | LLVM intrinsic function name. llvm-svn: 26771
* Autogenerate code to map from GCC builtin to LLVM intrinsic.Chris Lattner2006-03-151-1/+56
| | | | llvm-svn: 26770
* Add a newline at the end to avoid gcc warnings.Reid Spencer2006-03-141-1/+1
| | | | llvm-svn: 26749
* emit a mapping from LLVM intrinsic -> GCC builtins.Chris Lattner2006-03-131-7/+26
| | | | llvm-svn: 26736
* Verify that packed type operands have the right size and base type.Chris Lattner2006-03-131-6/+24
| | | | llvm-svn: 26735
* fix pasto in generate assertion msgChris Lattner2006-03-111-1/+1
| | | | llvm-svn: 26706
* generate side-effect infoChris Lattner2006-03-091-0/+25
| | | | llvm-svn: 26672
* Parse mod/ref properties, autogen mod/ref informationChris Lattner2006-03-091-0/+45
| | | | llvm-svn: 26669
* parse intrinsic typesChris Lattner2006-03-091-3/+44
| | | | | | autogenerate an intrinsic verifier llvm-svn: 26666
* autogenerate the function name recognizerChris Lattner2006-03-091-0/+37
| | | | llvm-svn: 26663
* initial implementation of intrinsic parsingChris Lattner2006-03-031-0/+70
llvm-svn: 26495
OpenPOWER on IntegriCloud