public class LoopPeelingPhase extends LoopPhase<LoopPolicies>
Modifier and Type | Class and Description |
---|---|
static class |
LoopPeelingPhase.Options |
BasePhase.ApplyScope, BasePhase.BasePhaseStatistics, BasePhase.NotApplicable, BasePhase.PhaseOptions, BasePhase.SharedGlobalPhaseState
Modifier and Type | Field and Description |
---|---|
static CounterKey |
PEELED |
canonicalizer
ALWAYS_APPLICABLE
Constructor and Description |
---|
LoopPeelingPhase(LoopPolicies policies,
CanonicalizerPhase canonicalizer) |
Modifier and Type | Method and Description |
---|---|
Optional<BasePhase.NotApplicable> |
canApply(GraphState graphState)
Checks if all the preconditions to
BasePhase.apply(StructuredGraph, Object, boolean) the phase
are met. |
static boolean |
canPeel(LoopEx loop)
Determine if the given loop can be peeled.
|
float |
codeSizeIncrease()
Returns a factor
>=1 that determines what the final code size in terms of the sum of
the node code sizes NodeSize of all nodes is. |
protected void |
run(StructuredGraph graph,
CoreProviders context) |
getPolicies
applyScope, updateGraphState
apply, apply, contractorName, equals, getName, hashCode, mustApply, shouldDumpAfterAtBasicLevel, shouldDumpBeforeAtBasicLevel
clone, getClass, notify, notifyAll, toString, wait, wait, wait
checkContract
public static final CounterKey PEELED
public LoopPeelingPhase(LoopPolicies policies, CanonicalizerPhase canonicalizer)
public static boolean canPeel(LoopEx loop)
public Optional<BasePhase.NotApplicable> canApply(GraphState graphState)
BasePhase
BasePhase.apply(StructuredGraph, Object, boolean)
the phase
are met.canApply
in class PostRunCanonicalizationPhase<CoreProviders>
graphState
- represents the state of the StructuredGraph
used for compilation
and contains the required information to determine if a phase can be applied.Optional.empty()
if all the checks pass, Optional#of(NotApplicable)
containing why this phase is not applicable on this graphState
otherwise.protected void run(StructuredGraph graph, CoreProviders context)
run
in class BasePhase<CoreProviders>
public float codeSizeIncrease()
PhaseSizeContract
>=1
that determines what the final code size in terms of the sum of
the node code sizes NodeSize
of all nodes is.codeSizeIncrease
in interface PhaseSizeContract
codeSizeIncrease
in class BasePhase<CoreProviders>