.. java:import:: fr.inria.tapenade.utils ILLang .. java:import:: fr.inria.tapenade.utils TapIntList .. java:import:: fr.inria.tapenade.utils TapPair .. java:import:: fr.inria.tapenade.utils Tree FGArrow ======= .. java:package:: fr.inria.tapenade.representation :noindex: .. java:type:: public final class FGArrow An arrow in the Flow Graph. Fields ------ carry ^^^^^ .. java:field:: public Object carry :outertype: FGArrow cases ^^^^^ .. java:field:: public TapIntList cases :outertype: FGArrow destination ^^^^^^^^^^^ .. java:field:: public Block destination :outertype: FGArrow inACycle ^^^^^^^^ .. java:field:: public boolean inACycle :outertype: FGArrow Boolean which is true for arrows that go to the header of a SYNTACTIC loop, i.e. a Do loop, back from syntactically INSIDE the loop, without going through the outside of the loop. isAJumpIntoNextCase ^^^^^^^^^^^^^^^^^^^ .. java:field:: public boolean isAJumpIntoNextCase :outertype: FGArrow Boolean which is true when this arrow is a jump from a switch case to the next switch case. iter ^^^^ .. java:field:: public TapList> iter :outertype: FGArrow The "iter" field represents the effect of this FGArrow with respect to loops, i.e. the list of loops that this arrow POPs from, followed by the loop it CYCLE's in or by the list of loops it PUSH'es into. It contains a list of TapPair's, whose first element is the action in {POP, PUSH, CYCLE}, and the second the loop. origin ^^^^^^ .. java:field:: public Block origin :outertype: FGArrow rank ^^^^ .. java:field:: public int rank :outertype: FGArrow reachable ^^^^^^^^^ .. java:field:: public boolean reachable :outertype: FGArrow Mark if the arrow is reachable during runtime. Can be set to false when we can infer that a conditional will be always true or false for example. test ^^^^ .. java:field:: public int test :outertype: FGArrow Constructors ------------ FGArrow ^^^^^^^ .. java:constructor:: public FGArrow(Block origin, int test, int cas, Block destination) :outertype: FGArrow Creates a new FGArrow, and sets it from Block "origin" to Block "destination", with "test" and "cas". Adds this arrow to the corresponding flow and backFlow. FGArrow ^^^^^^^ .. java:constructor:: public FGArrow(Block origin, int test, TapIntList cases, Block destination) :outertype: FGArrow FGArrow ^^^^^^^ .. java:constructor:: public FGArrow(Block origin, int test, int cas, Block destination, boolean inCycle) :outertype: FGArrow FGArrow ^^^^^^^ .. java:constructor:: public FGArrow(Block origin, int test, TapIntList cases, Block destination, boolean inCycle) :outertype: FGArrow FGArrow ^^^^^^^ .. java:constructor:: public FGArrow() :outertype: FGArrow Methods ------- coherence ^^^^^^^^^ .. java:method:: public void coherence() :outertype: FGArrow Fills the field iter that summarizes the movement across nested loops structure. Also sets all the references to this FGArrow into the entryBlocks, exitBlocks, entryArrows, exitArrows, and cycleArrows of LoopBlocks. commonSymbolTable ^^^^^^^^^^^^^^^^^ .. java:method:: public SymbolTable commonSymbolTable() :outertype: FGArrow containsCase ^^^^^^^^^^^^ .. java:method:: public boolean containsCase(int oneCase) :outertype: FGArrow delete ^^^^^^ .. java:method:: public void delete() :outertype: FGArrow Deletes this FGArrow. Removes it from the flow from its origin and from the backFlow to its destination. dump ^^^^ .. java:method:: public void dump() throws java.io.IOException :outertype: FGArrow Prints in detail the contents of this FGArrow, onto TapEnv.curOutputStream(). dumpTestCaseCarry ^^^^^^^^^^^^^^^^^ .. java:method:: protected void dumpTestCaseCarry() throws java.io.IOException :outertype: FGArrow exitsFromLoopAndLoopSymbolTable ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public boolean exitsFromLoopAndLoopSymbolTable() :outertype: FGArrow :return: True when this FGArrow exits from a loop and this loop has a loop local SymbolTable finalCycle ^^^^^^^^^^ .. java:method:: public LoopBlock finalCycle() :outertype: FGArrow :return: the LoopBlock of the loop level in which "this" FGArrow finally cycles. goesInsideControl ^^^^^^^^^^^^^^^^^ .. java:method:: public boolean goesInsideControl() :outertype: FGArrow insertBlockAtDest ^^^^^^^^^^^^^^^^^ .. java:method:: public FGArrow insertBlockAtDest(Block block, int test, int cas) :outertype: FGArrow Inserts "block" between the current origin and current destination of this FGArrow, so that this FGArrow now designates the arrow that flows INTO the given "block". :return: the newly created arrow that flows FROM the given "block". insertBlockAtOrig ^^^^^^^^^^^^^^^^^ .. java:method:: public void insertBlockAtOrig(Block block, int test, int cas) :outertype: FGArrow Inserts "block" between the current origin and current destination of this FGArrow, so that this FGArrow now designates the arrow that flows FROM the given "block". isCyclingArrow ^^^^^^^^^^^^^^ .. java:method:: public boolean isCyclingArrow() :outertype: FGArrow :return: true if this arrow goes back to the header of a loop, comes from inside this loop, and is not considered going "out-then-back-in" this loop. mayBeNatural ^^^^^^^^^^^^ .. java:method:: public boolean mayBeNatural() :outertype: FGArrow used in treeGen. mergeCases ^^^^^^^^^^ .. java:method:: public void mergeCases(FGArrow newArrow) :outertype: FGArrow Assume that this FGArrow and "newArrow" have same origin and destination. This function tries to merge the two FGArrows' test/cases into the test/case of this FGArrow. redirectDestination ^^^^^^^^^^^^^^^^^^^ .. java:method:: public void redirectDestination(Block block) :outertype: FGArrow Redirects the destination of this FGArrow to "block". If block==null, this disconnects this FGArrow from its destination. redirectDestination ^^^^^^^^^^^^^^^^^^^ .. java:method:: public void redirectDestination(Block block, boolean cycle) :outertype: FGArrow Redirects the destination of this FGArrow to "block" and may declare this FGArrow a cycle in the loop headed by "block". redirectOrigin ^^^^^^^^^^^^^^ .. java:method:: public void redirectOrigin(Block block) :outertype: FGArrow Redirects the origin of this FGArrow to "block". If block==null, this disconnects this FGArrow from its origin. setRank ^^^^^^^ .. java:method:: public void setRank(int rank) :outertype: FGArrow testAndCasesToString ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static String testAndCasesToString(int test, TapIntList cases) :outertype: FGArrow toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: FGArrow topmostPop ^^^^^^^^^^ .. java:method:: public Block topmostPop() :outertype: FGArrow :return: the LoopBlock of the topmost loop level that "this" FGArrow pops from. If this arrow does not POP, returns the plain origin Block of this arrow. turnNomatchIntoDefault ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public void turnNomatchIntoDefault() :outertype: FGArrow Turns the unique final NOMATCH case after a switch into a DEFAULT (which will also be unique and final).