ColdOperandMaxCostMultiplier ("cold-operand-max-cost-multiplier", cl::desc("Maximum cost multiplier of TCC_expensive for the dependence " "slice of a cold operand to be considered inexpensive."), cl::init(1), cl::Hidden)
GainRelativeThreshold ("select-opti-loop-relative-gain-threshold", cl::desc("Minimum relative gain per loop threshold (1/X). Defaults to 12.5%"), cl::init(8), cl::Hidden)
For SelectInst that would be either True or False value. For (BinaryOperator) instructions, where the condition may be skipped, the operation will use a non-conditional operand. For example, for or(V,zext(cond)) this function would return V. However, if the conditional operand on IsTrue branch matters, we create a clone of instruction at the end of that branch B and replace the condition operand with a constant.
Also /p OptSelects contains previously optimised select-like instructions. If the current value uses one of the optimised values, we can optimise it further by replacing it with the corresponding value on the given branch
cl::opt< unsigned > ColdOperandMaxCostMultiplier("cold-operand-max-cost-multiplier", cl::desc("Maximum cost multiplier of TCC_expensive for the dependence " "slice of a cold operand to be considered inexpensive."), cl::init(1), cl::Hidden) ( "cold-operand-max-cost-multiplier" , cl::desc("Maximum cost multiplier of TCC_expensive for the dependence " "slice of a cold operand to be considered inexpensive.") , cl::init(1) , cl::Hidden )
cl::opt< unsigned > ColdOperandThreshold("cold-operand-threshold", cl::desc("Maximum frequency of path for an operand to be considered cold."), cl::init(20), cl::Hidden) ( "cold-operand-threshold" , cl::desc("Maximum frequency of path for an operand to be considered cold.") , cl::init(20) , cl::Hidden )
cl::opt< unsigned > GainCycleThreshold("select-opti-loop-cycle-gain-threshold", cl::desc("Minimum gain per loop (in cycles) threshold."), cl::init(4), cl::Hidden) ( "select-opti-loop-cycle-gain-threshold" , cl::desc("Minimum gain per loop (in cycles) threshold.") , cl::init(4) , cl::Hidden )