summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Constants.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* #include <iostream> since its not in Value.h any more.Reid Spencer2004-07-041-2/+3
| | | | llvm-svn: 14614
* Make ConstantBool act like a 1 bit ConstantInt, in order to simplify clientChris Lattner2004-06-211-4/+7
| | | | | | code. Patch contributed by Vladimir Prus. llvm-svn: 14280
* Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()Chris Lattner2004-06-171-11/+9
| | | | llvm-svn: 14201
* Workaround or a VS miscompilation bugChris Lattner2004-06-081-1/+1
| | | | llvm-svn: 14078
* Delete some unreachable codeChris Lattner2004-06-041-5/+0
| | | | llvm-svn: 14031
* Implement some helpersChris Lattner2004-05-251-0/+10
| | | | llvm-svn: 13738
* Add ConstantExpr::get(Sign|Zero)Extend methodsChris Lattner2004-04-041-0/+16
| | | | llvm-svn: 12648
* Add support for constant expr castsChris Lattner2004-03-311-0/+8
| | | | llvm-svn: 12564
* Fix a latent bug in select constantexpr handling that was broke 253.perlbmkChris Lattner2004-03-301-0/+2
| | | | llvm-svn: 12562
* Handle -0.0 correctlyChris Lattner2004-03-291-1/+4
| | | | llvm-svn: 12530
* Add a bunch of methods that should have been added a long time ago.Chris Lattner2004-03-291-0/+61
| | | | llvm-svn: 12526
* Add support for select constant expressions. Use reserve a bit more to avoidChris Lattner2004-03-121-0/+35
| | | | | | memory wasteage. llvm-svn: 12323
* Eliminate nightmarish APIChris Lattner2004-03-081-23/+0
| | | | llvm-svn: 12214
* Move the folding of gep null, 0, 0, 0 to a place where it can be shared andChris Lattner2004-02-161-12/+5
| | | | | | enjoyed by all, fixing a fixme. Add an assert llvm-svn: 11505
* Add a new ConstantAggregateZero class, to fix PR239. This makes zeroChris Lattner2004-02-151-36/+70
| | | | | | | | | 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. llvm-svn: 11470
* ConstantArray::get and ConstantStruct::get now just return pointers toChris Lattner2004-02-151-4/+4
| | | | | | | 'Constant', instead of specific subclass pointers. In the future, these will return an instance of ConstantAggregateZero if all of the inputs are zeros. llvm-svn: 11467
* Remove dependence on return type of ConstantStruct::getChris Lattner2004-02-151-1/+1
| | | | llvm-svn: 11466
* Remove dependence on the return type of ConstantArray::getChris Lattner2004-02-151-1/+1
| | | | llvm-svn: 11463
* Keep a cache of non-abstract null arrays and structs. This speeds up llvm-disChris Lattner2004-02-151-2/+19
| | | | | | from 16.57 -> 13.46s on 129.compress. llvm-svn: 11462
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-091-9/+9
| | | | | | getElementTypes() is gone. llvm-svn: 11228
* Second half of a fix for PR218 & ↵Chris Lattner2004-02-011-4/+43
| | | | | | | | | | test/Regression/Assembler/2004-02-01-NegativeZero.llx. Basically we store floating point values as their integral components, instead of relying on the semantics of floating point < to differentiate between values. This is likely to make the map search be faster anyway. llvm-svn: 11064
* Fix a problem brian ran into with the bytecode reader asserting. It turnsChris Lattner2004-01-231-0/+5
| | | | | | | | out that the problem was actually the writer writing out a 'null' value because it didn't normalize it. This fixes: test/Regression/Assembler/2004-01-22-FloatNormalization.ll llvm-svn: 10967
* Fix bug in previous checkin: Demorgan would be ashamed of me, I need toChris Lattner2004-01-141-1/+1
| | | | | | lay off the crack. llvm-svn: 10855
* Implement ConstantArray::isStringChris Lattner2004-01-141-3/+16
| | | | llvm-svn: 10851
* Rename ConstantHandling.* -> ConstantFolding.*Chris Lattner2004-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Move a bunch of (now) private stuff from ConstantFolding.h into ConstantFolding.cpp. This _finally_ gets us to a place where we have a sane constant folder. The rules are: 1. LLVM clients now use ConstantExpr::get* methods to fold constants. If they cannot be folded, a constantexpr is created, so these methods always return valid Constant*'s. 2. The implementation of ConstantExpr::get* uses the functions exposed by ConstantFolding.h to try to fold constants. If they cannot be folded, they should return a null pointer. 3. The implementation of ConstantFolding can do whatever it wants, and only has one client (Constants.cpp) This cuts down on the wierd dependencies, and eliminates the two interfaces. The old constanthandling interface was especially bad for clients to use because almost none of them took the failure condition into consideration, thus leading to obscure problems. llvm-svn: 10807
* Move ConstantHandling.h into lib/VMCore and out of include/llvmChris Lattner2004-01-121-1/+1
| | | | llvm-svn: 10805
* Eliminate ConstantFoldShiftInstruction referenceChris Lattner2004-01-121-1/+1
| | | | llvm-svn: 10801
* Fix out of date comment, remove use of ConstantExpr::getShiftChris Lattner2004-01-121-8/+1
| | | | llvm-svn: 10794
* Make ConstantExpr::get work for shifts as wellChris Lattner2004-01-121-0/+2
| | | | llvm-svn: 10790
* Finegrainify namespacificationChris Lattner2003-11-211-110/+116
| | | | llvm-svn: 10131
* The ConstantPointer class is now gone.Chris Lattner2003-11-171-3/+10
| | | | llvm-svn: 10057
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* Add support for constant expr shiftsChris Lattner2003-11-051-0/+7
| | | | llvm-svn: 9735
* Fix bug: instcombine/2003-10-23-InstcombineNullFail.llChris Lattner2003-10-231-0/+11
| | | | llvm-svn: 9403
* Fix problem which effected linking apacheChris Lattner2003-10-211-1/+1
| | | | llvm-svn: 9335
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Add a sanity check for constant expression castsChris Lattner2003-10-071-0/+2
| | | | llvm-svn: 8951
* Type tables are now AbstractTypeUsers. This allows them to merge togetherChris Lattner2003-10-051-135/+217
| | | | | | | | constants as necessary due to type resolution. With this change, the following spec benchmarks now link: 176.gcc, 177.mesa, 252.eon, 253.perlbmk, & 300.twolf. IOW, all SPEC INT and FP benchmarks now link. llvm-svn: 8853
* Minor random speedup: make Constant::getNullValue only call ConstantFOO::getChris Lattner2003-10-031-13/+45
| | | | | | once! llvm-svn: 8845
* These methods are dead, remove them. Because the bodies will soon beChris Lattner2003-10-031-2/+8
| | | | | | ressurected, just ifdef them out for now. llvm-svn: 8840
* There is no reason for Value to be an AbstractTypeUser. This just makes thingsChris Lattner2003-10-021-4/+0
| | | | | | | significantly more complete. Instead, just make DerivedType's AbstractTypeUser's, and make Value contain a PATypeHolder. llvm-svn: 8828
* Implement "unsafe" replaceAllUsesWWith stuff for use during type resolution.Chris Lattner2003-08-291-17/+31
| | | | llvm-svn: 8209
* Refactor code to make it useful outside of Constants.cppChris Lattner2003-08-291-24/+4
| | | | llvm-svn: 8205
* The word `dependent' has no `a'.Misha Brukman2003-08-211-1/+1
| | | | llvm-svn: 8030
* Fix linking bug in xboardChris Lattner2003-08-181-1/+4
| | | | llvm-svn: 7952
* Fix a bug that brian reportedChris Lattner2003-07-301-4/+24
| | | | llvm-svn: 7428
* Simplify code by using ConstantInt::getRawValue instead of checking to seeChris Lattner2003-07-231-8/+5
| | | | | | whether the constant is signed or unsigned, then casting llvm-svn: 7252
* Fix bug: InstCombine/2003-06-22-ConstantExprCrash.llChris Lattner2003-06-221-1/+7
| | | | llvm-svn: 6857
* Fix bug: Linker/2003-06-02-TypeResolveProblem2.llChris Lattner2003-06-161-16/+28
| | | | llvm-svn: 6699
* * Make assertion message usefulChris Lattner2003-06-021-6/+5
| | | | | | * Kill dead conditional llvm-svn: 6544
OpenPOWER on IntegriCloud