mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
Move APInt::operator! inline, it's small and fuses well with surrounding code when inlined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a03d366c88
commit
a189885188
@ -561,7 +561,15 @@ public:
|
|||||||
/// Performs logical negation operation on this APInt.
|
/// Performs logical negation operation on this APInt.
|
||||||
/// @returns true if *this is zero, false otherwise.
|
/// @returns true if *this is zero, false otherwise.
|
||||||
/// @brief Logical negation operator.
|
/// @brief Logical negation operator.
|
||||||
bool operator!() const;
|
bool operator!() const {
|
||||||
|
if (isSingleWord())
|
||||||
|
return !VAL;
|
||||||
|
|
||||||
|
for (unsigned i = 0; i != getNumWords(); ++i)
|
||||||
|
if (pVal[i])
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
/// @name Assignment Operators
|
/// @name Assignment Operators
|
||||||
|
@ -457,16 +457,6 @@ APInt APInt::XorSlowCase(const APInt& RHS) const {
|
|||||||
return APInt(val, getBitWidth()).clearUnusedBits();
|
return APInt(val, getBitWidth()).clearUnusedBits();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool APInt::operator !() const {
|
|
||||||
if (isSingleWord())
|
|
||||||
return !VAL;
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < getNumWords(); ++i)
|
|
||||||
if (pVal[i])
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
APInt APInt::operator*(const APInt& RHS) const {
|
APInt APInt::operator*(const APInt& RHS) const {
|
||||||
assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
|
assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
|
||||||
if (isSingleWord())
|
if (isSingleWord())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user