summaryrefslogtreecommitdiff
path: root/include/llvm/Type.h
Commit message (Collapse)AuthorAge
...
* remove the std::ostream version of module and type printing.Chris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79823 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually privatize a IntegerTypes, and fix a few bugs exposed by this.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78955 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an LLVMContext to Type, hardwired to the global context until Type ↵Owen Anderson2009-07-15
| | | | | | uniquing is moved on the contexts themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75853 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the C bindings to keep the LLVMTypeKind up to date between the C/C++Chris Lattner2009-07-15
| | | | | | | stuff. Patch by Zoltan Varga! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75842 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo that Edwin spotted.Dan Gohman2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75661 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment clarifying the role of getPrimitiveTypeSizeInBits.Dan Gohman2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75659 91177308-0d34-0410-b5e6-96231b3b80d8
* There are five floating point types.Nick Lewycky2009-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74806 91177308-0d34-0410-b5e6-96231b3b80d8
* There are *four* lights!Nick Lewycky2009-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74804 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my last series of commits related to Timer and 64-bit atomics. Not ↵Owen Anderson2009-06-23
| | | | | | | | | all the targets we care about are capable of supporting it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73993 91177308-0d34-0410-b5e6-96231b3b80d8
* Atomic ops that do arithmetic use signed arithmetic.Owen Anderson2009-06-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73980 91177308-0d34-0410-b5e6-96231b3b80d8
* Label the existing atomic functions as 32-bit specific, and add a 64-bit one ↵Owen Anderson2009-06-23
| | | | | | | | | that will be useful in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73971 91177308-0d34-0410-b5e6-96231b3b80d8
* Use atomic increment/decrement for reference counting of Type's.Owen Anderson2009-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73588 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an atomic increment and decrement implementation, which will be used forOwen Anderson2009-06-17
| | | | | | | thread-safe reference counting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73587 91177308-0d34-0410-b5e6-96231b3b80d8
* Support vector casts in more places, fixing a variety of assertionDan Gohman2009-06-15
| | | | | | | | | | | | | | | | failures. To support this, add some utility functions to Type to help support vector/scalar-independent code. Change ConstantInt::get and ConstantFP::get to support vector types, and add an overload to ConstantInt::get that uses a static IntegerType type, for convenience. Introduce a new getConstant method for ScalarEvolution, to simplify common use cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73431 91177308-0d34-0410-b5e6-96231b3b80d8
* Create FunctionType::isValidArgumentType to go along with isValidReturnType.Nick Lewycky2009-06-07
| | | | | | | | | | | | | | | | Also create isValidElementType for ArrayType, PointerType, StructType and VectorType. Make LLParser use them. This closes up some holes like an assertion failure on: %x = type {label} but largely doesn't change any semantics. The only thing we accept now which we didn't before is vectors of opaque type such as "<4 x opaque>". The opaque can be resolved to an int or float when linking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73016 91177308-0d34-0410-b5e6-96231b3b80d8
* Give embedded metadata its own type instead of relying on EmptyStructTy.Nick Lewycky2009-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72610 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new Type::getPointerTo method, which is shorthand forChris Lattner2009-04-10
| | | | | | | llvm::PointerType::get(). Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68772 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky2009-04-04
| | | | | | | | | Constant, MDString and MDNode which can only be used by globals with a name that starts with "llvm." or as arguments to a function with the same naming restriction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68420 91177308-0d34-0410-b5e6-96231b3b80d8
* delete a bunch of duplicated type printing logic, using the type printingChris Lattner2009-02-28
| | | | | | | stuff in AsmWriter.cpp for Type::getDescription(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65734 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new form of Type::dump that takes a module for type names,Chris Lattner2008-10-01
| | | | | | | | | patch provided by Tomas Lindquist Olsen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56929 91177308-0d34-0410-b5e6-96231b3b80d8
* remove dead method.Chris Lattner2008-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55266 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the asmprinter (.ll) and all the stuff it requires over toChris Lattner2008-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | use raw_ostream instead of std::ostream. Among other goodness, this speeds up llvm-dis of kc++ with a release build from 0.85s to 0.49s (88% faster). Other interesting changes: 1) This makes Value::print be non-virtual. 2) AP[S]Int and ConstantRange can no longer print to ostream directly, use raw_ostream instead. 3) This fixes a bug in raw_os_ostream where it didn't flush itself when destroyed. 4) This adds a new SDNode::print method, instead of only allowing "dump". A lot of APIs have both std::ostream and raw_ostream versions, it would be useful to go through and systematically anihilate the std::ostream versions. This passes dejagnu, but there may be minor fallout, plz let me know if so and I'll fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55263 91177308-0d34-0410-b5e6-96231b3b80d8
* Inline the fastpath of PATypeHolder::get(). This is a small speedup in Chris Lattner2008-08-15
| | | | | | | instcombine among other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54814 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an isAggregateType predicate.Dan Gohman2008-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51794 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"Anton Korobeynikov2008-05-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51687 91177308-0d34-0410-b5e6-96231b3b80d8
* It turns out there are only 3 non-first-class type kinds left now, soDan Gohman2008-05-23
| | | | | | | it's simpler for isFirstClassType to use a negative test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51511 91177308-0d34-0410-b5e6-96231b3b80d8
* Make structs and arrays first-class types, and add assemblyDan Gohman2008-05-23
| | | | | | | | | | and bitcode support for the extractvalue and insertvalue instructions and constant expressions. Note that this does not yet include CodeGen support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51468 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a Type::isSingleValueType method. This will be used by codeDan Gohman2008-05-21
| | | | | | | | | | that currently uses Type::isFirstClassType and depends on it returning false for struct or array types. This commit doesn't change the behavior of Type::isFirstClassType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51396 91177308-0d34-0410-b5e6-96231b3b80d8
* add a helper method.Chris Lattner2008-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51274 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove warnings about unused parameters and shadowed variables.Bill Wendling2008-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51266 91177308-0d34-0410-b5e6-96231b3b80d8
* add an assertion to catch a null PATypeHolder, patch by Erick TryzelaarChris Lattner2008-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47563 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 spelling.Duncan Sands2007-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42296 91177308-0d34-0410-b5e6-96231b3b80d8
* remove dead enum value.Chris Lattner2007-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41925 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Type::isIntOrIntVector, like Type::isFPOrFPVector.Dan Gohman2007-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41190 91177308-0d34-0410-b5e6-96231b3b80d8
* Long double, part 1 of N. Support in IR.Dale Johannesen2007-08-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40774 91177308-0d34-0410-b5e6-96231b3b80d8
* Here is the bulk of the sanitizing.Gabor Greif2007-07-05
| | | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct a name in a comment.Dan Gohman2007-05-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37178 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a problem where primitive types lose their name after llvm_shutdown is ↵Chris Lattner2007-04-20
| | | | | | | | | called. This also reduces the amount of work done at static construction time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36285 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1209:Reid Spencer2007-04-06
| | | | | | | Implement Type class's ContainedTys without using a std::vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35693 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the 'explicit' keyword to several constructors that accept oneDan Gohman2007-03-23
| | | | | | | argument that don't appear intended as implicit-conversion operators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35280 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1195:Reid Spencer2007-02-15
| | | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
* Make doxygen happyAnton Korobeynikov2007-01-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33609 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1043:Reid Spencer2007-01-19
| | | | | | | | | | | | | | | This is the final patch for this PR. It implements some minor cleanup in the use of IntegerType, to wit: 1. Type::getIntegerTypeMask -> IntegerType::getBitMask 2. Type::Int*Ty changed to IntegerType* from Type* 3. ConstantInt::getType() returns IntegerType* now, not Type* This also fixes PR1120. Patch by Sheng Zhou. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33370 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused forward class declarations.Reid Spencer2007-01-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33276 91177308-0d34-0410-b5e6-96231b3b80d8
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-15
| | | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33225 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1064:Reid Spencer2007-01-12
| | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-31
| | | | | | | | | Make integer types signless: Rename [US]Byte->Int8, [U]Short->Int16, [U]Int->Int32, [U]Long->Int64 Remove methods pertaining to sign of integer types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32775 91177308-0d34-0410-b5e6-96231b3b80d8