LLVM 20.0.0git
Macros | Typedefs | Enumerations | Functions | Variables
MLInlineAdvisor.cpp File Reference
#include "llvm/Analysis/MLInlineAdvisor.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/FunctionPropertiesAnalysis.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/InlineModelFeatureMaps.h"
#include "llvm/Analysis/InteractiveModelRunner.h"
#include "llvm/Analysis/LazyCallGraph.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/MLModelRunner.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/Analysis/ReleaseModeModelRunner.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/CommandLine.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "inline-ml"
 
#define POPULATE_NAMES(DTYPE, SHAPE, NAME, __)   TensorSpec::createSpec<DTYPE>(#NAME, SHAPE),
 

Typedefs

using CompiledModelType = NoopSavedModelImpl
 

Enumerations

enum class  SkipMLPolicyCriteria { Never , IfCallerIsNotCold }
 

Functions

CallBasegetInlinableCS (Instruction &I)
 

Variables

static cl::opt< std::string > InteractiveChannelBaseName ("inliner-interactive-channel-base", cl::Hidden, cl::desc("Base file path for the interactive mode. The incoming filename should " "have the name <inliner-interactive-channel-base>.in, while the " "outgoing name should be <inliner-interactive-channel-base>.out"))
 
static const std::string InclDefaultMsg
 
static cl::opt< boolInteractiveIncludeDefault ("inliner-interactive-include-default", cl::Hidden, cl::desc(InclDefaultMsg))
 
static cl::opt< SkipMLPolicyCriteriaSkipPolicy ("ml-inliner-skip-policy", cl::Hidden, cl::init(SkipMLPolicyCriteria::Never), cl::values(clEnumValN(SkipMLPolicyCriteria::Never, "never", "never"), clEnumValN(SkipMLPolicyCriteria::IfCallerIsNotCold, "if-caller-not-cold", "if the caller is not cold")))
 
static cl::opt< std::string > ModelSelector ("ml-inliner-model-selector", cl::Hidden, cl::init(""))
 
static cl::opt< float > SizeIncreaseThreshold ("ml-advisor-size-increase-threshold", cl::Hidden, cl::desc("Maximum factor by which expected native size may increase before " "blocking any further inlining."), cl::init(2.0))
 
static cl::opt< boolKeepFPICache ("ml-advisor-keep-fpi-cache", cl::Hidden, cl::desc("For test - keep the ML Inline advisor's FunctionPropertiesInfo cache"), cl::init(false))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "inline-ml"

Definition at line 95 of file MLInlineAdvisor.cpp.

◆ POPULATE_NAMES

#define POPULATE_NAMES (   DTYPE,
  SHAPE,
  NAME,
  __ 
)    TensorSpec::createSpec<DTYPE>(#NAME, SHAPE),

Typedef Documentation

◆ CompiledModelType

Definition at line 68 of file MLInlineAdvisor.cpp.

Enumeration Type Documentation

◆ SkipMLPolicyCriteria

enum class SkipMLPolicyCriteria
strong
Enumerator
Never 
IfCallerIsNotCold 

Definition at line 52 of file MLInlineAdvisor.cpp.

Function Documentation

◆ getInlinableCS()

CallBase * getInlinableCS ( Instruction I)

Definition at line 129 of file MLInlineAdvisor.cpp.

References I.

Referenced by llvm::MLInlineAdvisor::MLInlineAdvisor().

Variable Documentation

◆ InclDefaultMsg

const std::string InclDefaultMsg
static
Initial value:
=
(Twine("In interactive mode, also send the default policy decision: ") +
.str()
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
const char *const DefaultDecisionName

Definition at line 44 of file MLInlineAdvisor.cpp.

◆ InteractiveChannelBaseName

cl::opt< std::string > InteractiveChannelBaseName("inliner-interactive-channel-base", cl::Hidden, cl::desc( "Base file path for the interactive mode. The incoming filename should " "have the name <inliner-interactive-channel-base>.in, while the " "outgoing name should be <inliner-interactive-channel-base>.out")) ( "inliner-interactive-channel-base"  ,
cl::Hidden  ,
cl::desc( "Base file path for the interactive mode. The incoming filename should " "have the name <inliner-interactive-channel-base>.in, while the " "outgoing name should be <inliner-interactive-channel-base>.out")   
)
static

◆ InteractiveIncludeDefault

cl::opt< bool > InteractiveIncludeDefault("inliner-interactive-include-default", cl::Hidden, cl::desc(InclDefaultMsg)) ( "inliner-interactive-include-default"  ,
cl::Hidden  ,
cl::desc(InclDefaultMsg  
)
static

◆ KeepFPICache

cl::opt< bool > KeepFPICache("ml-advisor-keep-fpi-cache", cl::Hidden, cl::desc( "For test - keep the ML Inline advisor's FunctionPropertiesInfo cache"), cl::init(false)) ( "ml-advisor-keep-fpi-cache"  ,
cl::Hidden  ,
cl::desc( "For test - keep the ML Inline advisor's FunctionPropertiesInfo cache")  ,
cl::init(false)   
)
static

◆ ModelSelector

cl::opt< std::string > ModelSelector("ml-inliner-model-selector", cl::Hidden, cl::init("")) ( "ml-inliner-model-selector"  ,
cl::Hidden  ,
cl::init("")   
)
static

◆ SizeIncreaseThreshold

cl::opt< float > SizeIncreaseThreshold("ml-advisor-size-increase-threshold", cl::Hidden, cl::desc("Maximum factor by which expected native size may increase before " "blocking any further inlining."), cl::init(2.0)) ( "ml-advisor-size-increase-threshold"  ,
cl::Hidden  ,
cl::desc("Maximum factor by which expected native size may increase before " "blocking any further inlining.")  ,
cl::init(2.0)   
)
static

◆ SkipPolicy

cl::opt< SkipMLPolicyCriteria > SkipPolicy("ml-inliner-skip-policy", cl::Hidden, cl::init(SkipMLPolicyCriteria::Never), cl::values(clEnumValN(SkipMLPolicyCriteria::Never, "never", "never"), clEnumValN(SkipMLPolicyCriteria::IfCallerIsNotCold, "if-caller-not-cold", "if the caller is not cold"))) ( "ml-inliner-skip-policy"  ,
cl::Hidden  ,
cl::init(SkipMLPolicyCriteria::Never ,
cl::values(clEnumValN(SkipMLPolicyCriteria::Never, "never", "never"), clEnumValN(SkipMLPolicyCriteria::IfCallerIsNotCold, "if-caller-not-cold", "if the caller is not cold"))   
)
static