aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Constants.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for select constant exprsChris Lattner2004-03-121-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12309 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new ConstantAggregateZero class, to fix PR239. This makes zeroChris Lattner2004-02-151-20/+36
| | | | | | | | | | initializers for constant structs and arrays take constant space, instead of space proportinal to the number of elements. This reduces the memory usage of the LLVM compiler by hundreds of megabytes when compiling some nasty SPEC95 benchmarks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11470 91177308-0d34-0410-b5e6-96231b3b80d8
* ConstantArray::get and ConstantStruct::get now just return pointers toChris Lattner2004-02-151-4/+3
| | | | | | | | 'Constant', instead of specific subclass pointers. In the future, these will return an instance of ConstantAggregateZero if all of the inputs are zeros. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11467 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct the method I just added to actually return false sometimesChris Lattner2004-02-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11069 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new method to ConstantFPChris Lattner2004-02-021-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11068 91177308-0d34-0410-b5e6-96231b3b80d8
* The first half of a fix for PR218 & ↵Chris Lattner2004-02-011-3/+12
| | | | | | test/Regression/Assembler/2004-02-01-NegativeZero.llx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11063 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new ConstantArray::isString(), as the conditions for using getString()Chris Lattner2004-01-141-6/+13
| | | | | | | | | | are complex enough to check that it should be a seperate method. While I'm here, improve ConstantArray::getNullValue a bit, though the FIXME is still quite valid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10850 91177308-0d34-0410-b5e6-96231b3b80d8
* The getShift method is no obsoleteChris Lattner2004-01-121-7/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10797 91177308-0d34-0410-b5e6-96231b3b80d8
* The ConstantPointer class is now gone.Chris Lattner2003-11-171-46/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10057 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes for PR114: Thanks to Reid Spencer!Chris Lattner2003-11-161-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM copyright header (for lack of a better term).John Criswell2003-10-201-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some new methods to forward toChris Lattner2003-10-051-2/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8852 91177308-0d34-0410-b5e6-96231b3b80d8
* These methods are dead, remove themChris Lattner2003-10-031-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8839 91177308-0d34-0410-b5e6-96231b3b80d8
* Standardize header file commentsChris Lattner2003-09-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow for "unsafe" replaceAllUsesWith operatations, for use during type ↵Chris Lattner2003-08-291-4/+8
| | | | | | resolution git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8208 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more doxygen comments, add new ConstantInt::getRawValue methodChris Lattner2003-07-231-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7244 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a ton of extraneous #includesChris Lattner2003-06-221-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
* Included assert.h so that the code compiles under newer versions of GCC.John Criswell2003-06-111-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some cruft, add some methods to allow implementation of bugfix forChris Lattner2003-05-231-17/+22
| | | | | | | Bug: Linker/2003-04-26-NullPtrLinkProblem.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6313 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor rewording/cleanupsChris Lattner2003-05-231-11/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6311 91177308-0d34-0410-b5e6-96231b3b80d8
* New methodChris Lattner2003-05-211-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6259 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some methods to make type safety a bit easierChris Lattner2003-05-141-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6198 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the interface to constant expressions to allow automatic foldingChris Lattner2003-04-161-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5793 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ConstantUInt::isAllOnesValueChris Lattner2003-03-101-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5734 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend struct and array constants to support isNullValueChris Lattner2003-03-061-2/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5719 91177308-0d34-0410-b5e6-96231b3b80d8
* - Dramatically simplify the Constant::mutateReferences implementation,Chris Lattner2002-10-141-14/+0
| | | | | | | allowing it to be called on all constant types (structures/arrays) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4160 91177308-0d34-0410-b5e6-96231b3b80d8
* - Add new Constant::replaceUsesOfWithOnConstant which has an end resultChris Lattner2002-10-091-0/+4
| | | | | | | | similar to User::replaceUsesOfWith but actually does the right thing for constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4102 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for turning an array of characters into a string.Chris Lattner2002-08-261-96/+128
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3509 91177308-0d34-0410-b5e6-96231b3b80d8
* - ConstantPointerRefs are now automatically removed from the module tableChris Lattner2002-08-181-7/+11
| | | | | | | | | | when they are destroyed, which makes Constant::destroyConstant an actually useful external interface. Expose these methods publicly. - Implement destroyConstant on ConstPointerNull so that destroyConstant can be used on any derived type constant safely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3378 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for Not ConstantExpr. This simplifies the unary case to onlyChris Lattner2002-08-141-2/+2
| | | | | | | have to support the cast instruction, so the function is renamed to getCast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3328 91177308-0d34-0410-b5e6-96231b3b80d8
* - Rename ConstantGenericIntegral -> ConstantIntegralChris Lattner2002-08-131-6/+13
| | | | | | | | - Add new methods to ConstantIntegral: getMaxValue, getMinValue, getAllOnesValue git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3298 91177308-0d34-0410-b5e6-96231b3b80d8
* - Added a new superclass of ConstantBool/ConstantInt: ConstantGenericIntegralChris Lattner2002-08-121-8/+80
| | | | | | | - Moved InstCombine: isMaxValue, isMinValue, isAllOnesValue to Constants.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3293 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup ConstantExpr handling:Chris Lattner2002-07-301-16/+15
| | | | | | | | | | | | | | | * Correctly delete TypeHandles in AsmParser. In addition to not leaking memory, this prevents a bug that could have occurred when a type got resolved that the constexpr was using * Check for errors in the AsmParser instead of hitting assertion failures deep in the code * Simplify the interface to the ConstantExpr class, removing unneccesary parameters to the ::get* methods. * Rename the 'getelementptr' version of ConstantExpr::get to ConstantExpr::getGetElementPtr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3160 91177308-0d34-0410-b5e6-96231b3b80d8
* Make getelementptr ConstExpr take a vector of constants not valuesChris Lattner2002-07-181-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2943 91177308-0d34-0410-b5e6-96231b3b80d8
* Ensure ConstExpr constants are unique.Vikram S. Adve2002-07-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2910 91177308-0d34-0410-b5e6-96231b3b80d8
* Added subclass ConstantExpr to represent expressions consructed fromVikram S. Adve2002-07-141-5/+69
| | | | | | | | | | constants using operators such as cast, getelementptr, add, shl, etc. Note that a ConstantExpr can be of any type, so classof() in most other subclasses (that discriminate by type) have to check that it is also not a ConstantExpr. This is why isConstantExpr() is needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2891 91177308-0d34-0410-b5e6-96231b3b80d8
* Split ConstantVals.h into Constant.h and Constants.hChris Lattner2002-04-281-51/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2378 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getNullConstant to getNullValueChris Lattner2002-04-271-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2321 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove getStrValue method from Constant implementations. The AssemblyWriterChris Lattner2002-04-181-15/+0
| | | | | | | | now knows how to write out a constant, not the constants themselves. This is fixed due to the move of the AsmWriter to the VMcore library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2297 91177308-0d34-0410-b5e6-96231b3b80d8
* * Add virtual print methodsChris Lattner2002-04-081-0/+2
| | | | | | | * s/Method/Function git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2172 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to build successfully with GCC 3.02Chris Lattner2002-01-201-18/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
* Constants KNOW they are of a derived typeChris Lattner2001-12-131-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1439 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ConstPoolVal -> ConstantChris Lattner2001-12-031-0/+382
Rename ConstPool* -> Constant* Rename ConstPoolVals.h -> ConstantVals.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8