LLVM 20.0.0git
Macros | Typedefs | Functions | Variables
StableFunctionMap.cpp File Reference
#include "llvm/CGData/StableFunctionMap.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "stable-function-map"
 

Typedefs

using ParamLocs = SmallVector< IndexPair >
 

Functions

static void removeIdenticalIndexPair (SmallVector< std::unique_ptr< StableFunctionMap::StableFunctionEntry > > &SFS)
 
static bool isProfitable (const SmallVector< std::unique_ptr< StableFunctionMap::StableFunctionEntry > > &SFS)
 

Variables

static cl::opt< unsignedGlobalMergingMinMerges ("global-merging-min-merges", cl::desc("Minimum number of similar functions with " "the same hash required for merging."), cl::init(2), cl::Hidden)
 
static cl::opt< unsignedGlobalMergingMinInstrs ("global-merging-min-instrs", cl::desc("The minimum instruction count required when merging functions."), cl::init(1), cl::Hidden)
 
static cl::opt< unsignedGlobalMergingMaxParams ("global-merging-max-params", cl::desc("The maximum number of parameters allowed when merging functions."), cl::init(std::numeric_limits< unsigned >::max()), cl::Hidden)
 
static cl::opt< boolGlobalMergingSkipNoParams ("global-merging-skip-no-params", cl::desc("Skip merging functions with no parameters."), cl::init(true), cl::Hidden)
 
static cl::opt< double > GlobalMergingInstOverhead ("global-merging-inst-overhead", cl::desc("The overhead cost associated with each instruction when lowering " "to machine instruction."), cl::init(1.2), cl::Hidden)
 
static cl::opt< double > GlobalMergingParamOverhead ("global-merging-param-overhead", cl::desc("The overhead cost associated with each parameter when merging " "functions."), cl::init(2.0), cl::Hidden)
 
static cl::opt< double > GlobalMergingCallOverhead ("global-merging-call-overhead", cl::desc("The overhead cost associated with each " "function call when merging functions."), cl::init(1.0), cl::Hidden)
 
static cl::opt< double > GlobalMergingExtraThreshold ("global-merging-extra-threshold", cl::desc("An additional cost threshold that must be exceeded for merging " "to be considered beneficial."), cl::init(0.0), cl::Hidden)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "stable-function-map"

Definition at line 21 of file StableFunctionMap.cpp.

Typedef Documentation

◆ ParamLocs

Definition at line 133 of file StableFunctionMap.cpp.

Function Documentation

◆ isProfitable()

static bool isProfitable ( const SmallVector< std::unique_ptr< StableFunctionMap::StableFunctionEntry > > &  SFS)
static

◆ removeIdenticalIndexPair()

static void removeIdenticalIndexPair ( SmallVector< std::unique_ptr< StableFunctionMap::StableFunctionEntry > > &  SFS)
static

Variable Documentation

◆ GlobalMergingCallOverhead

cl::opt< double > GlobalMergingCallOverhead("global-merging-call-overhead", cl::desc("The overhead cost associated with each " "function call when merging functions."), cl::init(1.0), cl::Hidden) ( "global-merging-call-overhead"  ,
cl::desc("The overhead cost associated with each " "function call when merging functions.")  ,
cl::init(1.0)  ,
cl::Hidden   
)
static

Referenced by isProfitable().

◆ GlobalMergingExtraThreshold

cl::opt< double > GlobalMergingExtraThreshold("global-merging-extra-threshold", cl::desc("An additional cost threshold that must be exceeded for merging " "to be considered beneficial."), cl::init(0.0), cl::Hidden) ( "global-merging-extra-threshold"  ,
cl::desc("An additional cost threshold that must be exceeded for merging " "to be considered beneficial.")  ,
cl::init(0.0)  ,
cl::Hidden   
)
static

Referenced by isProfitable().

◆ GlobalMergingInstOverhead

cl::opt< double > GlobalMergingInstOverhead("global-merging-inst-overhead", cl::desc("The overhead cost associated with each instruction when lowering " "to machine instruction."), cl::init(1.2), cl::Hidden) ( "global-merging-inst-overhead"  ,
cl::desc("The overhead cost associated with each instruction when lowering " "to machine instruction.")  ,
cl::init(1.2)  ,
cl::Hidden   
)
static

Referenced by isProfitable().

◆ GlobalMergingMaxParams

cl::opt< unsigned > GlobalMergingMaxParams("global-merging-max-params", cl::desc( "The maximum number of parameters allowed when merging functions."), cl::init(std::numeric_limits< unsigned >::max()), cl::Hidden) ( "global-merging-max-params"  ,
cl::desc( "The maximum number of parameters allowed when merging functions.")  ,
cl::init(std::numeric_limits< unsigned >::max())  ,
cl::Hidden   
)
static

Referenced by isProfitable().

◆ GlobalMergingMinInstrs

cl::opt< unsigned > GlobalMergingMinInstrs("global-merging-min-instrs", cl::desc("The minimum instruction count required when merging functions."), cl::init(1), cl::Hidden) ( "global-merging-min-instrs"  ,
cl::desc("The minimum instruction count required when merging functions.")  ,
cl::init(1)  ,
cl::Hidden   
)
static

Referenced by isProfitable().

◆ GlobalMergingMinMerges

cl::opt< unsigned > GlobalMergingMinMerges("global-merging-min-merges", cl::desc("Minimum number of similar functions with " "the same hash required for merging."), cl::init(2), cl::Hidden) ( "global-merging-min-merges"  ,
cl::desc("Minimum number of similar functions with " "the same hash required for merging.")  ,
cl::init(2)  ,
cl::Hidden   
)
static

Referenced by isProfitable().

◆ GlobalMergingParamOverhead

cl::opt< double > GlobalMergingParamOverhead("global-merging-param-overhead", cl::desc("The overhead cost associated with each parameter when merging " "functions."), cl::init(2.0), cl::Hidden) ( "global-merging-param-overhead"  ,
cl::desc("The overhead cost associated with each parameter when merging " "functions.")  ,
cl::init(2.0)  ,
cl::Hidden   
)
static

Referenced by isProfitable().

◆ GlobalMergingSkipNoParams

cl::opt< bool > GlobalMergingSkipNoParams("global-merging-skip-no-params", cl::desc("Skip merging functions with no parameters."), cl::init(true), cl::Hidden) ( "global-merging-skip-no-params"  ,
cl::desc("Skip merging functions with no parameters.")  ,
cl::init(true ,
cl::Hidden   
)
static

Referenced by isProfitable().