Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-04-10 Thread Reid Spencer
Chris, On Tue, 2007-04-10 at 01:43 -0500, Chris Lattner wrote: > > Changes in directory llvm/include/llvm/ADT: > > APInt.h updated: 1.63 -> 1.64 > --- > Log message: > > add a method > > > --- > Diffs of the changes: (+7 -0) > > APInt.h |7 +++ > 1 files changed, 7 insertions(+) >

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Chris Lattner
On Mar 24, 2007, at 4:37 PM, Reid Spencer wrote: > On Sat, 2007-03-24 at 16:31 -0700, Chris Lattner wrote: >>>/// @param loBit the index of the lowest bit set. >>>/// @returns An APInt value with the requested bits set. >>>/// @brief Get a value with a block of bits set. >>> - static

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Chris Lattner
On Mar 24, 2007, at 4:36 PM, Reid Spencer wrote: >/// @brief Get a value with high bits set >static APInt getHighBitsSet(uint32_t numBits, uint32_t hiBitsSet) { > assert(hiBitsSet <= numBits && "Too many bits to set!"); > -uint32_t mvBits = numBits - hiBitsSet; > +uint32_t shi

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
On Sat, 2007-03-24 at 16:31 -0700, Chris Lattner wrote: > >/// @param loBit the index of the lowest bit set. > >/// @returns An APInt value with the requested bits set. > >/// @brief Get a value with a block of bits set. > > - static APInt getBitsSet(uint32_t numBits, uint32_t hiBit,

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Chris Lattner
>/// @param loBit the index of the lowest bit set. >/// @returns An APInt value with the requested bits set. >/// @brief Get a value with a block of bits set. > - static APInt getBitsSet(uint32_t numBits, uint32_t hiBit, > uint32_t loBit = 0); > + static APInt getBitsSet(uint32_t n

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Chris Lattner
> Implement the getHighBitsSet and getLowBitsSet functions. >/// @param numBits the bitwidth of the result >/// @param hiBitsSet the number of high-order bits set in the > result. >/// @brief Get a value with high bits set > - static APInt getHighBitsSet(uint32_t numBits, uint32_t h

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-19 Thread Reid Spencer
On Mon, 2007-03-19 at 10:11 +0100, Duncan Sands wrote: > > Add isStrictPositive() to APInt to determine if this APInt Value > 0. > > Shouldn't this be "isStrictlyPositive"? Yes, it Should. Sheng, please correct the name of this function as Duncan suggested. Thanks, Reid. > > Duncan. >

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-19 Thread Duncan Sands
> Add isStrictPositive() to APInt to determine if this APInt Value > 0. Shouldn't this be "isStrictlyPositive"? Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-01 Thread Chris Lattner
> Add bitsToDouble and bitsToFloat methods for re-interpretation of > bits as FP. Likewise, these shouldn't be needed. -Chris > --- > Diffs of the changes: (+26 -0) > > APInt.h | 26 ++ > 1 files changed, 26 insertions(+) > > > Index: llvm/include/llvm/ADT/APInt.h >

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-01 Thread Chris Lattner
> Add doubleToBits and floatToBits methods. These shouldn't be needed. bitstodouble only works with a 64-bit source integer, and bitstofloat only works with a 32-bit source integer. MathExtras.h should be sufficient here, -Chris > > --- > Diffs of the changes: (+34 -0) > > APInt.h | 34 +

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-02-08 Thread Chris Lattner
>> // >> ===-- >> ===// >> // APInt Class >> // >> ===-- >> ===// >> @@ -40,14 +55,18 @@ >> class APInt { >>/// Friend Fu

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-02-08 Thread Reid Spencer
Sheng, Some feedback for you ... On Thu, 2007-02-08 at 08:30 -0600, Zhou Sheng wrote: > > Changes in directory llvm/include/llvm/ADT: > > APInt.h updated: 1.4 -> 1.5 > --- > Log message: > > As Chris and Reid suggested, remove "isSigned" field from APInt, instead, > add some signed/unsigned a

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-02-05 Thread Chris Lattner
Hi Sheng/Reid, Some comments about the approach, on top of what Reid already sent. The most significant is that isSigned should go away: > + class APInt { > + /// Friend Functions of APInt Declared here. For detailed > comments, > + /// see bottom of this file. > + friend bool isIntN(

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-02-05 Thread Reid Spencer
Sheng, Some comments for you .. On Mon, 2007-02-05 at 11:29 -0600, Zhou Sheng wrote: > > Changes in directory llvm/include/llvm/ADT: > > APInt.h added (r1.1) > --- > Log message: > > Add a class APInt to represent arbitrary precision constant integral values. > It is a functional replacement f