HeaderBlock

public final class HeaderBlock extends Block

Special Block for loop headers in a Flow Graph.

Fields

declaresItsIterator

public boolean declaresItsIterator

True iff this HeaderBlock contains a C-style for-loop that declares the type of its iterator.

dirtyOverwrittenIndex

public boolean dirtyOverwrittenIndex

true if we discovered that the loop index may be overwritten during the loop (dirty !).

localizedZones

public TapIntList localizedZones

List of array zones which are accessed by the loop as “localized”, i.e. no loop-carried deps between array elements. Example for: Do i; A(i+1)=B(i); B(i-1)=A(i+1); EndDo A is localized, B is not.

loopCompleteZones

public TapIntList loopCompleteZones

List of array zones which are in “topUniqueAccessZones” and which are “completely” accessed, i.e. all the iterations will end up to have swept all cells of the array. This is used to get a simple killed-array mechanism.

loopIndexUnusedAfterLoop

public boolean loopIndexUnusedAfterLoop

true if we discovered that the loop index is unused after exit from this loop.

topUniqueAccessZones

public TapIntList topUniqueAccessZones

List of array zones which are in “uniqueAccessZones” but will not be any more at the above loop level.

uniqueAccessTrees

public TapList<Tree> uniqueAccessTrees

List of the Trees that access to the unique memory cell of the array zones listed in uniqueAccessZones. Same order.

uniqueAccessZones

public TapIntList uniqueAccessZones

List of array zones which are accessed by the loop iteration as unique cells: these accesses will be temporarily marked “total”.

Constructors

HeaderBlock

public HeaderBlock(SymbolTable symbolTable, TapList<Instruction> parallelControls, TapList<Block> allBlocks)

Methods

cite

public void cite()

Prints a short reference to this HeaderBlock onto TapEnv.curOutputStream().

cyclingArrows

public TapList<FGArrow> cyclingArrows()
Returns

the list of arrows cycling inside the loop level whose header is this HeaderBlock.

enteringArrows

public TapList<FGArrow> enteringArrows()
Returns

the list of arrows entering the loop level whose header is this HeaderBlock.

insertBlockBeforeLoopCycle

public void insertBlockBeforeLoopCycle(Block block)

Inserts the given “block” before loop cycling in this HeaderBlock in the Flow Graph. This requires that the given “block” does not end with a test.

insertBlockBeforeLoopEntry

public void insertBlockBeforeLoopEntry(Block block)

Inserts the given “block” before the loop entry into this HeaderBlock in the Flow Graph. This requires that the given “block” does not end with a test.

origCycleLabel

public String origCycleLabel()
Returns

the label of the loop.

setOrigCycleLabel

public void setOrigCycleLabel(String label)

Sets the label of the loop.

toString

public String toString()