public abstract class IntegerConvertNode<OP,REV> extends UnaryNode implements ConvertNode, ArithmeticLIRLowerable
IntegerConvert converts an integer to an integer of different width.| Modifier and Type | Class and Description |
|---|---|
protected static interface |
IntegerConvertNode.SerializableIntegerConvertFunction<T> |
Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberableCanonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Unary<T extends Node>| Modifier and Type | Field and Description |
|---|---|
protected IntegerConvertNode.SerializableIntegerConvertFunction<OP> |
getOp |
protected IntegerConvertNode.SerializableIntegerConvertFunction<REV> |
getReverseOp |
protected int |
inputBits |
protected int |
resultBits |
static NodeClass<IntegerConvertNode> |
TYPE |
NODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
IntegerConvertNode(NodeClass<? extends IntegerConvertNode<OP,REV>> c,
IntegerConvertNode.SerializableIntegerConvertFunction<OP> getOp,
IntegerConvertNode.SerializableIntegerConvertFunction<REV> getReverseOp,
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) |
static ValueNode |
convert(ValueNode input,
Stamp stamp,
boolean zeroExtend) |
static ValueNode |
convert(ValueNode input,
Stamp stamp,
StructuredGraph graph) |
static ValueNode |
convertUnsigned(ValueNode input,
Stamp stamp) |
protected static <T> ValueNode |
findSynonym(ArithmeticOpTable.IntegerConvertOp<T> operation,
ValueNode value,
int inputBits,
int resultBits,
Stamp stamp) |
int |
getInputBits() |
protected ArithmeticOpTable.IntegerConvertOp<OP> |
getOp(ValueNode forValue) |
int |
getResultBits() |
boolean |
inferStamp()
This method can be overridden by subclasses of
ValueNode if they need to recompute
their stamp if their inputs change. |
Constant |
reverse(Constant c,
ConstantReflectionProvider constantReflection) |
asNodeasConstant, asJavaConstant, getKind, graph, isAllowedUsageType, isConstant, isConstantPredicate, isNullConstant, setStamp, stamp, updateStampacceptInputs, acceptSuccessors, afterClone, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearSuccessors, copyWithInputs, copyWithInputs, equals, fail, formatTo, getDebugProperties, getDebugProperties, getId, getNodeClass, getUsageAt, getUsageCount, hashCode, hasNoUsages, hasUsages, inputs, isAlive, isDeleted, markDeleted, modCount, newIdentityMap, newIdentityMap, newIdentityMap, newMap, newMap, newMap, newSet, newSet, predecessor, pushInputs, removeUsage, replaceAndDelete, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceFirstInput, replaceFirstSuccessor, safeDelete, simplify, successors, toString, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verify, verifyEdges, verifyInputsclone, finalize, getClass, notify, notifyAll, wait, wait, waitasNode, getValue, isLossless, preservesOrder, preservesOrdergeneratecanonicalpublic static final NodeClass<IntegerConvertNode> TYPE
protected final IntegerConvertNode.SerializableIntegerConvertFunction<OP> getOp
protected final IntegerConvertNode.SerializableIntegerConvertFunction<REV> getReverseOp
protected final int inputBits
protected final int resultBits
protected IntegerConvertNode(NodeClass<? extends IntegerConvertNode<OP,REV>> c, IntegerConvertNode.SerializableIntegerConvertFunction<OP> getOp, IntegerConvertNode.SerializableIntegerConvertFunction<REV> getReverseOp, int inputBits, int resultBits, ValueNode input)
public int getInputBits()
public int getResultBits()
protected final ArithmeticOpTable.IntegerConvertOp<OP> getOp(ValueNode forValue)
public Constant convert(Constant c, ConstantReflectionProvider constantReflection)
convert in interface ConvertNodepublic Constant reverse(Constant c, ConstantReflectionProvider constantReflection)
reverse in interface ConvertNodepublic 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 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)
public static ValueNode convertUnsigned(ValueNode input, Stamp stamp)