public class SignedDivNode extends IntegerDivRemNode implements LIRLowerable
IntegerDivRemNode.Op, IntegerDivRemNode.TypeNode.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberableCanonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Ternary<T extends Node>, Canonicalizable.Unary<T extends Node>DeoptimizingNode.DeoptAfter, DeoptimizingNode.DeoptBefore, DeoptimizingNode.DeoptDuring| Modifier and Type | Field and Description |
|---|---|
static NodeClass<SignedDivNode> |
TYPE |
deoptReasonAndAction, deoptSpeculationx, ystateBeforenextEMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
SignedDivNode(NodeClass<? extends SignedDivNode> c,
ValueNode x,
ValueNode y,
GuardingNode zeroCheck) |
|
SignedDivNode(ValueNode x,
ValueNode y,
GuardingNode zeroCheck) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFloat() |
ValueNode |
canonical(CanonicalizerTool tool,
ValueNode forX,
ValueNode forY)
Similar to
Canonicalizable.canonical(CanonicalizerTool), except that
implementations should act as if the current input of the node was the given one, i.e.,
they should never look at the inputs via the this pointer. |
static ValueNode |
canonical(SignedDivNode self,
ValueNode forX,
ValueNode forY,
GuardingNode zeroCheck,
NodeView view) |
static ValueNode |
canonical(SignedDivNode self,
ValueNode forX,
ValueNode forY,
GuardingNode zeroCheck,
NodeView view,
boolean divisionOverflowIsJVMSCompliant) |
static ValueNode |
canonical(ValueNode forX,
long c,
NodeView view) |
static ValueNode |
create(ValueNode x,
ValueNode y,
GuardingNode zeroCheck,
NodeView view) |
protected SignedDivNode |
createWithInputs(ValueNode forX,
ValueNode forY,
GuardingNode forZeroCheck,
FrameState forStateBefore)
This is used as a hook to allow "safe" SignedDivNodes to be created during canonicalization.
|
static boolean |
divisionIsJVMSCompliant(ValueNode dividend,
ValueNode divisor,
boolean platformIsCompliant)
Determines if
dividend / divisor complies with the JVM specification for idiv
and ldiv. |
void |
generate(NodeLIRBuilderTool gen) |
boolean |
inferStamp()
This method can be overridden by subclasses of
ValueNode if they need to recompute
their stamp if their inputs change. |
canDeoptimize, getDeoptReasonAndAction, getDeoptSpeculation, getOp, getType, getZeroGuard, setCanDeopt, setImplicitDeoptimization, setZeroGuardgetX, getY, setX, setYsetStateBefore, stateBeforeasFixedWithNextNode, next, setNextasFixedNode, verifyasConstant, asJavaConstant, asNode, asSerializableConstant, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, recursivelyDataFlowEqualsUpTo, setStamp, stamp, updateStamp, updateUsagesInterfaceafterClone, applyInputs, applySuccessors, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearNodeSourcePosition, clearSuccessors, copyWithInputs, copyWithInputs, dataFlowEquals, dynamicNodeSizeEstimate, estimatedNodeCycles, estimatedNodeSize, fail, formatTo, getCreationPosition, getDebug, getDebugProperties, getDebugProperties, getInsertionPosition, getNodeClass, getNodeSourcePosition, getOptions, getUsageCount, hasExactlyOneUsage, hashCode, hasMoreThanOneUsage, hasNoUsages, hasOnlyUsagesOfType, hasUsages, hasUsagesOfType, inputPositions, inputs, isAlive, isDeleted, isUnregistered, markDeleted, maybeNotifyZeroUsages, modCount, predecessor, pushInputs, removeUsage, replaceAllInputs, replaceAndDelete, replaceAtAllUsages, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsagesAndDelete, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, singleUsage, successorPositions, successors, toString, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, usages, valueEquals, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, getClass, notify, notifyAll, wait, wait, waitasNodecanonicalcanUseAsStateDuringstatesasFixedNodepublic static final NodeClass<SignedDivNode> TYPE
public SignedDivNode(ValueNode x, ValueNode y, GuardingNode zeroCheck)
protected SignedDivNode(NodeClass<? extends SignedDivNode> c, ValueNode x, ValueNode y, GuardingNode zeroCheck)
public static ValueNode create(ValueNode x, ValueNode y, GuardingNode zeroCheck, NodeView view)
public boolean inferStamp()
ValueNodeValueNode if they need to recompute
their stamp if their inputs change. A typical implementation will compute the stamp and pass
it to ValueNode.updateStamp(Stamp), whose return value can be used as the result of this
method.inferStamp in class ValueNodepublic ValueNode canonical(CanonicalizerTool tool, ValueNode forX, ValueNode forY)
Canonicalizable.BinaryCanonicalizable.canonical(CanonicalizerTool), except that
implementations should act as if the current input of the node was the given one, i.e.,
they should never look at the inputs via the this pointer.canonical in interface Canonicalizable.Binary<ValueNode>protected SignedDivNode createWithInputs(ValueNode forX, ValueNode forY, GuardingNode forZeroCheck, FrameState forStateBefore)
public static ValueNode canonical(SignedDivNode self, ValueNode forX, ValueNode forY, GuardingNode zeroCheck, NodeView view)
public static ValueNode canonical(SignedDivNode self, ValueNode forX, ValueNode forY, GuardingNode zeroCheck, NodeView view, boolean divisionOverflowIsJVMSCompliant)
public boolean canFloat()
canFloat in class IntegerDivRemNodepublic static boolean divisionIsJVMSCompliant(ValueNode dividend, ValueNode divisor, boolean platformIsCompliant)
dividend / divisor complies with the JVM specification for idiv
and ldiv. From for idiv:
There is one special case that does not satisfy this rule: if the dividend is the negative integer of largest possible magnitude for the int type, and the divisor is -1, then overflow occurs, and the result is equal to the dividend. Despite the overflow, no exception is thrown in this case.
platformIsCompliant - true iff the target platform complies with the JVM specification
for the overflow case of Integer.MIN_VALUE / -1 and
Long.MIN_VALUE / -1platformIsCompliant == true or the stamps of dividend
divisor excludes the possibility of the problematic overflow casepublic void generate(NodeLIRBuilderTool gen)
generate in interface LIRLowerable