public class TruffleInlining extends Object implements Iterable<TruffleInliningDecision>
Modifier and Type | Class and Description |
---|---|
private static class |
TruffleInlining.CallTreeNodeIterator |
static interface |
TruffleInlining.CallTreeNodeVisitor
This visitor extends the
NodeVisitor interface to be usable for traversing the full
call tree. |
private static class |
TruffleInlining.CallTreeNodeVisitorImpl
This visitor wraps an existing
NodeVisitor or TruffleInlining.CallTreeNodeVisitor and
traverses the full Truffle tree including inlined call sites. |
Modifier and Type | Field and Description |
---|---|
private List<TruffleInliningDecision> |
callSites |
Modifier | Constructor and Description |
---|---|
protected |
TruffleInlining(List<TruffleInliningDecision> callSites) |
|
TruffleInlining(OptimizedCallTarget sourceTarget,
TruffleInliningPolicy policy) |
Modifier and Type | Method and Description |
---|---|
void |
accept(OptimizedCallTarget target,
com.oracle.truffle.api.nodes.NodeVisitor visitor)
Visits all nodes of the
CallTarget and all of its inlined calls. |
private static double |
calculateFrequency(OptimizedCallTarget target,
OptimizedDirectCallNode ocn) |
int |
countCalls() |
int |
countInlinedCalls() |
private static int |
countRecursions(List<OptimizedCallTarget> stack) |
private static List<TruffleInliningDecision> |
createDecisions(OptimizedCallTarget sourceTarget,
TruffleInliningPolicy policy,
com.oracle.truffle.api.CompilerOptions options) |
private static List<TruffleInliningDecision> |
decideInlining(List<TruffleInliningDecision> callSites,
TruffleInliningPolicy policy,
int nodeCount,
com.oracle.truffle.api.CompilerOptions options) |
private static TruffleInliningDecision |
exploreCallSite(List<OptimizedCallTarget> callStack,
int callStackNodeCount,
TruffleInliningPolicy policy,
OptimizedDirectCallNode callNode) |
private static List<TruffleInliningDecision> |
exploreCallSites(List<OptimizedCallTarget> stack,
int callStackNodeCount,
TruffleInliningPolicy policy) |
TruffleInliningDecision |
findByCall(OptimizedDirectCallNode callNode) |
List<TruffleInliningDecision> |
getCallSites() |
int |
getInlinedNodeCount() |
Iterator<TruffleInliningDecision> |
iterator() |
Iterator<com.oracle.truffle.api.nodes.Node> |
makeNodeIterator(OptimizedCallTarget target)
Creates an iterator for all nodes of the
CallTarget and all of its inlined calls. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
private final List<TruffleInliningDecision> callSites
protected TruffleInlining(List<TruffleInliningDecision> callSites)
public TruffleInlining(OptimizedCallTarget sourceTarget, TruffleInliningPolicy policy)
private static List<TruffleInliningDecision> createDecisions(OptimizedCallTarget sourceTarget, TruffleInliningPolicy policy, com.oracle.truffle.api.CompilerOptions options)
private static List<TruffleInliningDecision> exploreCallSites(List<OptimizedCallTarget> stack, int callStackNodeCount, TruffleInliningPolicy policy)
private static TruffleInliningDecision exploreCallSite(List<OptimizedCallTarget> callStack, int callStackNodeCount, TruffleInliningPolicy policy, OptimizedDirectCallNode callNode)
private static double calculateFrequency(OptimizedCallTarget target, OptimizedDirectCallNode ocn)
private static int countRecursions(List<OptimizedCallTarget> stack)
private static List<TruffleInliningDecision> decideInlining(List<TruffleInliningDecision> callSites, TruffleInliningPolicy policy, int nodeCount, com.oracle.truffle.api.CompilerOptions options)
public int getInlinedNodeCount()
public int countCalls()
public int countInlinedCalls()
public final List<TruffleInliningDecision> getCallSites()
public Iterator<TruffleInliningDecision> iterator()
iterator
in interface Iterable<TruffleInliningDecision>
public TruffleInliningDecision findByCall(OptimizedDirectCallNode callNode)
public void accept(OptimizedCallTarget target, com.oracle.truffle.api.nodes.NodeVisitor visitor)
CallTarget
and all of its inlined calls.public Iterator<com.oracle.truffle.api.nodes.Node> makeNodeIterator(OptimizedCallTarget target)
CallTarget
and all of its inlined calls.