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, verify
public AdjustBranchProbabilities()
public final String getName()
getName
in class CompilerPhase
public final CompilerPhase newExecution(IR ir)
CompilerPhase
newExecution
in class CompilerPhase
ir
- 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 CompilerPhase
ir
- the governing IRprivate boolean findInfrequentInstruction(BasicBlock bb)