public abstract class CompressionNode extends UnaryNode implements ConvertNode, LIRLowerable
Modifier and Type | Class and Description |
---|---|
static class |
CompressionNode.CompressionOp |
Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Canonicalizable.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 CompressEncoding |
encoding |
protected CompressionNode.CompressionOp |
op |
static NodeClass<CompressionNode> |
TYPE |
EMPTY_ARRAY, stamp
NODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges
Constructor and Description |
---|
CompressionNode(NodeClass<? extends UnaryNode> c,
CompressionNode.CompressionOp op,
ValueNode input,
Stamp stamp,
CompressEncoding encoding) |
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. |
protected abstract Constant |
compress(Constant c) |
Constant |
convert(Constant c,
ConstantReflectionProvider constantReflection) |
Stamp |
foldStamp(Stamp newStamp)
Compute an improved for this node using the passed in stamp.
|
void |
generate(NodeLIRBuilderTool gen) |
CompressEncoding |
getEncoding() |
CompressionNode.CompressionOp |
getOp() |
boolean |
isLossless()
Check whether a conversion is lossless.
|
boolean |
mayNullCheckSkipConversion()
Checks whether a null check may skip the conversion.
|
protected abstract Stamp |
mkStamp(Stamp input) |
JavaConstant |
nullConstant() |
Constant |
reverse(Constant c,
ConstantReflectionProvider constantReflection) |
abstract ValueNode |
reverse(ValueNode input)
|
protected abstract Constant |
uncompress(Constant c) |
getValue, inferStamp, setValue
asConstant, asJavaConstant, asNode, asSerializableConstant, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, recursivelyDataFlowEqualsUpTo, setStamp, stamp, updateStamp, updateUsagesInterface
afterClone, 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, hasExactlyOneUsageOfType, 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, withNodeSourcePosition
clone, equals, getClass, notify, notifyAll, wait, wait, wait
getValue, preservesOrder, preservesOrder
asNode
canonical
public static final NodeClass<CompressionNode> TYPE
protected final CompressionNode.CompressionOp op
protected final CompressEncoding encoding
public CompressionNode(NodeClass<? extends UnaryNode> c, CompressionNode.CompressionOp op, ValueNode input, Stamp stamp, CompressEncoding encoding)
public Stamp foldStamp(Stamp newStamp)
UnaryNode
UnaryNode.value
. This code is used to provide the default
implementation of UnaryNode.inferStamp()
and may be used by external optimizations.protected abstract Constant compress(Constant c)
protected abstract Constant uncompress(Constant c)
public JavaConstant nullConstant()
public Constant convert(Constant c, ConstantReflectionProvider constantReflection)
convert
in interface ConvertNode
public Constant reverse(Constant c, ConstantReflectionProvider constantReflection)
reverse
in interface ConvertNode
public boolean isLossless()
ConvertNode
isLossless
in interface ConvertNode
public CompressionNode.CompressionOp getOp()
public CompressEncoding getEncoding()
public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue)
Canonicalizable.Unary
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.canonical
in interface Canonicalizable.Unary<ValueNode>
public void generate(NodeLIRBuilderTool gen)
generate
in interface LIRLowerable
public boolean mayNullCheckSkipConversion()
ConvertNode
mayNullCheckSkipConversion
in interface ConvertNode