public class AdjustBranchProbabilities extends CompilerPhase
container| Constructor and Description |
|---|
AdjustBranchProbabilities() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
findInfrequentInstruction(BasicBlock bb) |
String |
getName() |
CompilerPhase |
newExecution(IR ir)
This method is called immediately before performPhase.
|
void |
perform(IR ir)
Simplistic adjustment of branch probabilities.
|
dumpIR, dumpIR, getClassConstructor, getCompilerPhaseConstructor, getCompilerPhaseConstructor, performPhase, printingEnabled, reportAdditionalStats, setContainer, shouldPerform, verifypublic AdjustBranchProbabilities()
public final String getName()
getName in class CompilerPhasepublic final CompilerPhase newExecution(IR ir)
CompilerPhasenewExecution in class CompilerPhaseir - the IR that is about to be passed to performPhasepublic final void perform(IR ir)
if (P) { infrequent block }
if (P) { } else { infrequent block }
that are introduced by ExpandRuntimeServices.
Key idea: If a block is infrequent then make sure that any conditional branch that targets/avoids the block does not have 0.5 as its branch probability.
perform in class CompilerPhaseir - the governing IRprivate boolean findInfrequentInstruction(BasicBlock bb)