aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Constants.h
Commit message (Collapse)AuthorAgeFilesLines
* For PR950:Reid Spencer2006-11-271-2/+26
| | | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-081-4/+2
| | | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31542 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-021-1/+3
| | | | | | | Replace the REM instruction with UREM, SREM and FREM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
* Add isCString() - returns true if a ConstantArray is a CString.Evan Cheng2006-10-261-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31201 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-10-261-1/+3
| | | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment to be accurate.Reid Spencer2006-10-201-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31064 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-10-201-109/+39
| | | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate ConstantBool::True and ConstantBool::False. Instead, provideChris Lattner2006-09-281-7/+11
| | | | | | | ConstantBool::getTrue() and ConstantBool::getFalse(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30666 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoChris Lattner2006-09-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30453 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR797:Reid Spencer2006-08-251-80/+114
| | | | | | | | Remove exception throwing/handling from lib/Bytecode, and adjust its users to compensate for changes in the interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29875 91177308-0d34-0410-b5e6-96231b3b80d8
* Add another helper method.Chris Lattner2006-07-141-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29147 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new method for bugpoint to use.Chris Lattner2006-07-141-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29142 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a simpler interface for getting a ConstantArray from a characterReid Spencer2006-05-301-6/+6
| | | | | | | | | string. Instead of specifying the length, just specify whether the user wants a terminating null or not. The default is "true" to retain the same behavior as previously provided by this function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28562 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly document the second form of ConstArray::get()Reid Spencer2006-05-301-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28553 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust the interface to ConstantArray::get. The previousReid Spencer2006-05-301-1/+1
| | | | | | | | | | implementation always added a null byte to the end of the string. It turns out that this is not always wanted. By adding a length parameter we preserve this behavior when length==0 (default value) but also allow other lengths (not null terminated) to be created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28552 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR786:Reid Spencer2006-05-241-1/+1
| | | | | | | | | Minor tweaks in public headers and a few .cpp files so that LLVM can build successfully with -pedantic and projects using LLVM with -pedantic don't get warnings from LLVM. There's still more -pedantic warnings to fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new shufflevector instructionChris Lattner2006-04-081-9/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27507 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new Type::getIntegralTypeMask() method, which is useful for clients thatChris Lattner2006-02-071-1/+0
| | | | | | | want to do bitwise inspection of integer types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26032 91177308-0d34-0410-b5e6-96231b3b80d8
* Instruction and constant expression definitions for the insertelementRobert Bocchino2006-01-171-0/+7
| | | | | | | operation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25402 91177308-0d34-0410-b5e6-96231b3b80d8
* Added an instruction and constant expression for the extractelementRobert Bocchino2006-01-101-0/+6
| | | | | | | operation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25176 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the signature of replaceUsesOfWithOnConstant to take a Use* and notChris Lattner2005-10-041-10/+4
| | | | | | | take the bool. The bool is always true dynamically. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23625 91177308-0d34-0410-b5e6-96231b3b80d8
* Split SimpleConstantVal up into its components, so each Constant subclass getsChris Lattner2005-09-271-22/+16
| | | | | | | | | | | | a different enum value. This allows 'classof' for these to be really simple, not needing to call getType() anymore. This speeds up isa/dyncast/etc for constants, and also makes them smaller. For example, the text section of a release build of InstCombine.cpp shrinks from 230037 bytes to 216363 bytes, a 6% reduction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23466 91177308-0d34-0410-b5e6-96231b3b80d8
* Add long-overdue helpers for getting constants with known upper bitsChris Lattner2005-09-241-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23426 91177308-0d34-0410-b5e6-96231b3b80d8
* Move code dependency for MathExtras.h out of Constants.h.Jim Laskey2005-08-171-7/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22840 91177308-0d34-0410-b5e6-96231b3b80d8
* Culling out use of unions for converting FP to bits and vice versa.Jim Laskey2005-08-171-17/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22838 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-211-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new function getPtrPtrFromArrayPtr().Alkis Evlogimenos2005-03-191-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20684 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the explicit opcode field in ConstantExpr, using the SubclassDataChris Lattner2005-02-051-13/+9
| | | | | | | | field to hold it instead. This shrinks memory usage for 176.gcc from 57628728 to 57598144 bytes, a small reduction of about 30K. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20047 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to changes in the User class.Chris Lattner2005-01-291-7/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19888 91177308-0d34-0410-b5e6-96231b3b80d8
* Change this method to return ulong, not uint, for 64-bit targets.Chris Lattner2004-12-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18906 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getOperand() and remove getElementAt() function.Alkis Evlogimenos2004-12-081-8/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18612 91177308-0d34-0410-b5e6-96231b3b80d8
* Add accessors for Constants in a ConstantStruct.Alkis Evlogimenos2004-12-051-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18550 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix grammar in comments to getSizeOf()Misha Brukman2004-10-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17200 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve comments and wrap to 80 columns.Alkis Evlogimenos2004-10-241-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17198 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ConstantExpr::getSizeOf(Type*).Alkis Evlogimenos2004-10-241-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17196 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new UndefValue classChris Lattner2004-10-161-0/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17035 91177308-0d34-0410-b5e6-96231b3b80d8
* Update doco, make doxygen more, use standard dividers.Chris Lattner2004-10-131-19/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16948 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow creation of GEP constantexprs with a vector of value* operands asChris Lattner2004-10-111-2/+5
| | | | | | | | well as a vector of constant*'s. It turns out that this is more efficient and all of the clients want to do that, so we should cater to them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16923 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-011-1/+1
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Packed types, brought to you by Brad JonesBrian Gaeke2004-08-201-0/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15938 91177308-0d34-0410-b5e6-96231b3b80d8
* Move method out of lineChris Lattner2004-08-041-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15497 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove uneeded getValues() functions.Alkis Evlogimenos2004-08-041-8/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15488 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a special version of getType for ConstantPointerNull, exposing the factChris Lattner2004-08-041-0/+7
| | | | | | | that all Null pointers have pointer type git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15458 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tabs to spaces; fix name of function in assert() description.Misha Brukman2004-07-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15009 91177308-0d34-0410-b5e6-96231b3b80d8
* inline classof implementations, eliminate use of virtual methods.Chris Lattner2004-07-191-41/+33
| | | | | | | classof<ConstantXXX> is now MUCH faster than it used to be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14986 91177308-0d34-0410-b5e6-96231b3b80d8
* ****** ABOLISH ConstantPointerRef *****Reid Spencer2004-07-171-38/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14919 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a helper method. The StructType element is completely redundant in mostChris Lattner2004-07-121-0/+3
| | | | | | | cases git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14777 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ConstantBool act like a 1 bit ConstantInt, in order to simplify clientChris Lattner2004-06-211-12/+11
| | | | | | | code. Patch contributed by Vladimir Prus. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14280 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some helpersChris Lattner2004-05-251-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13737 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ConstantExpr::get(Sign|Zero)Extend methodsChris Lattner2004-04-041-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12648 91177308-0d34-0410-b5e6-96231b3b80d8