1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

223 Commits

Author SHA1 Message Date
Chris Lattner
1358ad783e New method
llvm-svn: 6259
2003-05-21 17:49:08 +00:00
Chris Lattner
0619ee9f39 Add some methods to make type safety a bit easier
llvm-svn: 6198
2003-05-14 17:49:52 +00:00
Chris Lattner
bb00f755ed Change the interface to constant expressions to allow automatic folding
llvm-svn: 5793
2003-04-16 22:40:51 +00:00
Chris Lattner
5e5950b7e0 Fix ConstantUInt::isAllOnesValue
llvm-svn: 5734
2003-03-10 22:39:02 +00:00
Chris Lattner
07a7a75331 Extend struct and array constants to support isNullValue
llvm-svn: 5719
2003-03-06 21:02:43 +00:00
Chris Lattner
5b41b28fb6 - Dramatically simplify the Constant::mutateReferences implementation,
allowing it to be called on all constant types (structures/arrays)

llvm-svn: 4160
2002-10-14 03:30:23 +00:00
Chris Lattner
0acdba0025 - Add new Constant::replaceUsesOfWithOnConstant which has an end result
similar to User::replaceUsesOfWith but actually does the right thing for
    constants.

llvm-svn: 4102
2002-10-09 23:12:25 +00:00
Chris Lattner
cc9d7e01c9 Add support for turning an array of characters into a string.
llvm-svn: 3509
2002-08-26 17:53:56 +00:00
Chris Lattner
8f4f2153e5 - ConstantPointerRefs are now automatically removed from the module table
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.

llvm-svn: 3378
2002-08-18 00:39:59 +00:00
Chris Lattner
6a9d88347a Remove support for Not ConstantExpr. This simplifies the unary case to only
have to support the cast instruction, so the function is renamed to getCast.

llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner
3e63ddad5b - Rename ConstantGenericIntegral -> ConstantIntegral
- Add new methods to ConstantIntegral: getMaxValue, getMinValue,
   getAllOnesValue

llvm-svn: 3298
2002-08-13 17:50:18 +00:00
Chris Lattner
4fbca59155 - Added a new superclass of ConstantBool/ConstantInt: ConstantGenericIntegral
- Moved InstCombine: isMaxValue, isMinValue, isAllOnesValue to Constants.h

llvm-svn: 3293
2002-08-12 21:21:21 +00:00
Chris Lattner
12b9a2a7e6 Cleanup ConstantExpr handling:
* 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

llvm-svn: 3160
2002-07-30 18:54:22 +00:00
Chris Lattner
4ad0749487 Make getelementptr ConstExpr take a vector of constants not values
llvm-svn: 2943
2002-07-18 00:11:08 +00:00
Vikram S. Adve
9c2c68687e Ensure ConstExpr constants are unique.
llvm-svn: 2910
2002-07-15 18:20:50 +00:00
Vikram S. Adve
79b72a8298 Added subclass ConstantExpr to represent expressions consructed from
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.

llvm-svn: 2891
2002-07-14 22:47:54 +00:00
Chris Lattner
321a8cf4ba Split ConstantVals.h into Constant.h and Constants.h
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
c5db0cc189 Rename getNullConstant to getNullValue
llvm-svn: 2321
2002-04-27 02:22:42 +00:00
Chris Lattner
bfad09f50d Remove getStrValue method from Constant implementations. The AssemblyWriter
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.

llvm-svn: 2297
2002-04-18 18:51:39 +00:00
Chris Lattner
6bdd1d2e3f * Add virtual print methods
* s/Method/Function

llvm-svn: 2172
2002-04-08 21:56:02 +00:00
Chris Lattner
3dc9a2a61f Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
c717d96290 Constants KNOW they are of a derived type
llvm-svn: 1439
2001-12-13 00:38:57 +00:00
Chris Lattner
f6b7da2bb5 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00