60 #define DEBUG_TYPE "module-summary-analysis" 68 cl::desc(
"Force all edges in the function summary to cold"),
71 "all-non-critical",
"All non-critical edges."),
77 cl::desc(
"File to emit dot graph of new summary into."));
92 bool HasBlockAddress =
false;
96 while (!Worklist.
empty()) {
99 if (!Visited.
insert(U).second)
104 for (
const auto &OI : U->
operands()) {
108 if (isa<BlockAddress>(Operand)) {
109 HasBlockAddress =
true;
112 if (
auto *GV = dyn_cast<GlobalValue>(Operand)) {
123 return HasBlockAddress;
146 std::vector<uint64_t>
Args;
150 if (!CI || CI->getBitWidth() > 64) {
154 Args.push_back(CI->getZExtValue());
156 ConstVCalls.
insert({{Guid, Call.
Offset}, std::move(Args)});
169 case Intrinsic::type_test: {
170 auto *TypeMDVal = cast<MetadataAsValue>(CI->
getArgOperand(1));
184 Function *
F = AssumeCI->getCalledFunction();
187 if (HasNonAssumeUses)
193 for (
auto &Call : DevirtCalls)
195 TypeTestAssumeConstVCalls);
200 case Intrinsic::type_checked_load: {
201 auto *TypeMDVal = cast<MetadataAsValue>(CI->
getArgOperand(2));
210 bool HasNonCallUses =
false;
212 HasNonCallUses, CI, DT);
217 for (
auto &Call : DevirtCalls)
219 TypeCheckedLoadConstVCalls);
229 if (
const auto *LI = dyn_cast<LoadInst>(I))
230 return !LI->isVolatile();
236 if (
const auto *
SI = dyn_cast<StoreInst>(I))
237 return !
SI->isVolatile();
245 bool HasLocalsInUsedOrAsm,
252 unsigned NumInsts = 0;
259 TypeCheckedLoadVCalls;
261 TypeCheckedLoadConstVCalls;
268 std::vector<const Instruction *> NonVolatileLoads;
269 std::vector<const Instruction *> NonVolatileStores;
271 bool HasInlineAsmMaybeReferencingInternal =
false;
274 if (isa<DbgInfoIntrinsic>(
I))
285 NonVolatileLoads.push_back(&
I);
289 NonVolatileStores.push_back(&
I);
296 Value *Stored =
I.getOperand(0);
297 if (
auto *GV = dyn_cast<GlobalValue>(Stored))
301 else if (
auto *U = dyn_cast<User>(Stored))
317 if (HasLocalsInUsedOrAsm && CI && CI->isInlineAsm())
318 HasInlineAsmMaybeReferencingInternal =
true;
320 auto *CalledValue = CS.getCalledValue();
321 auto *CalledFunction = CS.getCalledFunction();
322 if (CalledValue && !CalledFunction) {
323 CalledValue = CalledValue->stripPointerCasts();
329 if (
auto *GA = dyn_cast<GlobalAlias>(CalledValue)) {
330 assert(!CalledFunction &&
"Expected null called function in callsite for alias");
335 if (CalledFunction) {
336 if (CI && CalledFunction->isIntrinsic()) {
338 CI, TypeTests, TypeTestAssumeVCalls, TypeCheckedLoadVCalls,
339 TypeTestAssumeConstVCalls, TypeCheckedLoadConstVCalls, DT);
343 assert(CalledFunction->hasName());
345 auto Hotness = ScaledCount ?
getHotness(ScaledCount.getValue(), PSI)
355 cast<GlobalValue>(CalledValue))];
362 ValueInfo.updateRelBlockFreq(BBFreq, EntryFreq);
366 if (CI && CI->isInlineAsm())
369 if (!CalledValue || isa<Constant>(CalledValue))
376 if (
auto *MD =
I.getMetadata(LLVMContext::MD_callees)) {
377 for (
auto &
Op : MD->operands()) {
386 auto CandidateProfileData =
388 &
I, NumVals, TotalCount, NumCandidates);
389 for (
auto &Candidate : CandidateProfileData)
391 .updateHotness(
getHotness(Candidate.Count, PSI));
395 std::vector<ValueInfo> Refs;
397 auto AddRefEdges = [&](
const std::vector<const Instruction *> &Instrs,
400 for (
const auto *
I : Instrs) {
409 AddRefEdges(NonVolatileLoads, LoadRefEdges, Visited);
421 AddRefEdges(NonVolatileStores, StoreRefEdges, StoreCache);
426 for (
auto &
VI : StoreRefEdges)
430 unsigned RefCnt = RefEdges.
size();
434 for (
auto &
VI : LoadRefEdges)
437 unsigned FirstWORef = RefEdges.
size();
438 for (
auto &
VI : StoreRefEdges)
442 for (; RefCnt < FirstWORef; ++RefCnt)
443 Refs[RefCnt].setReadOnly();
445 for (; RefCnt < Refs.size(); ++RefCnt)
446 Refs[RefCnt].setWriteOnly();
452 for (
auto &
I : F.getImportGUIDs())
459 bool NotEligibleForImport =
460 NonRenamableLocal || HasInlineAsmMaybeReferencingInternal;
462 false, F.isDSOLocal(),
463 F.hasLinkOnceODRLinkage() && F.hasGlobalUnnamedAddr());
465 F.hasFnAttribute(Attribute::ReadNone),
466 F.hasFnAttribute(Attribute::ReadOnly),
467 F.hasFnAttribute(Attribute::NoRecurse), F.returnDoesNotAlias(),
470 F.getAttributes().hasFnAttribute(Attribute::NoInline),
471 F.hasFnAttribute(Attribute::AlwaysInline)};
472 auto FuncSummary = std::make_unique<FunctionSummary>(
473 Flags, NumInsts, FunFlags, 0, std::move(Refs),
478 if (NonRenamableLocal)
479 CantBePromoted.
insert(F.getGUID());
496 if (Fn && Fn->getName() !=
"__cxa_pure_virtual")
497 VTableFuncs.push_back({Index.getOrInsertValueInfo(Fn), StartingOffset});
504 if (
auto *
C = dyn_cast<ConstantStruct>(I)) {
515 StartingOffset +
Offset, M, Index, VTableFuncs);
517 }
else if (
auto *
C = dyn_cast<ConstantArray>(I)) {
523 StartingOffset + i * EltSize, M, Index, VTableFuncs);
540 uint64_t PrevOffset = 0;
541 for (
auto &
P : VTableFuncs) {
545 assert(
P.VTableOffset >= PrevOffset);
546 PrevOffset =
P.VTableOffset;
561 cast<ConstantAsMetadata>(
Type->getOperand(0))->getValue())
564 if (
auto *TypeId = dyn_cast<MDString>(
TypeID))
577 bool HasBlockAddress =
findRefEdges(Index, &V, RefEdges, Visited);
589 if (!Types.
empty()) {
599 bool CanBeInternalized =
603 auto GVarSummary = std::make_unique<GlobalVarSummary>(Flags, VarFlags,
605 if (NonRenamableLocal)
608 GVarSummary->setNotEligibleToImport();
609 if (!VTableFuncs.empty())
610 GVarSummary->setVTableFuncs(VTableFuncs);
621 auto AS = std::make_unique<AliasSummary>(Flags);
623 auto AliaseeVI = Index.
getValueInfo(Aliasee->getGUID());
624 assert(AliaseeVI &&
"Alias expects aliasee summary to be available");
625 assert(AliaseeVI.getSummaryList().size() == 1 &&
626 "Expected a single entry per aliasee in per-module index");
627 AS->setAliasee(AliaseeVI, AliaseeVI.getSummaryList()[0].get());
628 if (NonRenamableLocal)
636 for (
auto &Summary :
VI.getSummaryList())
637 Summary->setLive(
true);
645 bool EnableSplitLTOUnit =
false;
646 if (
auto *MD = mdconst::extract_or_null<ConstantInt>(
648 EnableSplitLTOUnit = MD->getZExtValue();
663 for (
auto *V : Used) {
664 if (V->hasLocalLinkage()) {
666 CantBePromoted.
insert(V->getGUID());
670 bool HasLocalInlineAsmSymbol =
false;
687 HasLocalInlineAsmSymbol =
true;
699 if (
Function *F = dyn_cast<Function>(GV)) {
700 std::unique_ptr<FunctionSummary> Summary =
701 std::make_unique<FunctionSummary>(
719 std::unique_ptr<GlobalVarSummary> Summary =
720 std::make_unique<GlobalVarSummary>(
728 bool IsThinLTO =
true;
730 mdconst::extract_or_null<ConstantInt>(M.
getModuleFlag(
"ThinLTO")))
731 IsThinLTO = MD->getZExtValue();
741 std::unique_ptr<BlockFrequencyInfo> BFIPtr;
743 BFI = GetBFICallback(F);
747 BFIPtr = std::make_unique<BlockFrequencyInfo>(
F, BPI, LI);
752 !LocalsUsed.
empty() || HasLocalInlineAsmSymbol,
753 CantBePromoted, IsThinLTO);
760 if (
G.isDeclaration())
770 for (
auto *V : LocalsUsed) {
772 assert(Summary &&
"Missing summary for global value");
773 Summary->setNotEligibleToImport();
785 for (
auto &GlobalList : Index) {
787 if (GlobalList.second.SummaryList.empty())
790 assert(GlobalList.second.SummaryList.size() == 1 &&
791 "Expected module's index to have one summary per GUID");
792 auto &Summary = GlobalList.second.SummaryList[0];
794 Summary->setNotEligibleToImport();
798 bool AllRefsCanBeExternallyReferenced =
800 return !CantBePromoted.
count(
VI.getGUID());
802 if (!AllRefsCanBeExternallyReferenced) {
803 Summary->setNotEligibleToImport();
807 if (
auto *FuncSummary = dyn_cast<FunctionSummary>(Summary.get())) {
810 return !CantBePromoted.
count(Edge.first.getGUID());
812 if (!AllCallsCanBeExternallyReferenced)
813 Summary->setNotEligibleToImport();
823 Index.exportToDot(OSDot, {});
847 "Module Summary Analysis",
false,
true)
854 return new ModuleSummaryIndexWrapperPass();
863 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();
867 return &(this->getAnalysis<BlockFrequencyInfoWrapperPass>(
A parsed version of the target data layout string in and methods for querying it. ...
bool hasDLLExportStorageClass() const
iterator_range< use_iterator > uses()
bool hasLocalLinkage() const
static void computeVariableSummary(ModuleSummaryIndex &Index, const GlobalVariable &V, DenseSet< GlobalValue::GUID > &CantBePromoted, const Module &M, SmallVectorImpl< MDNode *> &Types)
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
const Constant * getInitializer() const
getInitializer - Return the initializer for this global variable.
uint64_t GUID
Declare a type to represent a global unique identifier for a global value.
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
size_type size() const
Determine the number of elements in the SetVector.
A Module instance is used to store all the information related to an LLVM module. ...
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
GlobalValueSummary * getGlobalValueSummary(const GlobalValue &GV, bool PerModuleIndex=true) const
Returns the first GlobalValueSummary for GV, asserting that there is only one if PerModuleIndex.
void findDevirtualizableCallsForTypeTest(SmallVectorImpl< DevirtCallSite > &DevirtCalls, SmallVectorImpl< CallInst *> &Assumes, const CallInst *CI, DominatorTree &DT)
Given a call to the intrinsic @llvm.type.test, find all devirtualizable call sites based on the call ...
CallSite CS
The call site itself.
This is the interface to build a ModuleSummaryIndex for a module.
Implements a dense probed hash-table based set.
bool isColdCount(uint64_t C)
Returns true if count C is considered cold.
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)
Analysis providing profile information.
This class represents a function call, abstracting a target machine's calling convention.
bool hasAvailableExternallyLinkage() const
static void findFuncPointers(const Constant *I, uint64_t StartingOffset, const Module &M, ModuleSummaryIndex &Index, VTableFuncList &VTableFuncs)
Find function pointers referenced within the given vtable initializer (or subset of an initializer) I...
uint64_t getFrequency() const
Returns the frequency as a fixpoint number scaled by the entry frequency.
uint64_t Offset
The offset from the address point to the virtual function.
bool isInterposable() const
Return true if this global's definition can be substituted with an arbitrary definition at link time...
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
This class implements a map that also provides access to all stored values in a deterministic order...
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly...
void initializeModuleSummaryIndexWrapperPassPass(PassRegistry &)
block Block Frequency true
VectorType::iterator erase(typename VectorType::iterator Iterator)
Remove the element given by Iterator.
This defines the Use class.
bool isHotCount(uint64_t C)
Returns true if count C is considered hot.
unsigned getElementContainingOffset(uint64_t Offset) const
Given a valid byte offset into the structure, returns the structure index that contains it...
ModuleSummaryIndex buildModuleSummaryIndex(const Module &M, std::function< BlockFrequencyInfo *(const Function &F)> GetBFICallback, ProfileSummaryInfo *PSI)
Direct function to compute a ModuleSummaryIndex from a given module.
Value * getArgOperand(unsigned i) const
void findDevirtualizableCallsForTypeCheckedLoad(SmallVectorImpl< DevirtCallSite > &DevirtCalls, SmallVectorImpl< Instruction *> &LoadedPtrs, SmallVectorImpl< Instruction *> &Preds, bool &HasNonCallUses, const CallInst *CI, DominatorTree &DT)
Given a call to the intrinsic @llvm.type.checked.load, find all devirtualizable call sites based on t...
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...
An analysis pass based on legacy pass manager to deliver ProfileSummaryInfo.
static AnalysisKey * ID()
Returns an opaque, unique ID for this analysis type.
Class to represent struct types.
A Use represents the edge between a Value definition and its users.
bool isConstant() const
If the value is a global constant, its value is immutable throughout the runtime execution of the pro...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
static void computeVTableFuncs(ModuleSummaryIndex &Index, const GlobalVariable &V, const Module &M, VTableFuncList &VTableFuncs)
MDNode * getMetadata(unsigned KindID) const
Get the current metadata attachments for the given kind, if any.
bool enableSplitLTOUnit() const
This file contains the simple types necessary to represent the attributes associated with functions a...
TypeID
Definitions of all of the base types for the Type system.
Legacy analysis pass which computes BlockFrequencyInfo.
uint64_t getNumElements() const
For scalable vectors, this will return the minimum number of elements in the vector.
bool remove(const value_type &X)
Remove an item from the set vector.
static void CollectAsmSymbols(const Module &M, function_ref< void(StringRef, object::BasicSymbolRef::Flags)> AsmSymbol)
Parse inline ASM and collect the symbols that are defined or referenced in the current module...
Type * getType() const
All values are typed, get the type of this value.
bool insert(const value_type &X)
Insert a new element into the SetVector.
std::pair< ValueInfo, CalleeInfo > EdgeTy
<CalleeValueInfo, CalleeInfo> call edge pair.
Class to represent array types.
GlobalValue * getNamedValue(StringRef Name) const
Return the global value in the module with the specified name, of arbitrary type. ...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
const GlobalObject * getBaseObject() const
LinkageTypes getLinkage() const
Type::subtype_iterator element_iterator
Class to hold module path string table and global value map, and encapsulate methods for operating on...
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
Value * getOperand(unsigned i) const
bool doFinalization(Module &M) override
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...
bool hasAppendingLinkage() const
static void computeAliasSummary(ModuleSummaryIndex &Index, const GlobalAlias &A, DenseSet< GlobalValue::GUID > &CantBePromoted)
ForceSummaryHotnessType
Types for -force-summary-edges-cold debugging option.
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
bool hasLinkOnceODRLinkage() const
initializer< Ty > init(const Ty &Val)
LLVM Basic Block Representation.
The instances of the Type class are immutable: once they are created, they are never changed...
A call site that could be devirtualized.
Metadata * getModuleFlag(StringRef Key) const
Return the corresponding value if Key appears in module flags, otherwise return null.
An analysis pass based on the new PM to deliver ProfileSummaryInfo.
This is an important base class in LLVM.
ValuesClass values(OptsTy... Options)
Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...
LLVM_NODISCARD bool empty() const
bool returnDoesNotAlias() const
Determine if the parameter or return value is marked with NoAlias attribute.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
bool isPointerTy() const
True if this is an instance of PointerType.
TypeSize getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
std::pair< iterator, bool > insert(const ValueT &V)
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.
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly...
INITIALIZE_PASS_BEGIN(ModuleSummaryIndexWrapperPass, "module-summary-analysis", "Module Summary Analysis", false, true) INITIALIZE_PASS_END(ModuleSummaryIndexWrapperPass
TypeIdCompatibleVtableInfo & getOrInsertTypeIdCompatibleVtableSummary(StringRef TypeId)
Return an existing or new TypeIdCompatibleVtableMap entry for TypeId.
static void addIntrinsicToSummary(const CallInst *CI, SetVector< GlobalValue::GUID > &TypeTests, SetVector< FunctionSummary::VFuncId > &TypeTestAssumeVCalls, SetVector< FunctionSummary::VFuncId > &TypeCheckedLoadVCalls, SetVector< FunctionSummary::ConstVCall > &TypeTestAssumeConstVCalls, SetVector< FunctionSummary::ConstVCall > &TypeCheckedLoadConstVCalls, DominatorTree &DT)
If this intrinsic call requires that we add information to the function summary, do so via the non-co...
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
bool hasProfileData(bool IncludeSynthetic=false) const
Return true if the function is annotated with profile data.
static GUID getGUID(StringRef GlobalName)
Return a 64-bit global unique ID constructed from global value name (i.e.
static void addVCallToSet(DevirtCallSite Call, GlobalValue::GUID Guid, SetVector< FunctionSummary::VFuncId > &VCalls, SetVector< FunctionSummary::ConstVCall > &ConstVCalls)
Determine whether this call has all constant integer arguments (excluding "this") and summarize it to...
const Constant * stripPointerCasts() const
Class to represent profile counts.
VectorType takeVector()
Clear the MapVector and return the underlying vector.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
Optional< uint64_t > getProfileCount(const Instruction *CallInst, BlockFrequencyInfo *BFI, bool AllowSynthetic=false)
Returns the profile count for CallInst.
Struct that holds a reference to a particular GUID in a global value summary.
uint64_t getEntryFreq() const
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
static bool isNonRenamableLocal(const GlobalValue &GV)
GlobalVariable * collectUsedGlobalVariables(const Module &M, SmallPtrSetImpl< GlobalValue *> &Set, bool CompilerUsed)
Given "llvm.used" or "llvm.compiler.used" as a global name, collect the initializer elements of that ...
Analysis pass which computes BlockFrequencyInfo.
Vector takeVector()
Clear the SetVector and return the underlying vector.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
This is the shared class of boolean and integer constants.
static bool findRefEdges(ModuleSummaryIndex &Index, const User *CurUser, SetVector< ValueInfo > &RefEdges, SmallPtrSet< const User *, 8 > &Visited)
cl::opt< std::string > ModuleSummaryDotFile("module-summary-dot-file", cl::init(""), cl::Hidden, cl::value_desc("filename"), cl::desc("File to emit dot graph of new summary into."))
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.
LLVM_NODISCARD T pop_back_val()
static void computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M, const Function &F, BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, DominatorTree &DT, bool HasLocalsInUsedOrAsm, DenseSet< GlobalValue::GUID > &CantBePromoted, bool IsThinLTO)
bool hasGlobalUnnamedAddr() const
Intrinsic::ID getIntrinsicID() const LLVM_READONLY
getIntrinsicID - This method returns the ID number of the specified function, or Intrinsic::not_intri...
BlockFrequency getBlockFreq(const BasicBlock *BB) const
getblockFreq - Return block frequency.
Result run(Module &M, ModuleAnalysisManager &AM)
amdgpu Simplify well known AMD library false FunctionCallee Callee
void setPreservesAll()
Set by analyses that do not transform their input at all.
GUID getGUID() const
Return a 64-bit global unique ID constructed from global value name (i.e.
ValueInfo getValueInfo(const GlobalValueSummaryMapTy::value_type &R) const
Return a ValueInfo for the index value_type (convenient when iterating index).
element_iterator element_begin() const
ValueInfo getOrInsertValueInfo(GlobalValue::GUID GUID)
Return a ValueInfo for GUID.
#define clEnumValN(ENUMVAL, FLAGNAME, DESC)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
Analysis providing branch probability information.
A raw_ostream that writes to a file descriptor.
uint64_t getElementOffset(unsigned Idx) const
LLVM_NODISCARD bool empty() const
void addGlobalValueSummary(const GlobalValue &GV, std::unique_ptr< GlobalValueSummary > Summary)
Add a global value summary for a value.
ModuleSummaryIndexWrapperPass()
Establish a view to a call site for examination.
Function * getCalledFunction() const
Returns the function called, or null if this is an indirect function invocation.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
Rename collisions when linking (static functions).
size_type count(const_arg_type_t< ValueT > V) const
Return 1 if the specified key is in the set, 0 otherwise.
Flags specific to function summaries.
static bool isNonVolatileLoad(const Instruction *I)
FunctionSummary::ForceSummaryHotnessType ForceSummaryEdgesCold
cl::opt< FunctionSummary::ForceSummaryHotnessType, true > FSEC("force-summary-edges-cold", cl::Hidden, cl::location(ForceSummaryEdgesCold), cl::desc("Force all edges in the function summary to cold"), cl::values(clEnumValN(FunctionSummary::FSHT_None, "none", "None."), clEnumValN(FunctionSummary::FSHT_AllNonCritical, "all-non-critical", "All non-critical edges."), clEnumValN(FunctionSummary::FSHT_All, "all", "All edges.")))
const std::string & getModuleInlineAsm() const
Get any module-scope inline assembly blocks.
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
bool isCallee(Value::const_user_iterator UI) const
Determine whether the passed iterator points to the callee operand's Use.
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ModulePass * createModuleSummaryIndexWrapperPass()
std::vector< VirtFuncOffset > VTableFuncList
List of functions referenced by a particular vtable definition.
LLVM Value Representation.
static bool isNonVolatileStore(const Instruction *I)
A vector that has set insertion semantics.
bool runOnModule(Module &M) override
runOnModule - Virtual method overriden by subclasses to process the module being operated on...
static void setLiveRoot(ModuleSummaryIndex &Index, StringRef Name)
Group flags (Linkage, NotEligibleToImport, etc.) as a bitfield.
Type * getElementType() const
print Print MemDeps of function
StringRef - Represent a constant reference to a string, i.e.
A container for analyses that lazily runs them and caches their results.
static void recordTypeIdCompatibleVtableReferences(ModuleSummaryIndex &Index, const GlobalVariable &V, SmallVectorImpl< MDNode *> &Types)
Record vtable definition V for each type metadata it references.
A special type used by analysis passes to provide an address that identifies that particular analysis...
LocationClass< Ty > location(Ty &L)
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
static CalleeInfo::HotnessType getHotness(uint64_t ProfileCount, ProfileSummaryInfo *PSI)
Legacy wrapper pass to provide the ModuleSummaryIndex object.
An analysis over an "outer" IR unit that provides access to an analysis manager over an "inner" IR un...