LLVM 22.0.0git
MLInlineAdvisor.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "inline-ml"
#define POPULATE_NAMES(DTYPE, SHAPE, NAME, __)

Typedefs

using CompiledModelType = NoopSavedModelImpl

Enumerations

enum class  SkipMLPolicyCriteria { Never , IfCallerIsNotCold }

Functions

CallBasegetInlinableCS (Instruction &I)

Variables

static cl::opt< std::stringInteractiveChannelBaseName ("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::stringModelSelector ("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 97 of file MLInlineAdvisor.cpp.

◆ POPULATE_NAMES

#define POPULATE_NAMES ( DTYPE,
SHAPE,
NAME,
__ )
Value:
static TensorSpec createSpec(const std::string &Name, const std::vector< int64_t > &Shape, int Port=0)
Definition TensorSpec.h:66

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

Typedef Documentation

◆ CompiledModelType

Definition at line 69 of file MLInlineAdvisor.cpp.

Enumeration Type Documentation

◆ SkipMLPolicyCriteria

enum class SkipMLPolicyCriteria
strong
Enumerator
Never 
IfCallerIsNotCold 

Definition at line 53 of file MLInlineAdvisor.cpp.

Function Documentation

◆ getInlinableCS()

CallBase * getInlinableCS ( Instruction & I)

Definition at line 134 of file MLInlineAdvisor.cpp.

References llvm::dyn_cast(), and 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:82
LLVM_ABI const char *const DefaultDecisionName

Definition at line 45 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