forked from OSchip/llvm-project
parent
8ff4320071
commit
293285f883
|
@ -113,11 +113,11 @@ namespace llvm {
|
||||||
/* When bits of a floating point number are truncated, this enum is
|
/* When bits of a floating point number are truncated, this enum is
|
||||||
used to indicate what fraction of the LSB those bits represented.
|
used to indicate what fraction of the LSB those bits represented.
|
||||||
It essentially combines the roles of guard and sticky bits. */
|
It essentially combines the roles of guard and sticky bits. */
|
||||||
enum lostFraction { // Example of truncated bits:
|
enum lostFraction { // Example of truncated bits:
|
||||||
lfExactlyZero, // 000000
|
lfExactlyZero, // 000000
|
||||||
lfLessThanHalf, // 0xxxxx x's not all zero
|
lfLessThanHalf, // 0xxxxx x's not all zero
|
||||||
lfExactlyHalf, // 100000
|
lfExactlyHalf, // 100000
|
||||||
lfMoreThanHalf // 1xxxxx x's not all zero
|
lfMoreThanHalf // 1xxxxx x's not all zero
|
||||||
};
|
};
|
||||||
|
|
||||||
class APFloat {
|
class APFloat {
|
||||||
|
@ -207,7 +207,7 @@ namespace llvm {
|
||||||
/* Conversions. */
|
/* Conversions. */
|
||||||
opStatus convert(const fltSemantics &, roundingMode);
|
opStatus convert(const fltSemantics &, roundingMode);
|
||||||
opStatus convertToInteger(integerPart *, unsigned int, bool,
|
opStatus convertToInteger(integerPart *, unsigned int, bool,
|
||||||
roundingMode) const;
|
roundingMode) const;
|
||||||
opStatus convertFromSignExtendedInteger(const integerPart *, unsigned int,
|
opStatus convertFromSignExtendedInteger(const integerPart *, unsigned int,
|
||||||
bool, roundingMode);
|
bool, roundingMode);
|
||||||
opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int,
|
opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int,
|
||||||
|
|
|
@ -1130,12 +1130,12 @@ public:
|
||||||
/// DST += RHS + CARRY where CARRY is zero or one. Returns the
|
/// DST += RHS + CARRY where CARRY is zero or one. Returns the
|
||||||
/// carry flag.
|
/// carry flag.
|
||||||
static integerPart tcAdd(integerPart *, const integerPart *,
|
static integerPart tcAdd(integerPart *, const integerPart *,
|
||||||
integerPart carry, unsigned);
|
integerPart carry, unsigned);
|
||||||
|
|
||||||
/// DST -= RHS + CARRY where CARRY is zero or one. Returns the
|
/// DST -= RHS + CARRY where CARRY is zero or one. Returns the
|
||||||
/// carry flag.
|
/// carry flag.
|
||||||
static integerPart tcSubtract(integerPart *, const integerPart *,
|
static integerPart tcSubtract(integerPart *, const integerPart *,
|
||||||
integerPart carry, unsigned);
|
integerPart carry, unsigned);
|
||||||
|
|
||||||
/// DST += SRC * MULTIPLIER + PART if add is true
|
/// DST += SRC * MULTIPLIER + PART if add is true
|
||||||
/// DST = SRC * MULTIPLIER + PART if add is false
|
/// DST = SRC * MULTIPLIER + PART if add is false
|
||||||
|
@ -1149,23 +1149,23 @@ public:
|
||||||
/// parts were zero return zero, otherwise overflow occurred and
|
/// parts were zero return zero, otherwise overflow occurred and
|
||||||
/// return one.
|
/// return one.
|
||||||
static int tcMultiplyPart(integerPart *dst, const integerPart *src,
|
static int tcMultiplyPart(integerPart *dst, const integerPart *src,
|
||||||
integerPart multiplier, integerPart carry,
|
integerPart multiplier, integerPart carry,
|
||||||
unsigned int srcParts, unsigned int dstParts,
|
unsigned int srcParts, unsigned int dstParts,
|
||||||
bool add);
|
bool add);
|
||||||
|
|
||||||
/// DST = LHS * RHS, where DST has the same width as the operands
|
/// DST = LHS * RHS, where DST has the same width as the operands
|
||||||
/// and is filled with the least significant parts of the result.
|
/// and is filled with the least significant parts of the result.
|
||||||
/// Returns one if overflow occurred, otherwise zero. DST must be
|
/// Returns one if overflow occurred, otherwise zero. DST must be
|
||||||
/// disjoint from both operands.
|
/// disjoint from both operands.
|
||||||
static int tcMultiply(integerPart *, const integerPart *,
|
static int tcMultiply(integerPart *, const integerPart *,
|
||||||
const integerPart *, unsigned);
|
const integerPart *, unsigned);
|
||||||
|
|
||||||
/// DST = LHS * RHS, where DST has width the sum of the widths of
|
/// DST = LHS * RHS, where DST has width the sum of the widths of
|
||||||
/// the operands. No overflow occurs. DST must be disjoint from
|
/// the operands. No overflow occurs. DST must be disjoint from
|
||||||
/// both operands. Returns the number of parts required to hold the
|
/// both operands. Returns the number of parts required to hold the
|
||||||
/// result.
|
/// result.
|
||||||
static unsigned int tcFullMultiply(integerPart *, const integerPart *,
|
static unsigned int tcFullMultiply(integerPart *, const integerPart *,
|
||||||
const integerPart *, unsigned, unsigned);
|
const integerPart *, unsigned, unsigned);
|
||||||
|
|
||||||
/// If RHS is zero LHS and REMAINDER are left unchanged, return one.
|
/// If RHS is zero LHS and REMAINDER are left unchanged, return one.
|
||||||
/// Otherwise set LHS to LHS / RHS with the fractional part
|
/// Otherwise set LHS to LHS / RHS with the fractional part
|
||||||
|
@ -1178,18 +1178,18 @@ public:
|
||||||
/// and are destroyed. LHS, REMAINDER and SCRATCH must be
|
/// and are destroyed. LHS, REMAINDER and SCRATCH must be
|
||||||
/// distinct.
|
/// distinct.
|
||||||
static int tcDivide(integerPart *lhs, const integerPart *rhs,
|
static int tcDivide(integerPart *lhs, const integerPart *rhs,
|
||||||
integerPart *remainder, integerPart *scratch,
|
integerPart *remainder, integerPart *scratch,
|
||||||
unsigned int parts);
|
unsigned int parts);
|
||||||
|
|
||||||
/// Shift a bignum left COUNT bits. Shifted in bits are zero.
|
/// Shift a bignum left COUNT bits. Shifted in bits are zero.
|
||||||
/// There are no restrictions on COUNT.
|
/// There are no restrictions on COUNT.
|
||||||
static void tcShiftLeft(integerPart *, unsigned int parts,
|
static void tcShiftLeft(integerPart *, unsigned int parts,
|
||||||
unsigned int count);
|
unsigned int count);
|
||||||
|
|
||||||
/// Shift a bignum right COUNT bits. Shifted in bits are zero.
|
/// Shift a bignum right COUNT bits. Shifted in bits are zero.
|
||||||
/// There are no restrictions on COUNT.
|
/// There are no restrictions on COUNT.
|
||||||
static void tcShiftRight(integerPart *, unsigned int parts,
|
static void tcShiftRight(integerPart *, unsigned int parts,
|
||||||
unsigned int count);
|
unsigned int count);
|
||||||
|
|
||||||
/// The obvious AND, OR and XOR and complement operations.
|
/// The obvious AND, OR and XOR and complement operations.
|
||||||
static void tcAnd(integerPart *, const integerPart *, unsigned int);
|
static void tcAnd(integerPart *, const integerPart *, unsigned int);
|
||||||
|
@ -1199,14 +1199,14 @@ public:
|
||||||
|
|
||||||
/// Comparison (unsigned) of two bignums.
|
/// Comparison (unsigned) of two bignums.
|
||||||
static int tcCompare(const integerPart *, const integerPart *,
|
static int tcCompare(const integerPart *, const integerPart *,
|
||||||
unsigned int);
|
unsigned int);
|
||||||
|
|
||||||
/// Increment a bignum in-place. Return the carry flag.
|
/// Increment a bignum in-place. Return the carry flag.
|
||||||
static integerPart tcIncrement(integerPart *, unsigned int);
|
static integerPart tcIncrement(integerPart *, unsigned int);
|
||||||
|
|
||||||
/// Set the least significant BITS and clear the rest.
|
/// Set the least significant BITS and clear the rest.
|
||||||
static void tcSetLeastSignificantBits(integerPart *, unsigned int,
|
static void tcSetLeastSignificantBits(integerPart *, unsigned int,
|
||||||
unsigned int bits);
|
unsigned int bits);
|
||||||
|
|
||||||
/// @brief debug method
|
/// @brief debug method
|
||||||
void dump() const;
|
void dump() const;
|
||||||
|
|
|
@ -335,7 +335,7 @@ namespace llvm {
|
||||||
/// the intervals are not joinable, this aborts.
|
/// the intervals are not joinable, this aborts.
|
||||||
void join(LiveInterval &Other, const int *ValNoAssignments,
|
void join(LiveInterval &Other, const int *ValNoAssignments,
|
||||||
const int *RHSValNoAssignments,
|
const int *RHSValNoAssignments,
|
||||||
SmallVector<VNInfo*, 16> &NewVNInfo);
|
SmallVector<VNInfo*, 16> &NewVNInfo);
|
||||||
|
|
||||||
/// removeRange - Remove the specified range from this interval. Note that
|
/// removeRange - Remove the specified range from this interval. Note that
|
||||||
/// the range must already be in this interval in its entirety.
|
/// the range must already be in this interval in its entirety.
|
||||||
|
|
|
@ -172,15 +172,15 @@ namespace llvm {
|
||||||
/// MBB return a pointer the MBB
|
/// MBB return a pointer the MBB
|
||||||
MachineBasicBlock* getMBBFromIndex(unsigned index) const {
|
MachineBasicBlock* getMBBFromIndex(unsigned index) const {
|
||||||
std::vector<IdxMBBPair>::const_iterator I =
|
std::vector<IdxMBBPair>::const_iterator I =
|
||||||
std::lower_bound(Idx2MBBMap.begin(), Idx2MBBMap.end(), index);
|
std::lower_bound(Idx2MBBMap.begin(), Idx2MBBMap.end(), index);
|
||||||
// Take the pair containing the index
|
// Take the pair containing the index
|
||||||
std::vector<IdxMBBPair>::const_iterator J =
|
std::vector<IdxMBBPair>::const_iterator J =
|
||||||
((I != Idx2MBBMap.end() && I->first > index) ||
|
((I != Idx2MBBMap.end() && I->first > index) ||
|
||||||
(I == Idx2MBBMap.end() && Idx2MBBMap.size()>0)) ? (I-1): I;
|
(I == Idx2MBBMap.end() && Idx2MBBMap.size()>0)) ? (I-1): I;
|
||||||
|
|
||||||
assert(J != Idx2MBBMap.end() && J->first < index+1 &&
|
assert(J != Idx2MBBMap.end() && J->first < index+1 &&
|
||||||
index <= getMBBEndIdx(J->second) &&
|
index <= getMBBEndIdx(J->second) &&
|
||||||
"index does not correspond to an MBB");
|
"index does not correspond to an MBB");
|
||||||
return J->second;
|
return J->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue