Modifier and Type | Class and Description |
---|---|
private static class |
GraphUtil.DefaultSimplifierTool |
(package private) static class |
GraphUtil.OriginalValueSearch
Exhaustive search for
originalValue(ValueNode) when a simple search fails. |
Modifier and Type | Field and Description |
---|---|
private static NodePredicate |
FLOATING |
Constructor and Description |
---|
GraphUtil() |
Modifier and Type | Method and Description |
---|---|
static RuntimeException |
approxSourceException(Node node,
Throwable cause)
Gets an approximate source code location for a node, encoded as an exception, if possible.
|
static String |
approxSourceLocation(Node node)
Gets an approximate source code location for a node if possible.
|
static StackTraceElement[] |
approxSourceStackTraceElement(FrameState frameState)
Gets an approximate source code location for frame state.
|
static StackTraceElement[] |
approxSourceStackTraceElement(Node node)
Gets an approximate source code location for a node if possible.
|
static ValueNode |
arrayLength(ValueNode value)
Looks for an
ArrayLengthProvider while iterating through all ValueProxies . |
static void |
checkRedundantPhi(PhiNode phiNode) |
static void |
checkRedundantProxy(ProxyNode vpn) |
static BailoutException |
createBailoutException(String message,
Throwable cause,
StackTraceElement[] elements)
Creates a bailout exception with the given stack trace elements and message.
|
static SimplifierTool |
getDefaultSimplifier(MetaAccessProvider metaAccess,
ConstantReflectionProvider constantReflection,
boolean canonicalizeReads) |
static NodePredicate |
isFloatingNode() |
static void |
killCFG(Node node) |
static void |
killCFG(Node node,
SimplifierTool tool) |
private static void |
killEnd(AbstractEndNode end,
SimplifierTool tool) |
static void |
killWithUnusedFloatingInputs(Node node) |
private static void |
normalizeLoopBegin(LoopBeginNode begin) |
static void |
normalizeLoops(StructuredGraph graph)
Remove loop header without loop ends.
|
static ValueNode |
originalValue(ValueNode proxy)
Tries to find an original value of the given node by traversing through proxies and
unambiguous phis.
|
static NodeIterable<FixedNode> |
predecessorIterable(FixedNode start)
Returns an iterator that will return the given node followed by all its predecessors, up
until the point where
Node.predecessor() returns null. |
private static void |
propagateKill(Node node) |
static void |
removeFixedWithUnusedInputs(FixedWithNextNode fixed) |
static String |
toString(Iterable<?> objects)
Returns a string representation of the given collection of objects.
|
static boolean |
tryKillUnused(Node node) |
static void |
unlinkFixedNode(FixedWithNextNode fixed) |
static ValueNode |
unproxify(ValueNode value)
Gets the original value by iterating through all
ValueProxies . |
private static final NodePredicate FLOATING
public GraphUtil()
public static void killCFG(Node node, SimplifierTool tool)
private static void killEnd(AbstractEndNode end, SimplifierTool tool)
public static NodePredicate isFloatingNode()
private static void propagateKill(Node node)
public static void killWithUnusedFloatingInputs(Node node)
public static void removeFixedWithUnusedInputs(FixedWithNextNode fixed)
public static void unlinkFixedNode(FixedWithNextNode fixed)
public static void checkRedundantPhi(PhiNode phiNode)
public static void checkRedundantProxy(ProxyNode vpn)
public static void normalizeLoops(StructuredGraph graph)
for (;;) { try { break; } catch (UnresolvedException iioe) { } }
private static void normalizeLoopBegin(LoopBeginNode begin)
public static StackTraceElement[] approxSourceStackTraceElement(Node node)
public static StackTraceElement[] approxSourceStackTraceElement(FrameState frameState)
public static RuntimeException approxSourceException(Node node, Throwable cause)
public static BailoutException createBailoutException(String message, Throwable cause, StackTraceElement[] elements)
message
- the message of the exceptionelements
- the stack trace elementspublic static String approxSourceLocation(Node node)
public static String toString(Iterable<?> objects)
objects
- The Iterable
that will be used to iterate over the objects.public static ValueNode unproxify(ValueNode value)
ValueProxies
.value
- The start value.public static ValueNode arrayLength(ValueNode value)
ArrayLengthProvider
while iterating through all ValueProxies
.value
- The start value.public static ValueNode originalValue(ValueNode proxy)
proxy
- The node whose original value should be determined.public static boolean tryKillUnused(Node node)
public static NodeIterable<FixedNode> predecessorIterable(FixedNode start)
Node.predecessor()
returns null.start
- the node at which to start iteratingpublic static SimplifierTool getDefaultSimplifier(MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection, boolean canonicalizeReads)