public class InliningUtil extends Object
Modifier and Type | Field and Description |
---|---|
private static String |
inliningDecisionsScopeString |
private static ValueNode[] |
NO_ARGS |
Constructor and Description |
---|
InliningUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canIntrinsify(Replacements replacements,
ResolvedJavaMethod target,
int invokeBci) |
private static boolean |
checkContainsOnlyInvalidOrAfterFrameState(Map<Node,Node> duplicates) |
(package private) static boolean |
checkInlineeFrameState(Invoke invoke,
ResolvedJavaMethod inlinedMethod,
FrameState frameState) |
static String |
checkInvokeConditions(Invoke invoke) |
static GuardedValueNode |
createAnchoredReceiver(StructuredGraph graph,
GuardingNode anchor,
ResolvedJavaType commonType,
ValueNode receiver,
boolean exact) |
private static GuardedValueNode |
createAnchoredReceiver(StructuredGraph graph,
GuardingNode anchor,
ValueNode receiver,
Stamp stamp) |
private static FixedWithNextNode |
createMacroNodeInstance(Class<? extends FixedWithNextNode> macroNodeClass,
Invoke invoke) |
static ValueNode |
finishInlining(Invoke invoke,
StructuredGraph graph,
FixedNode firstNode,
List<ReturnNode> returnNodes,
UnwindNode unwindNode,
Assumptions inlinedAssumptions,
StructuredGraph inlineGraph,
List<Node> canonicalizedNodes) |
private static String |
formatGraph(StructuredGraph graph) |
static StructuredGraph |
getIntrinsicGraph(Replacements replacements,
ResolvedJavaMethod target,
int invokeBci) |
protected static FrameState |
handleMissingAfterExceptionFrameState(FrameState nonReplaceableFrameState) |
static Map<Node,Node> |
inline(Invoke invoke,
StructuredGraph inlineGraph,
boolean receiverNullCheck,
List<Node> canonicalizedNodes)
Performs an actual inlining, thereby replacing the given invoke with the given inlineGraph.
|
static FixedWithNextNode |
inlineMacroNode(Invoke invoke,
ResolvedJavaMethod concrete,
Class<? extends FixedWithNextNode> macroNodeClass) |
private static boolean |
isStateAfterException(FrameState frameState) |
static void |
logInlinedMethod(InlineInfo info,
int inliningDepth,
boolean allowLogging,
String msg,
Object... args) |
static void |
logInliningDecision(InlineInfo info,
int inliningDepth,
boolean allowLogging,
boolean success,
String msg,
Object... args) |
private static void |
logInliningDecision(String methodString,
boolean success,
String msg,
Object... args) |
static void |
logInliningDecision(String msg,
Object... args) |
static void |
logNotInlined(Invoke invoke,
int inliningDepth,
ResolvedJavaMethod method,
String msg) |
static void |
logNotInlinedInvoke(Invoke invoke,
int inliningDepth,
ResolvedJavaMethod method,
String msg,
Object... args) |
static void |
logNotInlinedMethod(InlineInfo info,
int inliningDepth,
String msg,
Object... args) |
static void |
logNotInlinedMethod(Invoke invoke,
String msg) |
static ValueNode |
mergeReturns(AbstractMergeNode merge,
List<? extends ReturnNode> returnNodes,
List<Node> canonicalizedNodes) |
private static String |
methodName(FrameState frameState,
int bci) |
private static String |
methodName(InlineInfo info) |
private static String |
methodName(ResolvedJavaMethod method,
Invoke invoke) |
static ValueNode |
nonNullReceiver(Invoke invoke)
Gets the receiver for an invoke, adding a guard if necessary to ensure it is non-null, and
ensuring that the resulting type is compatible with the method being invoked.
|
private static void |
printInlining(InlineInfo info,
int inliningDepth,
boolean success,
String msg,
Object... args)
Print a HotSpot-style inlining message to the console.
|
private static void |
printInlining(ResolvedJavaMethod method,
Invoke invoke,
int inliningDepth,
boolean success,
String msg,
Object... args)
Print a HotSpot-style inlining message to the console.
|
static BytecodePosition |
processBytecodePosition(Invoke invoke,
BytecodePosition incomingPos) |
static FrameState |
processFrameState(FrameState frameState,
Invoke invoke,
ResolvedJavaMethod inlinedMethod,
FrameState stateAtExceptionEdge,
FrameState outerFrameState,
boolean alwaysDuplicateStateAfter) |
protected static void |
processFrameStates(Invoke invoke,
StructuredGraph inlineGraph,
Map<Node,Node> duplicates,
FrameState stateAtExceptionEdge,
boolean alwaysDuplicateStateAfter) |
static void |
processMonitorId(FrameState stateAfter,
MonitorIdNode monitorIdNode) |
static BytecodePosition |
processSimpleInfopoint(Invoke invoke,
SimpleInfopointNode infopointNode,
BytecodePosition incomingPos) |
private static void |
processSimpleInfopoints(Invoke invoke,
StructuredGraph inlineGraph,
Map<Node,Node> duplicates) |
static void |
replaceInvokeCallTarget(Invoke invoke,
StructuredGraph graph,
CallTargetNode.InvokeKind invokeKind,
ResolvedJavaMethod targetMethod) |
static boolean |
shouldLogInliningDecision() |
private static final String inliningDecisionsScopeString
public InliningUtil()
private static void printInlining(InlineInfo info, int inliningDepth, boolean success, String msg, Object... args)
private static void printInlining(ResolvedJavaMethod method, Invoke invoke, int inliningDepth, boolean success, String msg, Object... args)
public static void logInlinedMethod(InlineInfo info, int inliningDepth, boolean allowLogging, String msg, Object... args)
public static void logNotInlinedMethod(InlineInfo info, int inliningDepth, String msg, Object... args)
public static void logInliningDecision(InlineInfo info, int inliningDepth, boolean allowLogging, boolean success, String msg, Object... args)
public static void logInliningDecision(String msg, Object... args)
public static void logNotInlinedMethod(Invoke invoke, String msg)
public static void logNotInlined(Invoke invoke, int inliningDepth, ResolvedJavaMethod method, String msg)
public static void logNotInlinedInvoke(Invoke invoke, int inliningDepth, ResolvedJavaMethod method, String msg, Object... args)
private static void logInliningDecision(String methodString, boolean success, String msg, Object... args)
public static boolean shouldLogInliningDecision()
private static String methodName(ResolvedJavaMethod method, Invoke invoke)
private static String methodName(InlineInfo info)
private static String methodName(FrameState frameState, int bci)
public static void replaceInvokeCallTarget(Invoke invoke, StructuredGraph graph, CallTargetNode.InvokeKind invokeKind, ResolvedJavaMethod targetMethod)
public static GuardedValueNode createAnchoredReceiver(StructuredGraph graph, GuardingNode anchor, ResolvedJavaType commonType, ValueNode receiver, boolean exact)
private static GuardedValueNode createAnchoredReceiver(StructuredGraph graph, GuardingNode anchor, ValueNode receiver, Stamp stamp)
public static String checkInvokeConditions(Invoke invoke)
public static Map<Node,Node> inline(Invoke invoke, StructuredGraph inlineGraph, boolean receiverNullCheck, List<Node> canonicalizedNodes)
invoke
- the invoke that will be replacedinlineGraph
- the graph that the invoke will be replaced withreceiverNullCheck
- true if a null check needs to be generated for non-static inlinings,
false if no such check is requiredcanonicalizedNodes
- if non-null then append to this list any nodes which should be
canonicalized after inliningpublic static ValueNode finishInlining(Invoke invoke, StructuredGraph graph, FixedNode firstNode, List<ReturnNode> returnNodes, UnwindNode unwindNode, Assumptions inlinedAssumptions, StructuredGraph inlineGraph, List<Node> canonicalizedNodes)
private static String formatGraph(StructuredGraph graph)
private static void processSimpleInfopoints(Invoke invoke, StructuredGraph inlineGraph, Map<Node,Node> duplicates)
public static BytecodePosition processSimpleInfopoint(Invoke invoke, SimpleInfopointNode infopointNode, BytecodePosition incomingPos)
public static BytecodePosition processBytecodePosition(Invoke invoke, BytecodePosition incomingPos)
public static void processMonitorId(FrameState stateAfter, MonitorIdNode monitorIdNode)
protected static void processFrameStates(Invoke invoke, StructuredGraph inlineGraph, Map<Node,Node> duplicates, FrameState stateAtExceptionEdge, boolean alwaysDuplicateStateAfter)
public static FrameState processFrameState(FrameState frameState, Invoke invoke, ResolvedJavaMethod inlinedMethod, FrameState stateAtExceptionEdge, FrameState outerFrameState, boolean alwaysDuplicateStateAfter)
static boolean checkInlineeFrameState(Invoke invoke, ResolvedJavaMethod inlinedMethod, FrameState frameState)
private static boolean isStateAfterException(FrameState frameState)
protected static FrameState handleMissingAfterExceptionFrameState(FrameState nonReplaceableFrameState)
public static ValueNode mergeReturns(AbstractMergeNode merge, List<? extends ReturnNode> returnNodes, List<Node> canonicalizedNodes)
private static boolean checkContainsOnlyInvalidOrAfterFrameState(Map<Node,Node> duplicates)
public static ValueNode nonNullReceiver(Invoke invoke)
public static boolean canIntrinsify(Replacements replacements, ResolvedJavaMethod target, int invokeBci)
public static StructuredGraph getIntrinsicGraph(Replacements replacements, ResolvedJavaMethod target, int invokeBci)
public static FixedWithNextNode inlineMacroNode(Invoke invoke, ResolvedJavaMethod concrete, Class<? extends FixedWithNextNode> macroNodeClass) throws JVMCIError
JVMCIError
private static FixedWithNextNode createMacroNodeInstance(Class<? extends FixedWithNextNode> macroNodeClass, Invoke invoke) throws JVMCIError
JVMCIError