public abstract class BasePhase<C> extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
BasePhase.BasePhaseStatistics |
Modifier and Type | Field and Description |
---|---|
static int |
BEFORE_PHASE_DUMP_LEVEL |
private DebugMetric |
executionCount
Counts calls to
apply(StructuredGraph, Object, boolean) . |
private DebugMetric |
inputNodesCount
Accumulates the live node count of all graphs sent to
apply(StructuredGraph, Object, boolean) . |
private DebugMemUseTracker |
memUseTracker
Records memory usage within
apply(StructuredGraph, Object, boolean) . |
private CharSequence |
name |
private static Pattern |
NAME_PATTERN |
static int |
PHASE_DUMP_LEVEL |
private static ClassValue<BasePhase.BasePhaseStatistics> |
statisticsClassValue |
private DebugTimer |
timer
Records time spent in
apply(StructuredGraph, Object, boolean) . |
Modifier | Constructor and Description |
---|---|
protected |
BasePhase() |
protected |
BasePhase(String name) |
Modifier and Type | Method and Description |
---|---|
void |
apply(StructuredGraph graph,
C context) |
protected void |
apply(StructuredGraph graph,
C context,
boolean dumpGraph) |
private static boolean |
assertionsEnabled() |
private static boolean |
checkName(String name) |
protected CharSequence |
createName() |
CharSequence |
getName() |
protected abstract void |
run(StructuredGraph graph,
C context) |
public static final int PHASE_DUMP_LEVEL
public static final int BEFORE_PHASE_DUMP_LEVEL
private CharSequence name
private final DebugTimer timer
apply(StructuredGraph, Object, boolean)
.private final DebugMetric executionCount
apply(StructuredGraph, Object, boolean)
.private final DebugMetric inputNodesCount
apply(StructuredGraph, Object, boolean)
.private final DebugMemUseTracker memUseTracker
apply(StructuredGraph, Object, boolean)
.private static final Pattern NAME_PATTERN
private static final ClassValue<BasePhase.BasePhaseStatistics> statisticsClassValue
private static boolean assertionsEnabled()
public final void apply(StructuredGraph graph, C context)
protected final void apply(StructuredGraph graph, C context, boolean dumpGraph)
protected CharSequence createName()
public final CharSequence getName()
protected abstract void run(StructuredGraph graph, C context)