92 #define DEBUG_TYPE "argpromotion" 94 STATISTIC(NumArgumentsPromoted,
"Number of pointer arguments promoted");
95 STATISTIC(NumAggregatesPromoted,
"Number of aggregate arguments promoted");
96 STATISTIC(NumByValArgsPromoted,
"Number of byval arguments promoted");
97 STATISTIC(NumArgumentsDead,
"Number of dead pointer args eliminated");
113 std::vector<Type *> Params;
115 using ScalarizeTable = std::set<std::pair<Type *, IndicesVector>>;
123 std::map<Argument *, ScalarizeTable> ScalarizedElements;
130 std::map<std::pair<Argument *, IndicesVector>,
LoadInst *> OriginalLoads;
142 if (ByValArgsToTransform.
count(&*
I)) {
144 Type *AgTy = cast<PointerType>(
I->getType())->getElementType();
149 ++NumByValArgsPromoted;
150 }
else if (!ArgsToPromote.
count(&*
I)) {
152 Params.push_back(
I->getType());
154 }
else if (
I->use_empty()) {
167 ScalarizeTable &ArgIndices = ScalarizedElements[&*
I];
168 for (
User *U :
I->users()) {
171 if (
LoadInst *L = dyn_cast<LoadInst>(UI))
172 SrcTy = L->getType();
174 SrcTy = cast<GetElementPtrInst>(UI)->getSourceElementType();
182 Indices.push_back(cast<ConstantInt>(*II)->getSExtValue());
184 if (Indices.size() == 1 && Indices.front() == 0)
186 ArgIndices.insert(std::make_pair(SrcTy, Indices));
188 if (
LoadInst *L = dyn_cast<LoadInst>(UI))
192 OrigLoad = cast<LoadInst>(UI->
user_back());
193 OriginalLoads[std::make_pair(&*
I, Indices)] = OrigLoad;
197 for (
const auto &ArgIndex : ArgIndices) {
200 cast<PointerType>(
I->getType()->getScalarType())->getElementType(),
206 if (ArgIndices.size() == 1 && ArgIndices.begin()->second.empty())
207 ++NumArgumentsPromoted;
209 ++NumAggregatesPromoted;
227 LLVM_DEBUG(
dbgs() <<
"ARG PROMOTION: Promoting to:" << *NF <<
"\n" 245 assert(CS.getCalledFunction() ==
F);
256 if (!ArgsToPromote.
count(&*
I) && !ByValArgsToTransform.
count(&*
I)) {
259 }
else if (ByValArgsToTransform.
count(&*
I)) {
261 Type *AgTy = cast<PointerType>(
I->getType())->getElementType();
271 Idx->getName() +
".val"));
274 }
else if (!
I->use_empty()) {
276 ScalarizeTable &ArgIndices = ScalarizedElements[&*
I];
279 std::vector<Value *> Ops;
280 for (
const auto &ArgIndex : ArgIndices) {
283 OriginalLoads[std::make_pair(&*
I, ArgIndex.second)];
284 if (!ArgIndex.second.empty()) {
285 Ops.reserve(ArgIndex.second.size());
287 for (
auto II : ArgIndex.second) {
295 if (
auto *ElPTy = dyn_cast<PointerType>(ElTy))
296 ElTy = ElPTy->getElementType();
298 ElTy = cast<CompositeType>(ElTy)->getTypeAtIndex(II);
320 for (; AI != CS.arg_end(); ++AI, ++ArgNo) {
326 CS.getOperandBundlesAsDefs(OpBundles);
329 if (
InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
331 Args, OpBundles,
"", Call);
334 NewCall->setTailCallKind(cast<CallInst>(Call)->getTailCallKind());
341 NewCS->setDebugLoc(Call->getDebugLoc());
343 if (Call->extractProfTotalWeight(W))
344 NewCS->setProfWeight(W);
350 (*ReplaceCallSite)(CS, NewCS);
352 if (!Call->use_empty()) {
354 NewCS->takeName(Call);
359 Call->eraseFromParent();
372 I2 = NF->arg_begin();
374 if (!ArgsToPromote.
count(&*
I) && !ByValArgsToTransform.
count(&*
I)) {
377 I->replaceAllUsesWith(&*I2);
383 if (ByValArgsToTransform.
count(&*
I)) {
389 Type *AgTy = cast<PointerType>(
I->getType())->getElementType();
400 AgTy, TheAlloca, Idxs, TheAlloca->
getName() +
"." +
Twine(i),
407 I->replaceAllUsesWith(TheAlloca);
427 ScalarizeTable &ArgIndices = ScalarizedElements[&*
I];
429 while (!
I->use_empty()) {
430 if (
LoadInst *LI = dyn_cast<LoadInst>(
I->user_back())) {
431 assert(ArgIndices.begin()->second.empty() &&
432 "Load element should sort to front!");
433 I2->setName(
I->getName() +
".val");
434 LI->replaceAllUsesWith(&*I2);
435 LI->eraseFromParent();
437 <<
"' in function '" << F->
getName() <<
"'\n");
444 Operands.push_back(cast<ConstantInt>(*II)->getSExtValue());
447 if (Operands.size() == 1 && Operands.front() == 0)
451 for (ScalarizeTable::iterator It = ArgIndices.begin();
452 It->second !=
Operands; ++It, ++TheArg) {
453 assert(It != ArgIndices.end() &&
"GEP not handled??");
456 std::string NewName =
I->getName();
457 for (
unsigned i = 0,
e = Operands.size(); i !=
e; ++i) {
458 NewName +=
"." +
utostr(Operands[i]);
464 <<
"' of function '" << NF->getName() <<
"'\n");
478 std::advance(I2, ArgIndices.size());
496 assert(CS &&
"Should only have direct calls!");
510 if (Prefix.size() > Longer.size())
512 return std::equal(Prefix.begin(), Prefix.end(), Longer.begin());
517 std::set<IndicesVector> &Set) {
518 std::set<IndicesVector>::iterator Low;
519 Low = Set.upper_bound(Indices);
520 if (Low != Set.begin())
527 return Low != Set.end() &&
isPrefix(*Low, Indices);
536 std::set<IndicesVector> &Safe) {
537 std::set<IndicesVector>::iterator Low;
538 Low = Safe.upper_bound(ToMark);
540 if (Low != Safe.begin())
545 if (Low != Safe.end()) {
555 Low = Safe.insert(Low, ToMark);
558 std::set<IndicesVector>::iterator End = Safe.end();
559 while (Low != End &&
isPrefix(ToMark, *Low)) {
560 std::set<IndicesVector>::iterator Remove = Low;
572 unsigned MaxElements) {
573 using GEPIndicesSet = std::set<IndicesVector>;
594 GEPIndicesSet SafeToUnconditionallyLoad;
598 GEPIndicesSet ToPromote;
609 Type *BaseTy = ByValTy;
610 auto UpdateBaseTy = [&](
Type *NewBaseTy) {
612 return BaseTy == NewBaseTy;
616 assert(SafeToUnconditionallyLoad.empty());
629 if (
LoadInst *LI = dyn_cast<LoadInst>(&
I)) {
630 Value *V = LI->getPointerOperand();
632 V =
GEP->getPointerOperand();
635 Indices.reserve(
GEP->getNumIndices());
639 Indices.push_back(CI->getSExtValue());
645 if (!UpdateBaseTy(
GEP->getSourceElementType()))
652 }
else if (V == Arg) {
656 if (BaseTy && LI->getType() != BaseTy)
659 BaseTy = LI->getType();
668 User *UR = U.getUser();
670 if (
LoadInst *LI = dyn_cast<LoadInst>(UR)) {
676 Operands.push_back(0);
678 if (!UpdateBaseTy(LI->getType()))
681 if (
GEP->use_empty()) {
684 GEP->eraseFromParent();
691 if (!UpdateBaseTy(
GEP->getSourceElementType()))
698 Operands.push_back(
C->getSExtValue());
703 for (
User *GEPU :
GEP->users())
704 if (
LoadInst *LI = dyn_cast<LoadInst>(GEPU)) {
719 if (!
prefixIn(Operands, SafeToUnconditionallyLoad))
725 if (ToPromote.find(Operands) == ToPromote.end()) {
726 if (MaxElements > 0 && ToPromote.size() == MaxElements) {
729 <<
"' because it would require adding more " 730 <<
"than " << MaxElements
731 <<
" arguments to the function.\n");
736 ToPromote.insert(std::move(Operands));
788 if (!isa<CompositeType>(type))
796 StructType *StructTy = cast<StructType>(type);
798 uint64_t StartPos = 0;
803 if (StartPos != Layout->getElementOffsetInBits(i))
826 while (!WorkList.
empty()) {
829 if (isa<GetElementPtrInst>(V) || isa<PHINode>(V)) {
830 if (PtrValues.insert(V).second)
834 }
else if (!isa<LoadInst>(V)) {
841 if (PtrValues.count(
Store->getValueOperand()))
851 for (
const Use &U : F.
uses()) {
853 const Function *Caller = CS.getCaller();
868 unsigned MaxElements,
898 if (
I.getType()->isPointerTy())
900 if (PointerArgs.
empty())
906 bool isSelfRecursive =
false;
910 if (CS.getInstruction() ==
nullptr || !CS.isCallee(&U))
914 if (CS.isMustTailCall())
917 if (CS.getInstruction()->getParent()->getParent() ==
F)
918 isSelfRecursive =
true;
924 if (BB.getTerminatingMustTailCall())
927 const DataLayout &DL = F->getParent()->getDataLayout();
935 for (
Argument *PtrArg : PointerArgs) {
936 Type *AgTy = cast<PointerType>(PtrArg->getType())->getElementType();
940 if (PtrArg->hasStructRetAttr()) {
941 unsigned ArgNo = PtrArg->getArgNo();
942 F->removeParamAttr(ArgNo, Attribute::StructRet);
954 bool isSafeToPromote =
955 PtrArg->hasByValAttr() &&
957 if (isSafeToPromote) {
958 if (
StructType *STy = dyn_cast<StructType>(AgTy)) {
959 if (MaxElements > 0 && STy->getNumElements() > MaxElements) {
962 <<
"' because it would require adding more" 963 <<
" than " << MaxElements
964 <<
" arguments to the function.\n");
969 bool AllSimple =
true;
970 for (
const auto *EltTy : STy->elements()) {
971 if (!EltTy->isSingleValueType()) {
981 ByValArgsToTransform.
insert(PtrArg);
989 if (isSelfRecursive) {
990 if (
StructType *STy = dyn_cast<StructType>(AgTy)) {
991 bool RecursiveType =
false;
992 for (
const auto *EltTy : STy->elements()) {
993 if (EltTy == PtrArg->getType()) {
994 RecursiveType =
true;
1005 PtrArg->hasByValAttr() ? PtrArg->getParamByValType() :
nullptr;
1007 ArgsToPromote.
insert(PtrArg);
1011 if (ArgsToPromote.
empty() && ByValArgsToTransform.
empty())
1015 ByValArgsToTransform))
1018 return doPromotion(F, ArgsToPromote, ByValArgsToTransform, ReplaceCallSite);
1025 bool Changed =
false, LocalChange;
1029 LocalChange =
false;
1039 assert(&F == &OldF &&
"Called with an unexpected function!");
1055 C.getOuterRefSCC().replaceNodeFunction(
N, *NewF);
1059 Changed |= LocalChange;
1060 }
while (LocalChange);
1075 explicit ArgPromotion(
unsigned MaxElements = 3)
1093 bool doInitialization(
CallGraph &CG)
override;
1096 unsigned MaxElements;
1104 "Promote 'by reference' arguments to scalars",
false,
1111 "Promote 'by reference' arguments to
scalars",
false, false)
1114 return new ArgPromotion(MaxElements);
1123 CallGraph &CG = getAnalysis<CallGraphWrapperPass>().getCallGraph();
1127 bool Changed =
false, LocalChange;
1131 LocalChange =
false;
1144 *cast<CallBase>(NewCS.getInstruction()),
1149 getAnalysis<TargetTransformInfoWrapperPass>().getTTI(*OldF);
1151 {ReplaceCallSite}, TTI)) {
1157 if (OldNode->getNumReferences() == 0)
1163 SCC.ReplaceNode(OldNode, NewNode);
1167 Changed |= LocalChange;
1168 }
while (LocalChange);
1173 bool ArgPromotion::doInitialization(
CallGraph &CG) {
Pass interface - Implemented by all 'passes'.
const Function & getFunction() const
bool isVarArg() const
isVarArg - Return true if this function takes a variable number of arguments.
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
A parsed version of the target data layout string in and methods for querying it. ...
iterator_range< use_iterator > uses()
bool hasLocalLinkage() const
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This class represents an incoming formal argument to a Function.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
This class represents lattice values for constants.
Type * getElementType(unsigned N) const
void setAttributes(AttributeList PAL)
Set the parameter attributes of the call.
LoadInst * CreateLoad(Type *Ty, Value *Ptr, const char *Name)
Provided to resolve 'CreateLoad(Ty, Ptr, "...")' correctly, instead of converting the string to 'bool...
bool isSized(SmallPtrSetImpl< Type *> *Visited=nullptr) const
Return true if it makes sense to take the size of this type.
static CallInst * Create(FunctionType *Ty, Value *F, const Twine &NameStr="", Instruction *InsertBefore=nullptr)
unsigned getNumElements() const
Random access to the elements.
const StructLayout * getStructLayout(StructType *Ty) const
Returns a StructLayout object, indicating the alignment of the struct, its size, and the offsets of i...
void push_back(const T &Elt)
Implements a lazy call graph analysis and related passes for the new pass manager.
static GetElementPtrInst * Create(Type *PointeeType, Value *Ptr, ArrayRef< Value *> IdxList, const Twine &NameStr="", Instruction *InsertBefore=nullptr)
This class represents a function call, abstracting a target machine's calling convention.
An immutable pass that tracks lazily created AssumptionCache objects.
virtual bool doInitialization(CallGraph &CG)
doInitialization - This method is called before the SCC's of the program has been processed...
The two locations do not alias at all.
An efficient, type-erasing, non-owning reference to a callable.
Analysis pass providing the TargetTransformInfo.
void setCallingConv(CallingConv::ID CC)
Set the calling convention of the call.
Externally visible function.
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
iterator_range< idf_ext_iterator< T, SetTy > > inverse_depth_first_ext(const T &G, SetTy &S)
STATISTIC(NumFunctions, "Total number of functions")
An instruction for reading from memory.
static IntegerType * getInt64Ty(LLVMContext &C)
TypeSize getTypeSizeInBits(Type *Ty) const
Size examples:
This defines the Use class.
bool hasByValAttr() const
Return true if this argument has the byval attribute.
A proxy from a FunctionAnalysisManager to an SCC.
A node in the call graph for a module.
void getAnalysisUsage(AnalysisUsage &Info) const override
getAnalysisUsage - For this class, we declare that we require and preserve the call graph...
Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager...
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
unsigned getAllocaAddrSpace() const
AnalysisUsage & addRequired()
Used to lazily calculate structure layout information for a target machine, based on the DataLayout s...
#define INITIALIZE_PASS_DEPENDENCY(depName)
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Class to represent struct types.
A Use represents the edge between a Value definition and its users.
void initializeArgPromotionPass(PassRegistry &)
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
This class is a functor to be used in legacy module or SCC passes for computing AA results for a func...
This file contains the simple types necessary to represent the attributes associated with functions a...
Pass * createArgumentPromotionPass(unsigned maxElements=3)
createArgumentPromotionPass - This pass promotes "by reference" arguments to be passed by value if th...
Function * removeFunctionFromModule(CallGraphNode *CGN)
Unlink the function from this module, returning it.
AttributeSet getRetAttributes() const
The attributes for the ret value are returned.
void setName(const Twine &Name)
Change the name of the value.
mir Rename Register Operands
InstrTy * getInstruction() const
unsigned getNumIndices() const
This file provides interfaces used to build and manipulate a call graph, which is a very useful tool ...
Class to represent function types.
Type * getType() const
All values are typed, get the type of this value.
AttributeSet getParamAttributes(unsigned ArgNo) const
The attributes for the argument or parameter at the given index are returned.
A lazily constructed view of the call graph of a module.
AttributeList getAttributes() const
Return the attribute list for this Function.
An instruction for storing to memory.
LinkageTypes getLinkage() const
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
void takeName(Value *V)
Transfer the name from V to this value.
virtual bool doInitialization(Module &)
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
AttributeSet getAttributes(unsigned Index) const
The attributes for the specified index are returned.
an instruction for type-safe pointer arithmetic to access elements of arrays and structs ...
bool hasAttrSomewhere(Attribute::AttrKind Kind, unsigned *Index=nullptr) const
Return true if the specified attribute is set for at least one parameter or for the return value...
void getAAMetadata(AAMDNodes &N, bool Merge=false) const
Fills the AAMDNodes structure with AA metadata from this instruction.
static MemoryLocation get(const LoadInst *LI)
Return a location with information about the memory reference by the given instruction.
void setSubprogram(DISubprogram *SP)
Set the attached subprogram.
static Function * Create(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace, const Twine &N="", Module *M=nullptr)
A set of analyses that are preserved following a run of a transformation pass.
The ModulePass which wraps up a CallGraph and the logic to build it.
void setAAMetadata(const AAMDNodes &N)
Sets the metadata on this instruction from the AAMDNodes structure.
LLVM Basic Block Representation.
const FunctionListType & getFunctionList() const
Get the Module's list of functions (constant).
The instances of the Type class are immutable: once they are created, they are never changed...
DISubprogram * getSubprogram() const
Get the attached subprogram.
bool canInstructionRangeModRef(const Instruction &I1, const Instruction &I2, const MemoryLocation &Loc, const ModRefInfo Mode)
Check if it is possible for the execution of the specified instructions to mod(according to the mode)...
void stealCalledFunctionsFrom(CallGraphNode *N)
Moves all the callee information from N to this node.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
LLVM_NODISCARD bool empty() const
void copyAttributesFrom(const Function *Src)
copyAttributesFrom - copy all additional attributes (those not needed to create a Function) from the ...
void removeParamAttr(unsigned ArgNo, Attribute::AttrKind Kind)
This file contains the declarations for the subclasses of Constant, which represent the different fla...
const Instruction & front() const
A manager for alias analyses.
ValTy * getArgument(unsigned ArgNo) const
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
element_iterator element_end() const
Represent the analysis usage information of a pass.
unsigned getAddressSpace() const
StringRef getName() const
Return the name for this struct type if it has an identity.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
static FunctionType * get(Type *Result, ArrayRef< Type *> Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
A node in the call graph.
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
self_iterator getIterator()
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
void setTailCall(bool isTC=true)
static UndefValue * get(Type *T)
Static factory methods - Return an 'undef' object of the specified type.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
void getAAResultsAnalysisUsage(AnalysisUsage &AU)
A helper for the legacy pass manager to populate AU to add uses to make sure the analyses required by...
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
Value * CreateGEP(Value *Ptr, ArrayRef< Value *> IdxList, const Twine &Name="")
Representation for a specific memory location.
This is the superclass of the array and vector type classes.
unsigned getNumOperands() const
This is the shared class of boolean and integer constants.
bool isDereferenceablePointer(const Value *V, Type *Ty, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr)
Return true if this is always a dereferenceable pointer.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
Instruction * user_back()
Specialize the methods defined in Value, as we know that an instruction can only be used by other ins...
A collection of metadata nodes that might be associated with a memory access used by the alias-analys...
Type * getReturnType() const
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.
pred_range predecessors(BasicBlock *BB)
std::string utostr(uint64_t X, bool isNeg=false)
User::op_iterator arg_iterator
The type of iterator to use when looping over actual arguments at this call site. ...
void setLinkage(LinkageTypes LT)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
The access may modify the value stored in memory.
FunctionType * getFunctionType() const
Returns the FunctionType for me.
amdgpu Simplify well known AMD library false FunctionCallee Callee
unsigned getArgNo() const
Return the index of this formal argument in its containing function.
iterator_range< user_iterator > users()
iterator insert(iterator I, T &&Elt)
element_iterator element_begin() const
This file provides various utilities for inspecting and working with the control flow graph in LLVM I...
The basic data container for the call graph of a Module of IR.
iterator insert(iterator where, pointer New)
const Function * getParent() const
unsigned getAlignment() const
Return the alignment of the access that is being performed.
static Type * getIndexedType(Type *Ty, ArrayRef< Value *> IdxList)
Returns the type of the element that would be loaded with a load instruction with the specified param...
static IntegerType * getInt32Ty(LLVMContext &C)
LLVM_NODISCARD bool empty() const
static InvokeInst * Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef< Value *> Args, const Twine &NameStr, Instruction *InsertBefore=nullptr)
This file provides utility analysis objects describing memory locations.
void replaceCallEdge(CallBase &Call, CallBase &NewCall, CallGraphNode *NewNode)
Replaces the edge in the node for the specified call site with a new one.
StringRef getName() const
Return a constant reference to the value's name.
const Function * getParent() const
Return the enclosing method, or null if none.
void setAlignment(MaybeAlign Alignment)
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
const BasicBlockListType & getBasicBlockList() const
Get the underlying elements of the Function...
void eraseFromParent()
eraseFromParent - This method unlinks 'this' from the containing module and deletes it...
TypeSize getTypeAllocSizeInBits(Type *Ty) const
Returns the offset in bits between successive objects of the specified type, including alignment padd...
This header provides classes for managing passes over SCCs of the call graph.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
user_iterator user_begin()
const BasicBlock & front() const
Module * getParent()
Get the module that this global value is contained inside of...
LLVM Value Representation.
An SCC of the call graph.
CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on.
CallGraphNode * getOrInsertFunction(const Function *F)
Similar to operator[], but this will insert a new CallGraphNode for F if one does not already exist...
AttributeSet getFnAttributes() const
The function attributes are returned.
This is the interface for LLVM's primary stateless and local alias analysis.
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.
bool canBasicBlockModify(const BasicBlock &BB, const MemoryLocation &Loc)
Check if it is possible for execution of the specified basic block to modify the location Loc...
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
static AttributeList get(LLVMContext &C, ArrayRef< std::pair< unsigned, Attribute >> Attrs)
Create an AttributeList with the specified parameters in it.
iterator_range< arg_iterator > args()
bool isStructTy() const
True if this is an instance of StructType.
const BasicBlock * getParent() const
an instruction to allocate memory on the stack