aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/IntrinsicEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix PR3994: LLVMMatchType arguments do not refer to absolute return valueBob Wilson2009-04-161-2/+0
| | | | | | | | | | | and argument positions but only to the overloaded intrinsic parameters. Keep a separate list of these overloaded parameters in CodeGenTarget.cpp so they can be resolved easily. Remove assertions from IntrinsicEmitter.cpp: they were harmless but confusing, and the assertions elsewhere in TableGen will catch any incorrect values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69316 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a few spelling errors and typosJim Grosbach2009-03-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67758 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support to have TableGen provide information if an intrinsic (coreMon P Wang2009-02-241-1/+21
| | | | | | | or target) can be overloaded or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65404 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize some alias analysis logic from atomicDuncan Sands2009-02-141-0/+34
| | | | | | | intrinsics to any IntrWriteArgMem intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64551 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen2009-02-051-16/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63812 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting 63765. This broke the build of both clangDale Johannesen2009-02-041-48/+16
| | | | | | | | and llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63786 91177308-0d34-0410-b5e6-96231b3b80d8
* New feature: add support for target intrinsics being defined in theNate Begeman2009-02-041-16/+48
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63765 91177308-0d34-0410-b5e6-96231b3b80d8
* make tblgen autogenerate the nocapture intrinsics for Chris Lattner2009-01-121-7/+22
| | | | | | | | llvm.memcpy/memset/memmove. This allows removal of some hackish code from basicaa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62071 91177308-0d34-0410-b5e6-96231b3b80d8
* add scaffolding to emit argument attributes. No functionality Chris Lattner2009-01-121-2/+31
| | | | | | | change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62067 91177308-0d34-0410-b5e6-96231b3b80d8
* make tblgen emit the entire Intrinsic::getAttributes method, Chris Lattner2009-01-121-0/+7
| | | | | | | | not a random piece of it. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62066 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve support for type-generic vector intrinsics by teaching TableGen howBob Wilson2009-01-071-3/+20
| | | | | | | | | to handle LLVMMatchType intrinsic parameters, and by adding new subclasses of LLVMMatchType to match vector types with integral elements that are either twice as wide or half as wide as the elements of the matched type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61834 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix to record comparator to make it work for return values > 1.Bill Wendling2008-11-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59242 91177308-0d34-0410-b5e6-96231b3b80d8
* Put comma in correct place for call to StructType::getBill Wendling2008-11-131-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59241 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the intrinsics pattern to separate out the "return" types from theBill Wendling2008-11-131-33/+101
| | | | | | | | | | | | "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>]>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59237 91177308-0d34-0410-b5e6-96231b3b80d8
* Large mechanical patch.Devang Patel2008-09-251-2/+2
| | | | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for overloading intrinsics (atomics) based on pointersMon P Wang2008-07-301-0/+8
| | | | | | | | to different address spaces. This alters the naming scheme for those intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54195 91177308-0d34-0410-b5e6-96231b3b80d8
* 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52044 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the builtin matcher to emit a decision tree, which should help out Chris Lattner2008-01-041-8/+108
| | | | | | | the VC++ 'nesting depth' issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45567 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't let IntrinsicID be uninitialized if it doesn't match.Chris Lattner2008-01-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45563 91177308-0d34-0410-b5e6-96231b3b80d8
* 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; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45557 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45500 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from utils.Chris Lattner2007-12-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45419 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
* 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44544 91177308-0d34-0410-b5e6-96231b3b80d8
* Add sqrt and powi intrinsics for long double.Dale Johannesen2007-09-281-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42423 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MVT::fAny for overloading intrinsics on floating-point types.Dan Gohman2007-08-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41128 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40872 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40807 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a pasto in a comment.Dan Gohman2007-07-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40527 91177308-0d34-0410-b5e6-96231b3b80d8
* It's not necessary to do rounding for alloca operations when the requestedDan Gohman2007-07-181-0/+389
alignment is equal to the stack alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40004 91177308-0d34-0410-b5e6-96231b3b80d8