Class SignExtendNode
- All Implemented Interfaces:
Cloneable
,Formattable
,Node.IndirectInputChangedCanonicalization
,Node.ValueNumberable
,CanonicalizableMarker
,ArithmeticOperation
,ConvertNode
,ArithmeticLIRLowerable
,Canonicalizable
,Canonicalizable.Unary<ValueNode>
,LIRLowerable
,StampInverter
,ValueNodeInterface
public final class SignExtendNode
extends IntegerConvertNode<ArithmeticOpTable.IntegerConvertOp.SignExtend>
The
SignExtendNode
converts an integer to a wider integer using sign extension.
On all supported architectures, sub-word (<32 bit) operations generally do not yield
performance improvements. They can even be slower than 32 bit operations. Thus, nodes extending
<32 bit values to 32 bit or more should usually not be removed.-
Nested Class Summary
Nested classes/interfaces inherited from class jdk.graal.compiler.graph.Node
Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectInputChangedCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.InputsChangedCanonicalization, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Nested classes/interfaces inherited from interface jdk.graal.compiler.nodes.spi.Canonicalizable
Canonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Ternary<T extends Node>, Canonicalizable.Unary<T extends Node>
-
Field Summary
FieldsFields inherited from class jdk.graal.compiler.nodes.calc.IntegerConvertNode
inputBits, resultBits
Fields inherited from class jdk.graal.compiler.nodes.ValueNode
EMPTY_ARRAY, stamp
Fields inherited from class jdk.graal.compiler.graph.Node
NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithOnlyInputEdges
-
Constructor Summary
ConstructorsConstructorDescriptionSignExtendNode
(ValueNode input, int resultBits) SignExtendNode
(ValueNode input, int inputBits, int resultBits) -
Method Summary
Modifier and TypeMethodDescriptioncanonical
(CanonicalizerTool tool, ValueNode forValue) Similar toCanonicalizable.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
static ValueNode
void
generate
(NodeLIRBuilderTool nodeValueMap, ArithmeticLIRGeneratorTool gen) getOp
(ArithmeticOpTable table) getReverseOp
(ArithmeticOpTable table) boolean
Check whether a conversion is lossless.boolean
Checks whether a null check may skip the conversion.Methods inherited from class jdk.graal.compiler.nodes.calc.IntegerConvertNode
convert, convert, convert, convert, convert, convert, convertUnsigned, convertUnsigned, findSynonym, foldStamp, getArithmeticOp, getInputBits, getResultBits, invertStamp, reverse
Methods inherited from class jdk.graal.compiler.nodes.calc.UnaryNode
getValue, inferStamp, setValue
Methods inherited from class jdk.graal.compiler.nodes.ValueNode
asConstant, asJavaConstant, asNode, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, recursivelyDataFlowEqualsUpTo, setStamp, stamp, updateStamp, updateUsagesInterface
Methods inherited from class jdk.graal.compiler.graph.Node
afterClone, applyInputs, applySuccessors, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearNodeSourcePosition, clearSuccessors, copyWithInputs, copyWithInputs, dataFlowEquals, dynamicNodeSizeEstimate, estimatedNodeCycles, estimatedNodeSize, fail, formatTo, getCreationPosition, getDebug, getDebugProperties, getDebugProperties, getId, getIdBeforeDeletion, getInsertionPosition, getNodeClass, getNodeSourcePosition, getOptions, getUsageCount, hasExactlyOneUsage, hasExactlyOneUsageOfType, hashCode, hasMoreThanOneUsage, hasNoUsages, hasUsages, inputPositions, inputs, isAlive, isDeleted, isUnregistered, markDeleted, maybeNotifyZeroUsages, modCount, predecessor, pushInputs, removeDeadUsages, removeUsage, removeUsages, replaceAllInputs, replaceAndDelete, replaceAtAllUsages, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, singleUsage, successorPositions, successors, toString, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, usages, valueEquals, verify, verify, verifyEdges, verifyInputs, verifyNode, withNodeSourcePosition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface jdk.graal.compiler.nodes.spi.ArithmeticLIRLowerable
generate
Methods inherited from interface jdk.graal.compiler.nodes.spi.Canonicalizable.Unary
canonical
Methods inherited from interface jdk.graal.compiler.nodes.calc.ConvertNode
getValue, preservesOrder, preservesOrder
Methods inherited from interface jdk.graal.compiler.nodes.spi.StampInverter
getValue
Methods inherited from interface jdk.graal.compiler.nodes.ValueNodeInterface
asNode
-
Field Details
-
TYPE
-
-
Constructor Details
-
SignExtendNode
-
SignExtendNode
-
-
Method Details
-
create
-
create
-
getOp
protected ArithmeticOpTable.IntegerConvertOp<ArithmeticOpTable.IntegerConvertOp.SignExtend> getOp(ArithmeticOpTable table) - Specified by:
getOp
in classIntegerConvertNode<ArithmeticOpTable.IntegerConvertOp.SignExtend>
-
getReverseOp
protected ArithmeticOpTable.IntegerConvertOp<ArithmeticOpTable.IntegerConvertOp.Narrow> getReverseOp(ArithmeticOpTable table) - Specified by:
getReverseOp
in classIntegerConvertNode<ArithmeticOpTable.IntegerConvertOp.SignExtend>
-
isLossless
public boolean isLossless()Description copied from interface:ConvertNode
Check whether a conversion is lossless.- Returns:
- true iff reverse(convert(c)) == c for all c
-
canonical
Description copied from interface:Canonicalizable.Unary
Similar toCanonicalizable.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.- Specified by:
canonical
in interfaceCanonicalizable.Unary<ValueNode>
- Overrides:
canonical
in classIntegerConvertNode<ArithmeticOpTable.IntegerConvertOp.SignExtend>
-
generate
-
mayNullCheckSkipConversion
public boolean mayNullCheckSkipConversion()Description copied from interface:ConvertNode
Checks whether a null check may skip the conversion. This is true only if the conversion does not impact the result of the isNullNode, i.e., isNull(input) === isNull(convert(input)).- Returns:
- whether a null check may skip the conversion
-