39 if (AllowNullOp && !Op)
43 if (
auto *V = dyn_cast<ValueAsMetadata>(MD))
64 const char *
const *Low = NameTable.
begin();
65 const char *
const *
High = NameTable.
end();
66 const char *
const *LastLow = Low;
67 while (CmpEnd < Name.
size() && High - Low > 0) {
69 CmpEnd = Name.
find(
'.', CmpStart + 1);
71 auto Cmp = [CmpStart, CmpEnd](
const char *LHS,
const char *RHS) {
72 return strncmp(LHS + CmpStart, RHS + CmpStart, CmpEnd - CmpStart) < 0;
75 std::tie(Low, High) = std::equal_range(Low, High, Name.
data(), Cmp);
80 if (LastLow == NameTable.
end())
83 if (Name == NameFound ||
85 return LastLow - NameTable.
begin();
103 if (!MD || !isa<MDString>(MD))
105 StringRef RoundingArg = cast<MDString>(MD)->getString();
123 if (!MD || !isa<MDString>(MD))
125 StringRef ExceptionArg = cast<MDString>(MD)->getString();
137 case Intrinsic::experimental_constrained_sqrt:
138 case Intrinsic::experimental_constrained_sin:
139 case Intrinsic::experimental_constrained_cos:
140 case Intrinsic::experimental_constrained_exp:
141 case Intrinsic::experimental_constrained_exp2:
142 case Intrinsic::experimental_constrained_log:
143 case Intrinsic::experimental_constrained_log10:
144 case Intrinsic::experimental_constrained_log2:
145 case Intrinsic::experimental_constrained_rint:
146 case Intrinsic::experimental_constrained_nearbyint:
A Module instance is used to store all the information related to an LLVM module. ...
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
unsigned getNumOperands() const
static IntegerType * getInt64Ty(LLVMContext &C)
unsigned getNumArgOperands() const
Return the number of call arguments.
LLVM_ATTRIBUTE_ALWAYS_INLINE R Default(const T &Value) const
LLVM_ATTRIBUTE_ALWAYS_INLINE StringSwitch & Case(const char(&S)[N], const T &Value)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
A switch()-like statement whose cases are string literals.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t find(char C, size_t From=0) const
Search for the first character C in the string.
This is an important class for using LLVM in a threaded context.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static bool classof(const IntrinsicInst *I)
ExceptionBehavior getExceptionBehavior() const
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
Module.h This file contains the declarations for the Module class.
MDNode * getMetadata(unsigned KindID) const
Get the metadata of given kind attached to this Instruction.
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
Value * getArgOperand(unsigned i) const
getArgOperand/setArgOperand - Return/set the i-th call argument.
RoundingMode getRoundingMode() const
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
Value * getVariableLocation(bool AllowNullOp=true) const
Get the location corresponding to the variable referenced by the debug info intrinsic.
int lookupLLVMIntrinsicByName(ArrayRef< const char * > NameTable, StringRef Name)
Looks up Name in NameTable via binary search.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
StringRef - Represent a constant reference to a string, i.e.
LLVMContext & getContext() const
Get the global data context.