public abstract class OptimizedOSRLoopNode
extends com.oracle.truffle.api.nodes.LoopNode
implements com.oracle.truffle.api.ReplaceObserver
| Modifier and Type | Class and Description |
|---|---|
static class |
OptimizedOSRLoopNode.OSRRootNode |
| Modifier and Type | Method and Description |
|---|---|
com.oracle.truffle.api.nodes.Node |
copy() |
static com.oracle.truffle.api.nodes.LoopNode |
create(com.oracle.truffle.api.nodes.RepeatingNode repeat)
Creates the default loop node implementation with the default configuration.
|
static OptimizedOSRLoopNode |
createOSRLoop(com.oracle.truffle.api.nodes.RepeatingNode repeating,
int osrThreshold,
com.oracle.truffle.api.frame.FrameSlot[] readFrameSlots,
com.oracle.truffle.api.frame.FrameSlot[] writtenFrameSlots)
Creates a configurable instance of the OSR loop node.
|
protected OptimizedOSRLoopNode.OSRRootNode |
createRootNode(com.oracle.truffle.api.frame.FrameDescriptor rootFrameDescriptor,
Class<? extends com.oracle.truffle.api.frame.VirtualFrame> clazz) |
Object |
execute(com.oracle.truffle.api.frame.VirtualFrame frame) |
void |
executeLoop(com.oracle.truffle.api.frame.VirtualFrame frame) |
void |
forceOSR()
Forces OSR compilation for this loop.
|
OptimizedCallTarget |
getCompiledOSRLoop() |
com.oracle.truffle.api.nodes.RepeatingNode |
getRepeatingNode() |
boolean |
nodeReplaced(com.oracle.truffle.api.nodes.Node oldNode,
com.oracle.truffle.api.nodes.Node newNode,
CharSequence reason) |
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, lookupContextReference, lookupLanguageReference, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, toStringprotected OptimizedOSRLoopNode.OSRRootNode createRootNode(com.oracle.truffle.api.frame.FrameDescriptor rootFrameDescriptor, Class<? extends com.oracle.truffle.api.frame.VirtualFrame> clazz)
rootFrameDescriptor - may be null.public final com.oracle.truffle.api.nodes.Node copy()
copy in class com.oracle.truffle.api.nodes.Nodepublic final com.oracle.truffle.api.nodes.RepeatingNode getRepeatingNode()
getRepeatingNode in class com.oracle.truffle.api.nodes.LoopNodepublic void executeLoop(com.oracle.truffle.api.frame.VirtualFrame frame)
executeLoop in class com.oracle.truffle.api.nodes.LoopNodepublic Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
execute in class com.oracle.truffle.api.nodes.LoopNodepublic final void forceOSR()
public final OptimizedCallTarget getCompiledOSRLoop()
public final boolean nodeReplaced(com.oracle.truffle.api.nodes.Node oldNode,
com.oracle.truffle.api.nodes.Node newNode,
CharSequence reason)
nodeReplaced in interface com.oracle.truffle.api.ReplaceObserverpublic static com.oracle.truffle.api.nodes.LoopNode create(com.oracle.truffle.api.nodes.RepeatingNode repeat)
OptimizedLoopNode will be used instead.public static OptimizedOSRLoopNode createOSRLoop(com.oracle.truffle.api.nodes.RepeatingNode repeating, int osrThreshold, com.oracle.truffle.api.frame.FrameSlot[] readFrameSlots, com.oracle.truffle.api.frame.FrameSlot[] writtenFrameSlots)
Creates a configurable instance of the OSR loop node. If readFrameSlots and writtenFrameSlots
are set then the involved frame must never escape, ie Frame.materialize() is
never invoked.
Important note: All readFrameSlots that are given must be initialized before entering the loop. Also all writtenFrameSlots must be initialized inside of the loop if they were not initialized outside the loop.
repeating - the repeating node to use for this loop.osrThreshold - the threshold after how many loop iterations an OSR compilation is
triggered. If the repeating node uses child loops or
LoopNode.reportLoopCount(Node, int) then these iterations also contribute
to this loop's iterations.readFrameSlots - a set of all frame slots which are read inside the loop.
null for unknown. All given frame slots must not have the
illegal frame slot kind set. If readFrameSlot is
kept null writtenFrameSlots must be null as well.writtenFrameSlots - a set of all frame slots which are written inside the loop.
null for unknown. All given frame slots must not have the
illegal frame slot kind set. If readFrameSlot is
kept null writtenFRameSlots must be null as well.LoopNode on how to use loop nodes.