Changeset View
Changeset View
Standalone View
Standalone View
include/llvm/IR/IntrinsicInst.h
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | 109 | public: | |||
---|---|---|---|---|---|
132 | static inline bool classof(const IntrinsicInst *I) { | 132 | static inline bool classof(const IntrinsicInst *I) { | ||
133 | return I->getIntrinsicID() == Intrinsic::dbg_value; | 133 | return I->getIntrinsicID() == Intrinsic::dbg_value; | ||
134 | } | 134 | } | ||
135 | static inline bool classof(const Value *V) { | 135 | static inline bool classof(const Value *V) { | ||
136 | return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V)); | 136 | return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V)); | ||
137 | } | 137 | } | ||
138 | }; | 138 | }; | ||
139 | 139 | | |||
140 | /// This is the common base class for constrained floating point intrinsics. | ||||
141 | class ConstrainedFPIntrinsic : public IntrinsicInst { | ||||
142 | public: | ||||
143 | enum RoundingMode { | ||||
144 | rmDynamic, | ||||
145 | rmToNearest, | ||||
146 | rmDownward, | ||||
147 | rmUpward, | ||||
148 | rmTowardZero | ||||
149 | }; | ||||
150 | | ||||
151 | enum ExceptionBehavior { | ||||
152 | ebIgnore, | ||||
153 | ebMayTrap, | ||||
154 | ebStrict | ||||
155 | }; | ||||
156 | | ||||
157 | RoundingMode getRoundingMode() const; | ||||
158 | ExceptionBehavior getExceptionBehavior() const; | ||||
159 | | ||||
160 | // Methods for support type inquiry through isa, cast, and dyn_cast: | ||||
161 | static inline bool classof(const IntrinsicInst *I) { | ||||
162 | switch (I->getIntrinsicID()) { | ||||
163 | case Intrinsic::experimental_constrained_fadd: | ||||
164 | case Intrinsic::experimental_constrained_fsub: | ||||
165 | case Intrinsic::experimental_constrained_fmul: | ||||
166 | case Intrinsic::experimental_constrained_fdiv: | ||||
167 | case Intrinsic::experimental_constrained_frem: | ||||
168 | return true; | ||||
169 | default: return false; | ||||
170 | } | ||||
171 | } | ||||
172 | static inline bool classof(const Value *V) { | ||||
173 | return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V)); | ||||
174 | } | ||||
175 | }; | ||||
176 | | ||||
140 | /// This is the common base class for memset/memcpy/memmove. | 177 | /// This is the common base class for memset/memcpy/memmove. | ||
141 | class MemIntrinsic : public IntrinsicInst { | 178 | class MemIntrinsic : public IntrinsicInst { | ||
142 | public: | 179 | public: | ||
143 | Value *getRawDest() const { return const_cast<Value*>(getArgOperand(0)); } | 180 | Value *getRawDest() const { return const_cast<Value*>(getArgOperand(0)); } | ||
144 | const Use &getRawDestUse() const { return getArgOperandUse(0); } | 181 | const Use &getRawDestUse() const { return getArgOperandUse(0); } | ||
145 | Use &getRawDestUse() { return getArgOperandUse(0); } | 182 | Use &getRawDestUse() { return getArgOperandUse(0); } | ||
146 | 183 | | |||
147 | Value *getLength() const { return const_cast<Value*>(getArgOperand(2)); } | 184 | Value *getLength() const { return const_cast<Value*>(getArgOperand(2)); } | ||
▲ Show 20 Lines • Show All 262 Lines • Show Last 20 Lines |