[llvm-commits] ConstantInt Patch

Reid Spencer rspencer at reidspencer.com
Mon Feb 26 12:44:31 PST 2007


Chris,

Here is round two. This is a slightly larger patch that also includes
the following changes:

      * APInt::getValue() -> getSExtValue() and getZExtValue()
      * const APInt& ConstantInt::getValue() const { return Val; }
      * ConstantInt::get(const Type*, const APInt&)
      * APInt constructor for ConstantInt::get to use
      * APInt::getHashValue()  -- used for the DenseMap of ConstantInt
        values.
      * Changes in Constants.cpp to use getHashValue() for the key in
        the map of ConstantInt values.
Reid.

On Mon, 2007-02-26 at 10:46 -0800, Reid Spencer wrote:
> Hi,
> 
> I would like to commit this small patch but thought I should send it out
> first. This changes ConstantInt to use an APInt object as its value
> instead of a uint64_t. The interface to ConstantInt still uses uint64_t
> so the APInt is just being used as a glorified uint64_t as all bit
> widths are <= 64. This change passes DejaGnu, the MultiSource/Benchmarks
> test suite, and a few of the SPEC benchmarks that I tried (444.namd,
> 176.gcc, 473.astar).
> 
> Okay to commit?
> 
> Reid.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConstantInt2.patch
Type: text/x-patch
Size: 11595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070226/66071298/attachment.bin>


More information about the llvm-commits mailing list