Changeset View
Changeset View
Standalone View
Standalone View
include/llvm/IR/IntrinsicInst.h
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | public: | ||||
static inline bool classof(const IntrinsicInst *I) { | static inline bool classof(const IntrinsicInst *I) { | ||||
return I->getIntrinsicID() == Intrinsic::dbg_value; | return I->getIntrinsicID() == Intrinsic::dbg_value; | ||||
} | } | ||||
static inline bool classof(const Value *V) { | static inline bool classof(const Value *V) { | ||||
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V)); | return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V)); | ||||
} | } | ||||
}; | }; | ||||
/// This is the common base class for constrained floating point intrinsics. | |||||
class ConstrainedFPIntrinsic : public IntrinsicInst { | |||||
public: | |||||
enum RoundingMode { | |||||
rmDynamic, | |||||
rmToNearest, | |||||
rmDownward, | |||||
rmUpward, | |||||
rmTowardZero | |||||
}; | |||||
enum ExceptionBehavior { | |||||
ebIgnore, | |||||
ebMayTrap, | |||||
ebStrict | |||||
}; | |||||
RoundingMode getRoundingMode() const; | |||||
ExceptionBehavior getExceptionBehavior() const; | |||||
// Methods for support type inquiry through isa, cast, and dyn_cast: | |||||
static inline bool classof(const IntrinsicInst *I) { | |||||
switch (I->getIntrinsicID()) { | |||||
case Intrinsic::experimental_constrained_fadd: | |||||
case Intrinsic::experimental_constrained_fsub: | |||||
case Intrinsic::experimental_constrained_fmul: | |||||
case Intrinsic::experimental_constrained_fdiv: | |||||
case Intrinsic::experimental_constrained_frem: | |||||
return true; | |||||
default: return false; | |||||
} | |||||
} | |||||
static inline bool classof(const Value *V) { | |||||
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V)); | |||||
} | |||||
}; | |||||
/// This is the common base class for memset/memcpy/memmove. | /// This is the common base class for memset/memcpy/memmove. | ||||
class MemIntrinsic : public IntrinsicInst { | class MemIntrinsic : public IntrinsicInst { | ||||
public: | public: | ||||
Value *getRawDest() const { return const_cast<Value*>(getArgOperand(0)); } | Value *getRawDest() const { return const_cast<Value*>(getArgOperand(0)); } | ||||
const Use &getRawDestUse() const { return getArgOperandUse(0); } | const Use &getRawDestUse() const { return getArgOperandUse(0); } | ||||
Use &getRawDestUse() { return getArgOperandUse(0); } | Use &getRawDestUse() { return getArgOperandUse(0); } | ||||
Value *getLength() const { return const_cast<Value*>(getArgOperand(2)); } | Value *getLength() const { return const_cast<Value*>(getArgOperand(2)); } | ||||
▲ Show 20 Lines • Show All 262 Lines • Show Last 20 Lines |