LLVM: lib/Analysis/ModuleSummaryAnalysis.cpp File Reference (original) (raw)
Go to the source code of this file.
Namespaces | |
---|---|
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
Macros | |
---|---|
#define | DEBUG_TYPE "module-summary-analysis" |
Variables | |
---|---|
FunctionSummary::ForceSummaryHotnessType | llvm::ForceSummaryEdgesCold |
static 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."))) |
static cl::opt< std::string > | ModuleSummaryDotFile ("module-summary-dot-file", cl::Hidden, cl::value_desc("filename"), cl::desc("File to emit dot graph of new summary into")) |
static cl::opt< bool > | EnableMemProfIndirectCallSupport ("enable-memprof-indirect-call-support", cl::init(false), cl::Hidden, cl::desc("Enable MemProf support for summarizing and cloning indirect calls")) |
cl::opt< bool > | ScalePartialSampleProfileWorkingSetSize |
cl::opt< unsigned > | MaxNumVTableAnnotations |
cl::opt< bool > | MemProfReportHintedSizes |
module summary | analysis |
module summary Module Summary | Analysis |
module summary Module Summary | false |
◆ DEBUG_TYPE
#define DEBUG_TYPE "module-summary-analysis"
◆ addIntrinsicToSummary()
static void addIntrinsicToSummary ( const CallInst * CI, SetVector< GlobalValue::GUID, std::vector< GlobalValue::GUID > > & TypeTests, SetVector< FunctionSummary::VFuncId, std::vector< FunctionSummary::VFuncId > > & TypeTestAssumeVCalls, SetVector< FunctionSummary::VFuncId, std::vector< FunctionSummary::VFuncId > > & TypeCheckedLoadVCalls, SetVector< FunctionSummary::ConstVCall, std::vector< FunctionSummary::ConstVCall > > & TypeTestAssumeConstVCalls, SetVector< FunctionSummary::ConstVCall, std::vector< FunctionSummary::ConstVCall > > & TypeCheckedLoadConstVCalls, DominatorTree & DT ) | static |
---|
If this intrinsic call requires that we add information to the function summary, do so via the non-constant reference arguments.
Definition at line 204 of file ModuleSummaryAnalysis.cpp.
References addVCallToSet(), llvm::any_of(), llvm::findDevirtualizableCallsForTypeCheckedLoad(), llvm::findDevirtualizableCallsForTypeTest(), llvm::CallBase::getArgOperand(), llvm::CallBase::getCalledFunction(), llvm::GlobalValue::getGUID(), llvm::Function::getIntrinsicID(), llvm::Guid, and llvm::Value::uses().
Referenced by computeFunctionSummary().
◆ addVCallToSet()
◆ computeAliasSummary()
◆ computeFunctionSummary()
Definition at line 302 of file ModuleSummaryAnalysis.cpp.
References addIntrinsicToSummary(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), BBFreq, llvm::memprof::CallStack< NodeT, IteratorT >::beginAfterSharedPrefix(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), llvm::SmallVectorBase< Size_T >::empty(), llvm::memprof::CallStack< NodeT, IteratorT >::empty(), EnableMemProfIndirectCallSupport, llvm::memprof::CallStack< NodeT, IteratorT >::end(), llvm::SmallVectorImpl< T >::erase(), F, findRefEdges(), llvm::ForceSummaryEdgesCold, llvm::FunctionSummary::FSHT_All, llvm::FunctionSummary::FSHT_None, llvm::BlockAddress::get(), getHotness(), llvm::memprof::getMIBAllocType(), llvm::memprof::getMIBStackNode(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::ProfileSummaryInfo::getProfileCount(), llvm::ICallPromotionAnalysis::getPromotionCandidatesForInstruction(), llvm::ProfileSummaryInfo::hasPartialSampleProfile(), I, llvm::SetVector< T, Vector, Set, N >::insert(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert(), isNonRenamableLocal(), isNonVolatileLoad(), isNonVolatileStore(), llvm::mayHaveMemprofSummary(), MemProfReportHintedSizes, mustBeUnreachableFunction(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SetVector< T, Vector, Set, N >::remove(), ScalePartialSampleProfileWorkingSetSize, llvm::SetVector< T, Vector, Set, N >::size(), llvm::SmallVectorBase< Size_T >::size(), llvm::MapVector< KeyT, ValueT, MapType, VectorType >::takeVector(), llvm::SetVector< T, Vector, Set, N >::takeVector(), and users.
Referenced by llvm::buildModuleSummaryIndex().
◆ computeVariableSummary()
Definition at line 833 of file ModuleSummaryAnalysis.cpp.
References computeVTableFuncs(), llvm::GlobalValueSummary::Definition, findRefEdges(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), isNonRenamableLocal(), recordTypeIdCompatibleVtableReferences(), and llvm::SetVector< T, Vector, Set, N >::takeVector().
Referenced by llvm::buildModuleSummaryIndex().
◆ computeVTableFuncs()
◆ findFuncPointers()
Find function pointers referenced within the given vtable initializer (or subset of an initializer) I
.
The starting offset of I
within the vtable initializer is StartingOffset
. Any discovered function pointers are added to VTableFuncs
along with their cumulative offset within the initializer.
Definition at line 720 of file ModuleSummaryAnalysis.cpp.
References A, assert(), llvm::CallingConv::C, DL, llvm::StructType::elements(), llvm::enumerate(), findFuncPointers(), llvm::StructLayout::getElementContainingOffset(), llvm::StructLayout::getElementOffset(), llvm::GlobalVariable::getInitializer(), llvm::Value::getType(), I, llvm::IsConstantOffsetFromGlobal(), LHS, llvm::Offset, and RHS.
Referenced by computeVTableFuncs(), and findFuncPointers().
◆ findRefEdges()
◆ getHotness()
◆ INITIALIZE_PASS()
◆ INITIALIZE_PASS_BEGIN()
◆ isNonRenamableLocal()
◆ isNonVolatileLoad()
◆ isNonVolatileStore()
◆ mustBeUnreachableFunction()
◆ recordTypeIdCompatibleVtableReferences()
◆ setLiveRoot()
◆ Analysis
module summary Module Summary Analysis
◆ EnableMemProfIndirectCallSupport
cl::opt< bool > EnableMemProfIndirectCallSupport("enable-memprof-indirect-call-support", cl::init(false), cl::Hidden, cl::desc( "Enable MemProf support for summarizing and cloning indirect calls")) ( "enable-memprof-indirect-call-support" , cl::init(false) , cl::Hidden , cl::desc( "Enable MemProf support for summarizing and cloning indirect calls") ) | static |
---|
◆ false
module summary Module Summary false
◆ FSEC
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."))) ( "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.")) ) | static |
---|
◆ MaxNumVTableAnnotations
◆ MemProfReportHintedSizes
◆ ModuleSummaryDotFile
cl::opt< std::string > ModuleSummaryDotFile("module-summary-dot-file", cl::Hidden, cl::value_desc("filename"), cl::desc("File to emit dot graph of new summary into")) ( "module-summary-dot-file" , cl::Hidden , cl::value_desc("filename") , cl::desc("File to emit dot graph of new summary into") ) | static |
---|