|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.copernicus.java.HSPortInliner
public class HSPortInliner
A class that inlines methods on ports for HS models. This class creates a set of appropriately sized circular buffers for each channel in a particular composite actor. These buffers are referred to by static fields of the model. Inside each actor in the composite, an array of integer indexes into the circular buffer is generated for each port. Port method invocations where the channel index can be statically determined are replaced with references to the appropriate buffer in the model, and an index update instructions for the appropriate index in the actor. In cases where the channel cannot be statically determined for a given invocation point, e.g. a for loop over all of the channels of a trigger input port to read and discard the data, a second reference to each buffer exists in the actors. These references are in a array that can be indexed by the channel of a port, and are called "buffer references". Additionally, index fields and buffer references are also created for each port in the model for handling "inside" port methods... FIXME: currently we try to speed things up if the buffersize is only one by removing the index update overhead. Note that there are other optimizations that can be made here (for instance, if we can statically determine all the channel references (which is trivially true if there is only one channel), then there is no need to have the index or portbuffer arrays.
Red (cxh) |
Red (cxh) |
Constructor Summary | |
---|---|
HSPortInliner(soot.SootClass modelClass,
CompositeActor model,
java.util.Map options)
Construct a new transformer |
Method Summary | |
---|---|
void |
initialize()
Initialize the inliner. |
void |
inlineBroadcast(soot.jimple.JimpleBody body,
soot.jimple.Stmt stmt,
soot.jimple.InvokeExpr expr,
TypedIOPort port)
Replace the broadcast invocation in the given box at the given unit in the given body with a circular array reference. |
void |
inlineGet(soot.jimple.JimpleBody body,
soot.jimple.Stmt stmt,
soot.ValueBox box,
soot.jimple.InvokeExpr expr,
TypedIOPort port)
Replace the get invocation in the given box at the given unit in the given body with a circular array reference. |
void |
inlineGetInside(soot.jimple.JimpleBody body,
soot.jimple.Stmt stmt,
soot.ValueBox box,
soot.jimple.InvokeExpr expr,
TypedIOPort port)
Replace the getInside invocation in the given box at the given unit in the given body with a circular array reference. |
void |
inlineSend(soot.jimple.JimpleBody body,
soot.jimple.Stmt stmt,
soot.jimple.InvokeExpr expr,
TypedIOPort port)
Replace the send command at the given unit in the given body with a circular array reference. |
void |
inlineSendInside(soot.jimple.JimpleBody body,
soot.jimple.Stmt stmt,
soot.jimple.InvokeExpr expr,
TypedIOPort port)
Replace the send command at the given unit in the given body with a circular array reference. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HSPortInliner(soot.SootClass modelClass, CompositeActor model, java.util.Map options)
Method Detail |
---|
public void initialize()
initialize
in interface PortInliner
public void inlineBroadcast(soot.jimple.JimpleBody body, soot.jimple.Stmt stmt, soot.jimple.InvokeExpr expr, TypedIOPort port)
inlineBroadcast
in interface PortInliner
public void inlineGet(soot.jimple.JimpleBody body, soot.jimple.Stmt stmt, soot.ValueBox box, soot.jimple.InvokeExpr expr, TypedIOPort port)
inlineGet
in interface PortInliner
public void inlineGetInside(soot.jimple.JimpleBody body, soot.jimple.Stmt stmt, soot.ValueBox box, soot.jimple.InvokeExpr expr, TypedIOPort port)
inlineGetInside
in interface PortInliner
public void inlineSend(soot.jimple.JimpleBody body, soot.jimple.Stmt stmt, soot.jimple.InvokeExpr expr, TypedIOPort port)
inlineSend
in interface PortInliner
public void inlineSendInside(soot.jimple.JimpleBody body, soot.jimple.Stmt stmt, soot.jimple.InvokeExpr expr, TypedIOPort port)
inlineSendInside
in interface PortInliner
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |