public class GraphEffectList extends EffectList
EffectList.Effect, EffectList.SimpleEffect
Constructor and Description |
---|
GraphEffectList() |
Modifier and Type | Method and Description |
---|---|
void |
addCounterAfter(String group,
String name,
int increment,
boolean addContext,
FixedWithNextNode position) |
void |
addCounterBefore(String group,
String name,
int increment,
boolean addContext,
FixedNode position) |
void |
addFixedNodeBefore(FixedWithNextNode node,
FixedNode position)
Adds the given fixed node to the graph's control flow, before position (so that the original
predecessor of position will then be node's predecessor).
|
void |
addFloatingNode(ValueNode node,
String cause)
Add the given floating node to the graph.
|
void |
addVirtualMapping(FrameState node,
EscapeObjectState state)
Adds a virtual object's state to the given frame state.
|
void |
addWeakCounterCounterBefore(String group,
String name,
int increment,
boolean addContext,
ValueNode checkedValue,
FixedNode position) |
void |
deleteNode(Node node)
Removes the given fixed node from the control flow and deletes it.
|
void |
ensureAdded(ValueNode node,
FixedNode position) |
void |
initializePhiInput(PhiNode node,
int index,
ValueNode value)
Sets the phi node's input at the given index to the given value, adding new phi inputs as
needed.
|
void |
killIfBranch(IfNode ifNode,
boolean constantCondition) |
void |
replaceAtUsages(ValueNode node,
ValueNode replacement)
Replaces the given node at its usages without deleting it.
|
void |
replaceFirstInput(Node node,
Node oldInput,
Node newInput)
Replaces the first occurrence of oldInput in node with newInput.
|
void |
replaceWithSink(FixedWithNextNode node,
ControlSinkNode sink) |
add, add, addAll, apply, backtrack, checkpoint, clear, get, insertAll, isEmpty, iterator, size, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public GraphEffectList()
public void addCounterBefore(String group, String name, int increment, boolean addContext, FixedNode position)
public void addCounterAfter(String group, String name, int increment, boolean addContext, FixedWithNextNode position)
public void addWeakCounterCounterBefore(String group, String name, int increment, boolean addContext, ValueNode checkedValue, FixedNode position)
public void addFixedNodeBefore(FixedWithNextNode node, FixedNode position)
node
- The fixed node to be added to the graph.position
- The fixed node before which the node should be added.public void ensureAdded(ValueNode node, FixedNode position)
public void addFloatingNode(ValueNode node, String cause)
node
- The floating node to be added.public void initializePhiInput(PhiNode node, int index, ValueNode value)
node
- The phi node whose input should be changed.index
- The index of the phi input to be changed.value
- The new value for the phi input.public void addVirtualMapping(FrameState node, EscapeObjectState state)
node
- The frame state to which the state should be added.state
- The virtual object state to add.public void deleteNode(Node node)
node
- The fixed node that should be deleted.public void killIfBranch(IfNode ifNode, boolean constantCondition)
public void replaceWithSink(FixedWithNextNode node, ControlSinkNode sink)
public void replaceAtUsages(ValueNode node, ValueNode replacement)
DeadCodeEliminationPhase
node
- The node to be replaced.replacement
- The node that should replace the original value. If the replacement is a
non-connected FixedWithNextNode
it will be added to the control flow.public void replaceFirstInput(Node node, Node oldInput, Node newInput)
node
- The node whose input should be changed.oldInput
- The value to look for.newInput
- The value to replace with.