LLVM
15.0.0git
|
#include "llvm/Analysis/InlineAdvisor.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/Analysis/ReplayInlineAdvisor.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Namespaces | |
llvm | |
This is an optimization pass for GlobalISel generic memory operations. | |
Macros | |
#define | DEBUG_TYPE "inline" |
Functions | |
STATISTIC (NumCallerCallersAnalyzed, "Number of caller-callers analyzed") | |
static llvm::Optional< llvm::InlineCost > | getDefaultInlineAdvice (CallBase &CB, FunctionAnalysisManager &FAM, const InlineParams &Params) |
static bool | shouldBeDeferred (Function *Caller, InlineCost IC, int &TotalSecondaryCost, function_ref< InlineCost(CallBase &CB)> GetInlineCost) |
Return true if inlining of CB can block the caller from being inlined which is proved to be more beneficial. More... | |
static raw_ostream & | llvm::operator<< (raw_ostream &R, const ore::NV &Arg) |
template<class RemarkT > | |
RemarkT & | llvm::operator<< (RemarkT &&R, const InlineCost &IC) |
Variables | |
static cl::opt< bool > | InlineRemarkAttribute ("inline-remark-attribute", cl::init(false), cl::Hidden, cl::desc("Enable adding inline-remark attribute to" " callsites processed by inliner but decided" " to be not inlined")) |
Flag to add inline messages as callsite attributes 'inline-remark'. More... | |
static cl::opt< bool > | EnableInlineDeferral ("inline-deferral", cl::init(false), cl::Hidden, cl::desc("Enable deferred inlining")) |
static cl::opt< int > | InlineDeferralScale ("inline-deferral-scale", cl::desc("Scale to limit the cost of inline deferral"), cl::init(2), cl::Hidden) |
cl::opt< InlinerFunctionImportStatsOpts > | InlinerFunctionImportStats |
#define DEBUG_TYPE "inline" |
Definition at line 30 of file InlineAdvisor.cpp.
|
static |
Definition at line 120 of file InlineAdvisor.cpp.
References llvm::InlineAdvice::Callee, llvm::InlineAdvice::Caller, DEBUG_TYPE, llvm::InlineParams::EnableDeferral, EnableInlineDeferral, F, FAM, llvm::CallBase::getCalledFunction(), llvm::CallBase::getCaller(), llvm::Function::getContext(), llvm::LLVMContext::getDiagHandlerPtr(), llvm::getInlineCost(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::Optional< T >::getValueOr(), llvm::DiagnosticHandler::isMissedOptRemarkEnabled(), llvm::InlineAdvice::ORE, and llvm::shouldInline().
Referenced by llvm::InlineAdvisorAnalysis::Result::tryCreate().
|
static |
Return true if inlining of CB can block the caller from being inlined which is proved to be more beneficial.
IC
is the estimated inline cost associated with callsite CB
. TotalSecondaryCost
will be set to the estimated cost of inlining the caller if CB
is suppressed for inlining.
Definition at line 230 of file InlineAdvisor.cpp.
References llvm::CallBase::getCalledFunction(), llvm::InlineCost::getCost(), llvm::InlineCost::getCostDelta(), InlineDeferralScale, llvm::InlineCost::isAlways(), and llvm::InlineConstants::LastCallToStaticBonus.
Referenced by llvm::shouldInline().
|
static |
Referenced by getDefaultInlineAdvice().
|
static |
Referenced by shouldBeDeferred().
|
static |
Flag to add inline messages as callsite attributes 'inline-remark'.
Referenced by llvm::setInlineRemark().
cl::opt<InlinerFunctionImportStatsOpts> InlinerFunctionImportStats |
Referenced by llvm::InlineAdvisor::InlineAdvisor(), and llvm::InlineAdvisor::~InlineAdvisor().