38 if (AllowNullOp && !Op)
42 if (
auto *V = dyn_cast<ValueAsMetadata>(MD))
63 const char *
const *Low = NameTable.
begin();
64 const char *
const *
High = NameTable.
end();
65 const char *
const *LastLow = Low;
66 while (CmpEnd < Name.
size() && High - Low > 0) {
68 CmpEnd = Name.
find(
'.', CmpStart + 1);
70 auto Cmp = [CmpStart, CmpEnd](
const char *LHS,
const char *RHS) {
71 return strncmp(LHS + CmpStart, RHS + CmpStart, CmpEnd - CmpStart) < 0;
74 std::tie(Low, High) = std::equal_range(Low, High, Name.
data(), Cmp);
79 if (LastLow == NameTable.
end())
82 if (Name == NameFound ||
84 return LastLow - NameTable.
begin();
A Module instance is used to store all the information related to an LLVM module. ...
unsigned getNumOperands() const
static IntegerType * getInt64Ty(LLVMContext &C)
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.
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)
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.
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.