41 if (AllowNullOp && !Op)
45 if (
auto *V = dyn_cast<ValueAsMetadata>(MD))
55 return Fragment->SizeInBits;
72 const char *
const *Low = NameTable.
begin();
73 const char *
const *
High = NameTable.
end();
74 const char *
const *LastLow = Low;
75 while (CmpEnd < Name.
size() && High - Low > 0) {
77 CmpEnd = Name.
find(
'.', CmpStart + 1);
79 auto Cmp = [CmpStart, CmpEnd](
const char *LHS,
const char *RHS) {
80 return strncmp(LHS + CmpStart, RHS + CmpStart, CmpEnd - CmpStart) < 0;
83 std::tie(Low, High) = std::equal_range(Low, High, Name.
data(), Cmp);
88 if (LastLow == NameTable.
end())
91 if (Name == NameFound ||
93 return LastLow - NameTable.
begin();
111 if (!MD || !isa<MDString>(MD))
113 StringRef RoundingArg = cast<MDString>(MD)->getString();
118 .Case(
"round.dynamic", rmDynamic)
119 .
Case(
"round.tonearest", rmToNearest)
120 .
Case(
"round.downward", rmDownward)
121 .
Case(
"round.upward", rmUpward)
122 .
Case(
"round.towardzero", rmTowardZero)
131 if (!MD || !isa<MDString>(MD))
133 StringRef ExceptionArg = cast<MDString>(MD)->getString();
135 .Case(
"fpexcept.ignore", ebIgnore)
136 .
Case(
"fpexcept.maytrap", ebMayTrap)
137 .
Case(
"fpexcept.strict", ebStrict)
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
static IntegerType * getInt64Ty(LLVMContext &C)
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).
Optional< uint64_t > getFragmentSizeInBits() const
Get the size (in bits) of the variable, or fragment of the variable that is described.
Value * getArgOperand(unsigned i) const
amdgpu Simplify well known AMD library false Value Value const Twine & Name
LLVMContext & getContext() const
Get the global data context.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE R Default(T Value)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
RoundingMode getRoundingMode() const
MDNode * getMetadata(unsigned KindID) const
Get the metadata of given kind attached to this Instruction.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
ExceptionBehavior getExceptionBehavior() const
A switch()-like statement whose cases are string literals.
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...
DIExpression * getExpression() const
static bool classof(const IntrinsicInst *I)
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
unsigned getNumOperands() const
Optional< uint64_t > getSizeInBits() const
Determines the size of the variable's type.
Module.h This file contains the declarations for the Module class.
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.
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
LLVM_ATTRIBUTE_ALWAYS_INLINE StringSwitch & Case(StringLiteral S, T Value)
Value * getVariableLocation(bool AllowNullOp=true) const
Get the location corresponding to the variable referenced by the debug info intrinsic.
unsigned getNumArgOperands() 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)
DILocalVariable * getVariable() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
StringRef - Represent a constant reference to a string, i.e.
int lookupLLVMIntrinsicByName(ArrayRef< const char *> NameTable, StringRef Name)
Looks up Name in NameTable via binary search.
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.