aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Constants.h
Commit message (Collapse)AuthorAgeFilesLines
* Reword the comment for ConstantInt's getLimitedValue.Dan Gohman2008-12-201-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61280 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ConstantAggregateZero::get return a ConstantAggregateZero*,Dan Gohman2008-12-081-1/+1
| | | | | | | as suggested in PR3182. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60691 91177308-0d34-0410-b5e6-96231b3b80d8
* A file missed from previous checkin.Dale Johannesen2008-10-091-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57330 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent warning about conversion from 64-bit to 32-bit by (yuck) casting...Bill Wendling2008-09-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56359 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new ConstantExpr::getWithOperands that takes any array of operands Chris Lattner2008-08-201-1/+4
| | | | | | | | | instead of requiring an std::vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55084 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary implicit argumentNate Begeman2008-07-251-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54031 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix minor issues with VICmp/VFCmp constant expressionsNate Begeman2008-07-251-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54030 91177308-0d34-0410-b5e6-96231b3b80d8
* IR, bitcode reader, bitcode writer, and asmparser changes toDan Gohman2008-05-311-4/+13
| | | | | | | | | | | | insertvalue and extractvalue to use constant indices instead of Value* indices. And begin updating LangRef.html. There's definately more to come here, but I'm checking this basic support in now to make it available to people who are interested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51806 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove warnings about unused parameters and shadowed variables.Bill Wendling2008-05-191-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51266 91177308-0d34-0410-b5e6-96231b3b80d8
* IR support for extractvalue and insertvalue instructions. Also, beginDan Gohman2008-05-151-0/+9
| | | | | | | moving toward making structs and arrays first-class types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51157 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRefNate Begeman2008-05-121-0/+2
| | | | | | | for details. CodeGen support coming in a follow up patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50985 91177308-0d34-0410-b5e6-96231b3b80d8
* remove commented-out code, it is subsumed by ↵Gabor Greif2008-05-101-9/+0
| | | | | | DECLARE_TRANSPARENT_OPERAND_ACCESSORS git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50944 91177308-0d34-0410-b5e6-96231b3b80d8
* merge of use-diet branch to trunkGabor Greif2008-05-101-5/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50943 91177308-0d34-0410-b5e6-96231b3b80d8
* remove obsolete method.Chris Lattner2008-05-041-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50622 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to convert PPC long double.Dale Johannesen2008-04-281-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50369 91177308-0d34-0410-b5e6-96231b3b80d8
* ConstantFP::get should be static.Chris Lattner2008-04-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49434 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak teh build.Evan Cheng2008-04-091-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49417 91177308-0d34-0410-b5e6-96231b3b80d8
* add a version of ConstantFP::get that doesn't take a redundant Type* value,Chris Lattner2008-04-091-1/+4
| | | | | | | start migrating code over to use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49413 91177308-0d34-0410-b5e6-96231b3b80d8
* make ConstantFP::isExactlyValue work for long double as well.Chris Lattner2008-04-091-7/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49410 91177308-0d34-0410-b5e6-96231b3b80d8
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-1/+30
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
* ubyte and sbyte? what are those?Nick Lewycky2008-03-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48585 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | | | 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
* Reverting dtor devirtualization patch.Gordon Henriksen2007-12-101-146/+4
| | | | | | | _sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed _sabre_: the vtable lives to fight another day git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44760 91177308-0d34-0410-b5e6-96231b3b80d8
* Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!Gordon Henriksen2007-12-091-4/+146
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44747 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of compilation warning during release buildsBill Wendling2007-11-011-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43608 91177308-0d34-0410-b5e6-96231b3b80d8
* Define a helper function ConstantVector::getSplatValue for testing forDan Gohman2007-10-171-0/+4
| | | | | | | and working with broadcasted constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43076 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding C and Ocaml bindings for ConstantExpr.Gordon Henriksen2007-10-061-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42696 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the assumption that FP's are either float orDale Johannesen2007-09-141-0/+3
| | | | | | | | | | | | | | | double from some of the many places in the optimizers it appears, and do something reasonable with x86 long double. Make APInt::dump() public, remove newline, use it to dump ConstantSDNode's. Allow APFloats in FoldingSet. Expand X86 backend handling of long doubles (conversions to/from int, mostly). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41967 91177308-0d34-0410-b5e6-96231b3b80d8
* Next round of APFloat changes.Dale Johannesen2007-09-061-17/+4
| | | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41747 91177308-0d34-0410-b5e6-96231b3b80d8
* Change LegalFPImmediates to use APFloat.Dale Johannesen2007-08-301-3/+19
| | | | | | | | | | Add APFloat interfaces to ConstantFP, SelectionDAG. Fix integer bit in double->APFloat conversion. Convert LegalizeDAG to use APFloat interface in ConstantFPSDNode uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41587 91177308-0d34-0410-b5e6-96231b3b80d8
* Change internal representation of ConstantFP to use APFloat.Dale Johannesen2007-08-241-2/+10
| | | | | | | | Interface to rest of the compiler unchanged, as yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41348 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix minor doxygen nits.Reid Spencer2007-08-051-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40854 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments about vectors to use the current wording.Dan Gohman2007-07-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39921 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor comment cleanups.Dan Gohman2007-05-241-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37321 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Value::getValueType to getValueID, to avoid confusion withDan Gohman2007-04-131-9/+9
| | | | | | | other things named getValueType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35964 91177308-0d34-0410-b5e6-96231b3b80d8
* getLimitedValue now just forward to APInt's getLimitedValue. Mark it const.Chris Lattner2007-04-101-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35861 91177308-0d34-0410-b5e6-96231b3b80d8
* add a helper function to constantint.Chris Lattner2007-04-031-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35610 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure this method just return value equal or less than Limit.Zhou Sheng2007-03-301-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35509 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename and correct the method "greaterOrEqual".Zhou Sheng2007-03-301-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35502 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two utility methods into ConstantInt.Zhou Sheng2007-03-301-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35501 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the 'explicit' keyword to several constructors that accept oneDan Gohman2007-03-231-3/+3
| | | | | | | 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
* Allow ConstantInt::get(Ty, uint64_t) to interpret the 64-bit values as aReid Spencer2007-03-191-1/+1
| | | | | | | negative number. This is needed to fix test/Assembler/2007-03-19-NegValue.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35181 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a non-virtual test for zero, isZero, and rename isUnitValue isOne.Reid Spencer2007-03-021-2/+10
| | | | | | | | These will be used in upcoming patches to avoid virtual function call when the client knows it is a ConstantInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34820 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove virtual keyword from method that doesn't need to be virtual.Reid Spencer2007-03-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34817 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an isUnitValue method for comparison against 1. This just follows aReid Spencer2007-03-011-0/+7
| | | | | | | | | common pattern with isNullValue, isAllOnesValue, etc. It also helps to prevent things like getZExtValue() == 1, which could assert for large bitwidths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34813 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop the ConstantInt(const Type&, const APInt&) constructor. It isReid Spencer2007-03-011-5/+4
| | | | | | | redundant and more verbose than the ConstantInt(const APInt&) constructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34792 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a convenience method to construct a ConstantInt directly from anReid Spencer2007-02-281-0/+4
| | | | | | | | APInt. The implied type is the integer type that corresponds to the bit width of the APInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34757 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1205:Reid Spencer2007-02-261-25/+30
| | | | | | | | | | | Implement the first step towards arbitrary precision integer support in LLVM. The APInt class provides arbitrary precision arithmetic and value representation. This patch changes ConstantInt to use APInt as its value representation without supporting bit widths > 64 yet. That change will come after ConstantFolding handles bit widths > 64 bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34647 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate some dead friends.Chris Lattner2007-02-201-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34447 91177308-0d34-0410-b5e6-96231b3b80d8
* cleanup ConstantInt to use a single DenseMap for uniquing instead of theChris Lattner2007-02-201-4/+1
| | | | | | | | heavy-weight ValueMap class. This reduces mem usage bc reading kc++ by 29K, even though it only creates 2955 constant ints! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34445 91177308-0d34-0410-b5e6-96231b3b80d8