public final class CallsiteHolderExplorable extends CallsiteHolder
A CallsiteHolder
whose graph has been copied already and thus can be modified without
affecting the original (usually cached) version.
An instance of this class is derived from an
InlineableGraph
and
contains a subset of the information there: just the Invoke
nodes from it. Such nodes are
candidates for depth-first search of further inlining opportunities (thus the adjective
"explorable" given to this class)
InliningData.moveForward()
Modifier and Type | Field and Description |
---|---|
private ComputeInliningRelevance |
computeInliningRelevance |
private Set<ParameterNode> |
fixedParams |
private StructuredGraph |
graph
Graph in which inlining may be performed at one or more of the callsites containined in
remainingInvokes . |
private ToDoubleFunction<FixedNode> |
probabilities |
private double |
probability |
private double |
relevance |
private LinkedList<Invoke> |
remainingInvokes |
Constructor and Description |
---|
CallsiteHolderExplorable(StructuredGraph graph,
double probability,
double relevance,
BitSet freshlyInstantiatedArguments) |
Modifier and Type | Method and Description |
---|---|
static boolean |
allArgsNonNull(Invoke invoke) |
void |
computeProbabilities() |
boolean |
containsInvoke(Invoke invoke) |
boolean |
containsParam(ParameterNode param) |
private Set<ParameterNode> |
fixedParamsAt(BitSet freshlyInstantiatedArguments) |
Set<ParameterNode> |
getFixedParams()
Parameters for which the callsite targeting
graph() provides "fixed" arguments. |
StructuredGraph |
graph()
The graph about which this object contains inlining information.
|
boolean |
hasRemainingInvokes()
The stack realized by
InliningData grows upon InliningData.moveForward()
deciding to explore (depth-first) a callsite of the graph associated to this
CallsiteHolder . |
double |
invokeProbability(Invoke invoke) |
double |
invokeRelevance(Invoke invoke) |
ResolvedJavaMethod |
method()
Gets the method associated with the graph represented by this object.
|
Invoke |
popInvoke() |
void |
pushInvoke(Invoke invoke) |
boolean |
repOK() |
String |
toString() |
private final StructuredGraph graph
remainingInvokes
.private final LinkedList<Invoke> remainingInvokes
private final double probability
private final double relevance
private final Set<ParameterNode> fixedParams
getFixedParams()
private final ToDoubleFunction<FixedNode> probabilities
private final ComputeInliningRelevance computeInliningRelevance
public CallsiteHolderExplorable(StructuredGraph graph, double probability, double relevance, BitSet freshlyInstantiatedArguments)
private Set<ParameterNode> fixedParamsAt(BitSet freshlyInstantiatedArguments)
getFixedParams()
public Set<ParameterNode> getFixedParams()
Parameters for which the callsite targeting graph()
provides "fixed" arguments. That
callsite isn't referenced by this instance. Instead, it belongs to the graph of the caller of
this CallsiteHolderExplorable
Constant arguments don't contribute to fixed-params: those params have been removed already,
see InlineableGraph
.
Instead, fixed-params are those receiving freshly instantiated arguments (possibly instantiated several levels up in the call-hierarchy)
public boolean repOK()
public ResolvedJavaMethod method()
CallsiteHolder
method
in class CallsiteHolder
public boolean hasRemainingInvokes()
CallsiteHolder
InliningData
grows upon InliningData.moveForward()
deciding to explore (depth-first) a callsite of the graph associated to this
CallsiteHolder
. The list of not-yet-considered callsites is managed by
CallsiteHolderExplorable
, and this method reports whether any such candidates remain.hasRemainingInvokes
in class CallsiteHolder
public StructuredGraph graph()
CallsiteHolder
graph
in class CallsiteHolder
public void pushInvoke(Invoke invoke)
public static boolean allArgsNonNull(Invoke invoke)
public boolean containsInvoke(Invoke invoke)
public boolean containsParam(ParameterNode param)
public void computeProbabilities()
public double invokeProbability(Invoke invoke)
public double invokeRelevance(Invoke invoke)