LLVM 24.0.0git
EarlyIfConversion.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "early-ifcvt"
#define DEBUG_TYPE   "early-if-predicator"

Functions

 STATISTIC (NumDiamondsSeen, "Number of diamonds")
 STATISTIC (NumDiamondsConv, "Number of diamonds converted")
 STATISTIC (NumTrianglesSeen, "Number of triangles")
 STATISTIC (NumTrianglesConv, "Number of triangles converted")
 STATISTIC (NumDataDependant, "Number of data dependent conditional branches encountered")
 STATISTIC (NumLikelyBiased, "Number of branches with a hot path encountered")
static bool hasSameValue (const MachineRegisterInfo &MRI, const TargetInstrInfo *TII, Register TReg, Register FReg)
 INITIALIZE_PASS_BEGIN (EarlyIfConverterLegacy, DEBUG_TYPE, "Early If Converter", false, false) INITIALIZE_PASS_END(EarlyIfConverterLegacy
static bool isConstantPoolLoad (const MachineInstr *MI)
static unsigned adjCycles (unsigned Cyc, int Delta)
 INITIALIZE_PASS_BEGIN (EarlyIfPredicator, DEBUG_TYPE, "Early If Predicator", false, false) INITIALIZE_PASS_END(EarlyIfPredicator

Variables

static cl::opt< unsignedBlockInstrLimit ("early-ifcvt-limit", cl::init(30), cl::Hidden, cl::desc("Maximum number of instructions per speculated block."))
static cl::opt< boolStress ("stress-early-ifcvt", cl::Hidden, cl::desc("Turn all knobs to 11"))
static cl::opt< boolEnableDataDependentBranchAnalysis ("enable-early-ifcvt-data-dependent", cl::Hidden, cl::init(false), cl::desc("Enable hard-to-predict branch analysis for if-conversion"))
static cl::opt< unsignedMaxNumSteps ("early-ifcvt-max-steps", cl::Hidden, cl::init(16), cl::desc("Limit the number of steps taken when searching for a " "recently loaded value"))
static cl::opt< unsignedMaxRegionInstrs ("early-ifcvt-max-region-instrs", cl::Hidden, cl::init(64), cl::desc("Limit the number of blocks and instructions examined when " "searching for calls between a load and the condition it feeds"))
 DEBUG_TYPE
Early If Converter
Early If false
Early If Predicator

Macro Definition Documentation

◆ DEBUG_TYPE [1/2]

#define DEBUG_TYPE   "early-ifcvt"

Definition at line 51 of file EarlyIfConversion.cpp.

◆ DEBUG_TYPE [2/2]

#define DEBUG_TYPE   "early-if-predicator"

Definition at line 51 of file EarlyIfConversion.cpp.

Function Documentation

◆ adjCycles()

unsigned adjCycles ( unsigned Cyc,
int Delta )
static

Definition at line 1160 of file EarlyIfConversion.cpp.

◆ hasSameValue()

◆ INITIALIZE_PASS_BEGIN() [1/2]

INITIALIZE_PASS_BEGIN ( EarlyIfConverterLegacy ,
DEBUG_TYPE ,
"Early If Converter" ,
false ,
false  )

◆ INITIALIZE_PASS_BEGIN() [2/2]

INITIALIZE_PASS_BEGIN ( EarlyIfPredicator ,
DEBUG_TYPE ,
"Early If Predicator" ,
false ,
false  )

◆ isConstantPoolLoad()

bool isConstantPoolLoad ( const MachineInstr * MI)
static

Definition at line 935 of file EarlyIfConversion.cpp.

References llvm::any_of(), and MI.

◆ STATISTIC() [1/6]

STATISTIC ( NumDataDependant ,
"Number of data dependent conditional branches encountered"  )

◆ STATISTIC() [2/6]

STATISTIC ( NumDiamondsConv ,
"Number of diamonds converted"  )

◆ STATISTIC() [3/6]

STATISTIC ( NumDiamondsSeen ,
"Number of diamonds"  )

◆ STATISTIC() [4/6]

STATISTIC ( NumLikelyBiased ,
"Number of branches with a hot path encountered"  )

References TBB, TII, and TRI.

◆ STATISTIC() [5/6]

STATISTIC ( NumTrianglesConv ,
"Number of triangles converted"  )

◆ STATISTIC() [6/6]

STATISTIC ( NumTrianglesSeen ,
"Number of triangles"  )

Variable Documentation

◆ BlockInstrLimit

cl::opt< unsigned > BlockInstrLimit("early-ifcvt-limit", cl::init(30), cl::Hidden, cl::desc("Maximum number of instructions per speculated block.")) ( "early-ifcvt-limit" ,
cl::init(30) ,
cl::Hidden ,
cl::desc("Maximum number of instructions per speculated block.")  )
static

◆ Converter

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 881 of file EarlyIfConversion.cpp.

◆ EnableDataDependentBranchAnalysis

cl::opt< bool > EnableDataDependentBranchAnalysis("enable-early-ifcvt-data-dependent", cl::Hidden, cl::init(false), cl::desc("Enable hard-to-predict branch analysis for if-conversion")) ( "enable-early-ifcvt-data-dependent" ,
cl::Hidden ,
cl::init(false) ,
cl::desc("Enable hard-to-predict branch analysis for if-conversion")  )
static

◆ false

Early If false

Definition at line 882 of file EarlyIfConversion.cpp.

◆ MaxNumSteps

cl::opt< unsigned > MaxNumSteps("early-ifcvt-max-steps", cl::Hidden, cl::init(16), cl::desc("Limit the number of steps taken when searching for a " "recently loaded value")) ( "early-ifcvt-max-steps" ,
cl::Hidden ,
cl::init(16) ,
cl::desc("Limit the number of steps taken when searching for a " "recently loaded value")  )
static

◆ MaxRegionInstrs

cl::opt< unsigned > MaxRegionInstrs("early-ifcvt-max-region-instrs", cl::Hidden, cl::init(64), cl::desc("Limit the number of blocks and instructions examined when " "searching for calls between a load and the condition it feeds")) ( "early-ifcvt-max-region-instrs" ,
cl::Hidden ,
cl::init(64) ,
cl::desc("Limit the number of blocks and instructions examined when " "searching for calls between a load and the condition it feeds")  )
static

◆ Predicator

Early If Predicator

◆ Stress

cl::opt< bool > Stress("stress-early-ifcvt", cl::Hidden, cl::desc("Turn all knobs to 11")) ( "stress-early-ifcvt" ,
cl::Hidden ,
cl::desc("Turn all knobs to 11")  )
static

Referenced by shouldConvertImpl().