public class InliningData extends Object
The space of inlining decisions is explored depth-first with the help of a stack realized by
InliningData. At any point in time, the topmost element of that stack consists of:
MethodInvocation.CallsiteHolders, all of them associated to the callsite above. Why more
than one? Depending on the type-profile for the receiver more than one concrete method may be
feasible target.The bottom element in the stack consists of:
MethodInvocation (the
root one, ie
the unknown caller of the root graph)CallsiteHolder (the root one, for the method on which inlining was called)
InliningData.moveForward()| Constructor and Description |
|---|
InliningData(StructuredGraph rootGraph,
HighTierContext context,
int maxMethodPerInlining,
CanonicalizerPhase canonicalizer,
InliningPolicy inliningPolicy,
LinkedList<Invoke> rootInvokes) |
| Modifier and Type | Method and Description |
|---|---|
int |
countRecursiveInlining(ResolvedJavaMethod method) |
static BitSet |
freshlyInstantiatedArguments(Invoke invoke,
org.graalvm.collections.EconomicSet<ParameterNode> fixedParams)
Gets the freshly instantiated arguments.
|
Collection<StackTraceElement> |
getInvocationStackTrace()
Gets a stack trace representing the current inlining stack represented by this object.
|
int |
graphCount() |
boolean |
hasUnprocessedGraphs() |
int |
inliningDepth() |
static boolean |
isFreshInstantiation(ValueNode arg) |
boolean |
moveForward()
The stack realized by
InliningData grows and shrinks as choices are made among the
alternatives below:
not worth inlining: pop stack top, which comprises:
pop any remaining graphs not yet delved into
pop the current invocation
delve into one of the callsites hosted in the current graph,
such callsite is explored next by InliningData.moveForward()
try to inline: move past the current graph
(remove it from the topmost element). |
boolean |
repOK()
This method checks invariants for this class.
|
String |
toString() |
public InliningData(StructuredGraph rootGraph, HighTierContext context, int maxMethodPerInlining, CanonicalizerPhase canonicalizer, InliningPolicy inliningPolicy, LinkedList<Invoke> rootInvokes)
public static boolean isFreshInstantiation(ValueNode arg)
public static BitSet freshlyInstantiatedArguments(Invoke invoke, org.graalvm.collections.EconomicSet<ParameterNode> fixedParams)
A freshly instantiated argument is either:
InliningData.isFreshInstantiation(org.graalvm.compiler.nodes.ValueNode)ParameterNode receiving a freshly instantiated argumentinvoke, or null if no such positions exist.public int graphCount()
public boolean hasUnprocessedGraphs()
public int countRecursiveInlining(ResolvedJavaMethod method)
public int inliningDepth()
public Collection<StackTraceElement> getInvocationStackTrace()
public boolean moveForward()
The stack realized by InliningData grows and shrinks as choices are made among the
alternatives below:
delve into one of the callsites hosted in the current graph,
such callsite is explored next by InliningData.moveForward()try to inline: move past the current graph
(remove it from the topmost element).
try to inline
the callsite under consideration (ie, the "current invocation").InliningData .Some facts about the alternatives above:
InliningPolicy.isWorthInlining(org.graalvm.compiler.nodes.spi.Replacements, org.graalvm.compiler.phases.common.inlining.walker.MethodInvocation, org.graalvm.compiler.phases.common.inlining.info.InlineInfo, int, boolean) and InliningPolicy.continueInlining(org.graalvm.compiler.nodes.StructuredGraph).public boolean repOK()