public abstract class IntegerConvertNode<OP> extends UnaryNode implements ArithmeticOperation, ConvertNode, ArithmeticLIRLowerable, StampInverter
IntegerConvert converts an integer to an integer of different width.Node.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>| Modifier and Type | Field and Description |
|---|---|
protected int |
inputBits |
protected int |
resultBits |
static NodeClass<IntegerConvertNode> |
TYPE |
EMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
IntegerConvertNode(NodeClass<? extends IntegerConvertNode<OP>> c,
ArithmeticOpTable.IntegerConvertOp<OP> opForStampComputation,
int inputBits,
int resultBits,
ValueNode input) |
| Modifier and Type | Method and Description |
|---|---|
ValueNode |
canonical(CanonicalizerTool tool,
ValueNode forValue)
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. |
Constant |
convert(Constant c,
ConstantReflectionProvider constantReflection) |
static ValueNode |
convert(ValueNode input,
Stamp stamp,
boolean zeroExtend,
NodeView view) |
static ValueNode |
convert(ValueNode input,
Stamp stamp,
boolean zeroExtend,
StructuredGraph graph,
NodeView view) |
static ValueNode |
convert(ValueNode input,
Stamp stamp,
boolean zeroExtend,
StructuredGraph graph,
NodeView view,
boolean gvn) |
static ValueNode |
convert(ValueNode input,
Stamp stamp,
NodeView view) |
static ValueNode |
convert(ValueNode input,
Stamp stamp,
StructuredGraph graph,
NodeView view) |
static ValueNode |
convertUnsigned(ValueNode input,
Stamp stamp,
NodeView view) |
static ValueNode |
convertUnsigned(ValueNode input,
Stamp stamp,
StructuredGraph graph,
NodeView view) |
protected static <T> ValueNode |
findSynonym(ArithmeticOpTable.IntegerConvertOp<T> operation,
ValueNode value,
int inputBits,
int resultBits,
Stamp stamp) |
Stamp |
foldStamp(Stamp newStamp)
Compute an improved for this node using the passed in stamp.
|
ArithmeticOpTable.IntegerConvertOp<OP> |
getArithmeticOp() |
int |
getInputBits() |
protected abstract ArithmeticOpTable.IntegerConvertOp<OP> |
getOp(ArithmeticOpTable table) |
int |
getResultBits() |
protected abstract ArithmeticOpTable.IntegerConvertOp<?> |
getReverseOp(ArithmeticOpTable table) |
Stamp |
invertStamp(Stamp outStamp)
Computes the stamp of the input for the given output stamp.
|
Constant |
reverse(Constant c,
ConstantReflectionProvider constantReflection) |
getValue, inferStamp, setValueasConstant, 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, verify, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, getClass, notify, notifyAll, wait, wait, waitgetValue, isLossless, mayNullCheckSkipConversion, preservesOrder, preservesOrderasNodegenerate, generategetValuecanonicalpublic static final NodeClass<IntegerConvertNode> TYPE
protected final int inputBits
protected final int resultBits
protected IntegerConvertNode(NodeClass<? extends IntegerConvertNode<OP>> c, ArithmeticOpTable.IntegerConvertOp<OP> opForStampComputation, int inputBits, int resultBits, ValueNode input)
public int getInputBits()
public int getResultBits()
protected abstract ArithmeticOpTable.IntegerConvertOp<OP> getOp(ArithmeticOpTable table)
protected abstract ArithmeticOpTable.IntegerConvertOp<?> getReverseOp(ArithmeticOpTable table)
public final ArithmeticOpTable.IntegerConvertOp<OP> getArithmeticOp()
getArithmeticOp in interface ArithmeticOperationpublic Constant convert(Constant c,
ConstantReflectionProvider constantReflection)
convert in interface ConvertNodepublic Constant reverse(Constant c,
ConstantReflectionProvider constantReflection)
reverse in interface ConvertNodepublic Stamp foldStamp(Stamp newStamp)
UnaryNodeUnaryNode.value. This code is used to provide the default
implementation of UnaryNode.inferStamp() and may be used by external optimizations.public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue)
Canonicalizable.UnaryCanonicalizable.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.Unary<ValueNode>protected static <T> ValueNode findSynonym(ArithmeticOpTable.IntegerConvertOp<T> operation, ValueNode value, int inputBits, int resultBits, Stamp stamp)
public static ValueNode convert(ValueNode input, Stamp stamp, StructuredGraph graph, NodeView view)
public static ValueNode convert(ValueNode input, Stamp stamp, boolean zeroExtend, StructuredGraph graph, NodeView view)
public static ValueNode convert(ValueNode input, Stamp stamp, boolean zeroExtend, StructuredGraph graph, NodeView view, boolean gvn)
public static ValueNode convertUnsigned(ValueNode input, Stamp stamp, NodeView view)
public static ValueNode convertUnsigned(ValueNode input, Stamp stamp, StructuredGraph graph, NodeView view)
public static ValueNode convert(ValueNode input, Stamp stamp, boolean zeroExtend, NodeView view)
public Stamp invertStamp(Stamp outStamp)
StampInverterinvertStamp in interface StampInverter