mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-06 05:29:55 +00:00
Round out the API for the new optimization flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82930 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
68b1bbbc55
commit
ae05e7d945
@ -311,17 +311,26 @@ public:
|
|||||||
/// setHasNoUnsignedWrap - Set or clear the nsw flag on this instruction,
|
/// setHasNoUnsignedWrap - Set or clear the nsw flag on this instruction,
|
||||||
/// which must be an operator which supports this flag. See LangRef.html
|
/// which must be an operator which supports this flag. See LangRef.html
|
||||||
/// for the meaning of this flag.
|
/// for the meaning of this flag.
|
||||||
void setHasNoUnsignedWrap(bool);
|
void setHasNoUnsignedWrap(bool b = true);
|
||||||
|
|
||||||
/// setHasNoSignedWrap - Set or clear the nsw flag on this instruction,
|
/// setHasNoSignedWrap - Set or clear the nsw flag on this instruction,
|
||||||
/// which must be an operator which supports this flag. See LangRef.html
|
/// which must be an operator which supports this flag. See LangRef.html
|
||||||
/// for the meaning of this flag.
|
/// for the meaning of this flag.
|
||||||
void setHasNoSignedWrap(bool);
|
void setHasNoSignedWrap(bool b = true);
|
||||||
|
|
||||||
/// setIsExact - Set or clear the exact flag on this instruction,
|
/// setIsExact - Set or clear the exact flag on this instruction,
|
||||||
/// which must be an operator which supports this flag. See LangRef.html
|
/// which must be an operator which supports this flag. See LangRef.html
|
||||||
/// for the meaning of this flag.
|
/// for the meaning of this flag.
|
||||||
void setIsExact(bool);
|
void setIsExact(bool b = true);
|
||||||
|
|
||||||
|
/// hasNoUnsignedWrap - Determine whether the no unsigned wrap flag is set.
|
||||||
|
bool hasNoUnsignedWrap() const;
|
||||||
|
|
||||||
|
/// hasNoSignedWrap - Determine whether the no signed wrap flag is set.
|
||||||
|
bool hasNoSignedWrap() const;
|
||||||
|
|
||||||
|
/// isExact - Determine whether the exact flag is set.
|
||||||
|
bool isExact() const;
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const BinaryOperator *) { return true; }
|
static inline bool classof(const BinaryOperator *) { return true; }
|
||||||
|
@ -604,7 +604,10 @@ public:
|
|||||||
|
|
||||||
/// setIsInBounds - Set or clear the inbounds flag on this GEP instruction.
|
/// setIsInBounds - Set or clear the inbounds flag on this GEP instruction.
|
||||||
/// See LangRef.html for the meaning of inbounds on a getelementptr.
|
/// See LangRef.html for the meaning of inbounds on a getelementptr.
|
||||||
void setIsInBounds(bool);
|
void setIsInBounds(bool b = true);
|
||||||
|
|
||||||
|
/// isInBounds - Determine whether the GEP has the inbounds flag.
|
||||||
|
bool isInBounds() const;
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const GetElementPtrInst *) { return true; }
|
static inline bool classof(const GetElementPtrInst *) { return true; }
|
||||||
|
@ -1282,6 +1282,10 @@ void GetElementPtrInst::setIsInBounds(bool B) {
|
|||||||
cast<GEPOperator>(this)->setIsInBounds(B);
|
cast<GEPOperator>(this)->setIsInBounds(B);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GetElementPtrInst::isInBounds() const {
|
||||||
|
return cast<GEPOperator>(this)->isInBounds();
|
||||||
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// ExtractElementInst Implementation
|
// ExtractElementInst Implementation
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@ -1838,6 +1842,18 @@ void BinaryOperator::setIsExact(bool b) {
|
|||||||
cast<SDivOperator>(this)->setIsExact(b);
|
cast<SDivOperator>(this)->setIsExact(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BinaryOperator::hasNoUnsignedWrap() const {
|
||||||
|
return cast<OverflowingBinaryOperator>(this)->hasNoUnsignedWrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BinaryOperator::hasNoSignedWrap() const {
|
||||||
|
return cast<OverflowingBinaryOperator>(this)->hasNoSignedWrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BinaryOperator::isExact() const {
|
||||||
|
return cast<SDivOperator>(this)->isExact();
|
||||||
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// CastInst Class
|
// CastInst Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
Loading…
Reference in New Issue
Block a user