|
| | STATISTIC (NumCondBranches,"Number of conditional branches") |
| |
| | STATISTIC (NumUncondBranches,"Number of unconditional branches") |
| |
| | STATISTIC (CondBranchTakenFreq,"Potential frequency of taking conditional branches") |
| |
| | STATISTIC (UncondBranchTakenFreq,"Potential frequency of taking unconditional branches") |
| |
| | INITIALIZE_PASS_BEGIN (MachineBlockPlacement, DEBUG_TYPE,"Branch Probability Basic Block Placement", false, false) INITIALIZE_PASS_END(MachineBlockPlacement |
| |
Branch Probability Basic Block
static false std::string | getBlockName (const MachineBasicBlock *BB) |
| | Helper to print the name of a MBB. More...
|
| |
| static BranchProbability | getAdjustedProbability (BranchProbability OrigProb, BranchProbability AdjustedSumProb) |
| | The helper function returns the branch probability that is adjusted or normalized over the new total AdjustedSumProb. More...
|
| |
| static bool | hasSameSuccessors (MachineBasicBlock &BB, SmallPtrSetImpl< const MachineBasicBlock * > &Successors) |
| | Check if BB has exactly the successors in Successors. More...
|
| |
| static bool | greaterWithBias (BlockFrequency A, BlockFrequency B, uint64_t EntryFreq) |
| | Compare 2 BlockFrequency's with a small penalty for A. More...
|
| |
| static BranchProbability | getLayoutSuccessorProbThreshold (const MachineBasicBlock *BB) |
| |
| | INITIALIZE_PASS_BEGIN (MachineBlockPlacementStats,"block-placement-stats","Basic Block Placement Stats", false, false) INITIALIZE_PASS_END(MachineBlockPlacementStats |
| |
|
| static cl::opt< unsigned > | AlignAllBlock ("align-all-blocks", cl::desc("Force the alignment of all ""blocks in the function."), cl::init(0), cl::Hidden) |
| |
| static cl::opt< unsigned > | AlignAllNonFallThruBlocks ("align-all-nofallthru-blocks", cl::desc("Force the alignment of all ""blocks that have no fall-through predecessors (i.e. don't add ""nops that are executed)."), cl::init(0), cl::Hidden) |
| |
| static cl::opt< unsigned > | ExitBlockBias ("block-placement-exit-block-bias", cl::desc("Block frequency percentage a loop exit block needs ""over the original exit to be considered the new exit."), cl::init(0), cl::Hidden) |
| |
| static cl::opt< unsigned > | LoopToColdBlockRatio ("loop-to-cold-block-ratio", cl::desc("Outline loop blocks from loop chain if (frequency of loop) / ""(frequency of block) is greater than this ratio"), cl::init(5), cl::Hidden) |
| |
| static cl::opt< bool > | PreciseRotationCost ("precise-rotation-cost", cl::desc("Model the cost of loop rotation more ""precisely by using profile data."), cl::init(false), cl::Hidden) |
| |
| static cl::opt< bool > | ForcePreciseRotationCost ("force-precise-rotation-cost", cl::desc("Force the use of precise cost ""loop rotation strategy."), cl::init(false), cl::Hidden) |
| |
| static cl::opt< unsigned > | MisfetchCost ("misfetch-cost", cl::desc("Cost that models the probabilistic risk of an instruction ""misfetch due to a jump comparing to falling through, whose cost ""is zero."), cl::init(1), cl::Hidden) |
| |
| static cl::opt< unsigned > | JumpInstCost ("jump-inst-cost", cl::desc("Cost of jump instructions."), cl::init(1), cl::Hidden) |
| |
| static cl::opt< bool > | TailDupPlacement ("tail-dup-placement", cl::desc("Perform tail duplication during placement. ""Creates more fallthrough opportunites in ""outline branches."), cl::init(true), cl::Hidden) |
| |
| static cl::opt< bool > | BranchFoldPlacement ("branch-fold-placement", cl::desc("Perform branch folding during placement. ""Reduces code size."), cl::init(true), cl::Hidden) |
| |
| static cl::opt< unsigned > | TailDupPlacementThreshold ("tail-dup-placement-threshold", cl::desc("Instruction cutoff for tail duplication during layout. ""Tail merging during layout is forced to have a threshold ""that won't conflict."), cl::init(2), cl::Hidden) |
| |
| static cl::opt< unsigned > | TailDupPlacementAggressiveThreshold ("tail-dup-placement-aggressive-threshold", cl::desc("Instruction cutoff for aggressive tail duplication during ""layout. Used at -O3. Tail merging during layout is forced to ""have a threshold that won't conflict."), cl::init(3), cl::Hidden) |
| |
| static cl::opt< unsigned > | TailDupPlacementPenalty ("tail-dup-placement-penalty", cl::desc("Cost penalty for blocks that can avoid breaking CFG by copying. ""Copying can increase fallthrough, but it also increases icache ""pressure. This parameter controls the penalty to account for that. ""Percent as integer."), cl::init(2), cl::Hidden) |
| |
| static cl::opt< unsigned > | TriangleChainCount ("triangle-chain-count", cl::desc("Number of triangle-shaped-CFG's that need to be in a row for the ""triangle tail duplication heuristic to kick in. 0 to disable."), cl::init(2), cl::Hidden) |
| |
| cl::opt< unsigned > | StaticLikelyProb |
| |
| cl::opt< unsigned > | ProfileLikelyProb |
| |
| cl::opt< GVDAGType > | ViewBlockLayoutWithBFI |
| |
| cl::opt< std::string > | ViewBlockFreqFuncName |
| |
| | DEBUG_TYPE |
| |
| Branch Probability Basic Block | Placement |
| |
| Branch Probability Basic Block | false |
| |
| block placement | stats |
| |
block placement Basic Block
Placement | Stats |
| |
Compare 2 BlockFrequency's with a small penalty for A.
In order to be conservative, we apply a X% penalty to account for increased icache pressure and static heuristics. For small frequencies we use only the numerators to improve accuracy. For simplicity, we assume the penalty is less than 100% TODO(iteratee): Use 64-bit fixed point edge frequencies everywhere.
Definition at line 674 of file MachineBlockPlacement.cpp.
References B, and TailDupPlacementPenalty.