summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/ValueTypes.h
Commit message (Collapse)AuthorAge
...
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-26
| | | | | | | direct inclusion edge from System to Support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an EVT::getStoreSize function, like getStoreSizeInBits but in bytes.Dan Gohman2009-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82653 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename FirstExtendedValueType to INVALID_SIMPLE_VALUE_TYPEErick Tryzelaar2009-08-20
| | | | | | as that's a bit more descriptive of what we're testing for. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79513 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix gcc-4.4/fedora 11 by adding a sentinel value to SimpleValueType.Erick Tryzelaar2009-08-19
| | | | | | | | | gcc-4.4 was optimizing away comparisons against SimpleValueType when it was compared to a value larger than the largest value in the enum. This patch works around it by adding one extra item to the enum so that these tests will now be valid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79401 91177308-0d34-0410-b5e6-96231b3b80d8
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-12
| | | | | | infrastructure work needed to get the contexts to where they need to be first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78759 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warnings.Owen Anderson2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78725 91177308-0d34-0410-b5e6-96231b3b80d8
* struct -> classOwen Anderson2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78715 91177308-0d34-0410-b5e6-96231b3b80d8
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-11
| | | | | | | | | while the latter is capable of representing either a primitive or an extended type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78713 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new overloaded EVT::vAny type for use in TableGen to allow intrinsicBob Wilson2009-08-11
| | | | | | | arguments that are vectors of any size and element type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78631 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-10
| | | | | | own struct type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some of the constants+context related code out into a separate ↵Owen Anderson2009-08-04
| | | | | | | | | header, to make LLVMContextImpl.h not hideous. Also, fix some MSVC compile errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
* Move types back to the 2.5 API.Owen Anderson2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the v3i32 and v3f32 value types: they are notDuncan Sands2009-07-15
| | | | | | | native for any supported targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75785 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some tabs and fix other whitespace. No functional changes.Bob Wilson2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75613 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 75308.Bob Wilson2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75565 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new vector types for 192-bit, 348-bit and 512-bit sizes.Bob Wilson2009-07-10
| | | | | | | | These are needed to represent ARM Neon struct datatypes containing 2, 3 or 4 separate vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75308 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75153 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new ValueType for metadata.Devang Patel2009-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74882 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete a spurious blank line at the top of the file.Dan Gohman2009-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74495 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more vector ValueTypes for AVX and other extended vector instructionDavid Greene2009-06-29
| | | | | | | sets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74427 91177308-0d34-0410-b5e6-96231b3b80d8
* Increase limit for OpActions arrayDavid Greene2009-06-24
| | | | | | | | | | | | | | The OpActions array had a limit of 32 value types, so change it to use MVT::MAX_ALLOWED_VALUETYPE in its declaration and change the accesses to this array to work with a VT.getSimpleVT() that is larger than 32. Also, add a comment to the place where MVT::MAX_ALLOWED_VALUETYPE is defined indicating that it must be a multiple of 32. This is part of the work allow MVT::LAST_VALUETYPE be greater than 32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74130 91177308-0d34-0410-b5e6-96231b3b80d8
* This increases the maximum for MVT::LAST_VALUETYPEDavid Greene2009-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change doubles the allowable value for MVT::LAST_VALUETYPE. It does this by doing several things. 1. Introduces MVT::MAX_ALLOWED_LAST_VALUETYPE which in this change has a value of 64. This value contains the current maximum for the MVT::LAST_VALUETYPE. 2. Instead of checking "MVT::LAST_VALUETYPE <= 32", all of those uses now become "MVT::LAST_VALUETYPE <= MVT::MAX_ALLOWED_LAST_VALUETYPE" 3. Changes the dimension of the ValueTypeActions from 2 elements to four elements and adds comments ahead of the declaration indicating the it is "(MVT::MAX_ALLOWED_LAST_VALUETYPE/32) * 2". This at least lets us find what is affected if and when MVT::MAX_ALLOWED_LAST_VALUETYPE gets changed. 4. Adds initializers for the new elements of ValueTypeActions. This does NOT add any types in MVT. That would be done separately. This doubles the size of ValueTypeActions from 64 bits to 128 bits and gives us the freedom to add more types for AVX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74110 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the SimpleTy enumerated type field from the MVTDuncan Sands2009-04-19
| | | | | | | | | | value type union: this field was causing problems for some compilers on 64 bit systems, presumably because SimpleTy is 32 bits wide while the other fields are 64 bits wide. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69515 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3453 and probably a bunch of other potentialDuncan Sands2009-02-01
| | | | | | | | | | crashes or wrong code with codegen of large integers: eliminate the legacy getIntegerVTBitMask and getIntegerVTSignBit methods, which returned their value as a uint64_t, so couldn't handle huge types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63494 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertion to the form of SelectionDAG::getConstant that takesDan Gohman2009-01-27
| | | | | | | | | a uint64_t to verify that the value is in range for the given type, to help catch accidental overflow. Fix a few places that relied on getConstant implicitly truncating the value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63128 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for vector widening.Mon P Wang2008-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61209 91177308-0d34-0410-b5e6-96231b3b80d8
* Small cleanups. No functionality change intended!Duncan Sands2008-11-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58992 91177308-0d34-0410-b5e6-96231b3b80d8
* move some cases around to silence these sorts of warnings in Chris Lattner2008-11-10
| | | | | | | | | | | | release-asserts build: llvm/CodeGen/SelectionDAGNodes.h:1298: warning: control may reach end of non-void function 'unsigned int llvm::MVT::getSizeInBits() const' being inlined what an unhelpful warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58957 91177308-0d34-0410-b5e6-96231b3b80d8
* Change how extended types are represented in MVTs. Instead of fiddlingDan Gohman2008-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | bits, use a union of a SimpleValueType enum and a regular Type*. This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits. In most cases, this doesn't add significant overhead. There are places in codegen that use arrays of MVTs, so these are now larger, but they're small in common cases. This eliminates restrictions on the size of integer types and vector types that can be represented in codegen. As the included testcase demonstrates, it's now possible to codegen very large add operations. There are still some complications with using very large types. PR2880 is still open so they can't be used as return values on normal targets, there are no libcalls defined for very large integers so operations like multiply and divide aren't supported. This also introduces a minimal tablgen Type library, capable of handling IntegerType and VectorType. This will allow parts of TableGen that don't depend on using SimpleValueType values to handle arbitrary integer and vector types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58623 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant inline keywords from functions defined withinDan Gohman2008-11-03
| | | | | | | class definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58620 91177308-0d34-0410-b5e6-96231b3b80d8
* Add sanity checking for BUILD_PAIR (I noticed theDuncan Sands2008-10-29
| | | | | | | | | | other day that PPC custom lowering could create a BUILD_PAIR of two f64 with a result type of... f64! - already fixed). Fix a place that triggers the sanity check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58378 91177308-0d34-0410-b5e6-96231b3b80d8
* fit in 80 cols, minor tweaksGabor Greif2008-09-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55992 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for overloading intrinsics (atomics) based on pointersMon P Wang2008-07-30
| | | | | | | | 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
* Allow these transforms for types like i256 whileDuncan Sands2008-06-16
| | | | | | | | | still excluding types like i1 (not byte sized) and i120 (loading an i120 requires loading an i64, an i32, an i16 and an i8, which is expensive). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52310 91177308-0d34-0410-b5e6-96231b3b80d8
* Small doc fix.Duncan Sands2008-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52190 91177308-0d34-0410-b5e6-96231b3b80d8
* Various tweaks related to apint codegen. No functionalityDuncan Sands2008-06-09
| | | | | | | change for non-funky-sized integers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52151 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove comparison methods for MVT. The main causeDuncan Sands2008-06-08
| | | | | | | | | | | | of apint codegen failure is the DAG combiner doing the wrong thing because it was comparing MVT's using < rather than comparing the number of bits. Removing the < method makes this mistake impossible to commit. Instead, add helper methods for comparing bits and use them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52098 91177308-0d34-0410-b5e6-96231b3b80d8
* Tighten up the abstraction slightly.Duncan Sands2008-06-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52045 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-06
| | | | | | | | | | | | | | | | | 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
* Add MVT::is128BitVector and is64BitVector. ShrinkDale Johannesen2008-03-01
| | | | | | | | | unaligned load/store code using them. Per review of unaligned load/store vector patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47782 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-29
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some load/store logic that would be wrong forDuncan Sands2007-11-09
| | | | | | | | | apints on big-endian machines if the bitwidth is not a multiple of 8. Introduce a new helper, MVT::getStoreSizeInBits, and use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43934 91177308-0d34-0410-b5e6-96231b3b80d8
* Document the fact that the verifier currently requires theDuncan Sands2007-10-16
| | | | | | | | | | | | top bit of a ValueType to be zero. Enforce this by ensuring an assertion failure if someone tries to create a ValueType without this property. I chose this minimal approach rather than a more official integration of the notion of reserved bits into ValueType because I'm hoping that the verifier will be changed to no longer require this :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43031 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial infrastructure for arbitrary precision integerDuncan Sands2007-10-16
| | | | | | | | | | | codegen support. This should have no effect on codegen for other types. Debatable bits: (1) the use (abuse?) of a set in SDNode::getValueTypeList; (2) the length of getTypeToTransformTo, which maybe should be refactored with a non-inline part for extended value types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43030 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MVT::fAny for overloading intrinsics on floating-point types.Dan Gohman2007-08-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41128 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth2007-08-04
| | | | | | | | | 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
* long double patch 3 of N. Add to MVT.Dale Johannesen2007-08-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40793 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for 3 element 32-bit vector ValueTypes.Christopher Lamb2007-07-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40506 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT.Dan Gohman2007-06-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37758 91177308-0d34-0410-b5e6-96231b3b80d8