NewBlockGraphNode¶
-
public final class
NewBlockGraphNode
¶
Fields¶
assignedRef¶
backFlow¶
-
public TapList<NewBlockGraphArrow>
backFlow
¶
diffInstruction¶
-
protected Instruction
diffInstruction
¶ The final Instruction that will be generated for this node.
diffValue¶
flow¶
-
public TapList<NewBlockGraphArrow>
flow
¶
fromInclude¶
-
protected Instruction
fromInclude
¶ When srcInstruction comes from an include, the include’ing Instruction.
iReplic¶
-
protected int
iReplic
¶ The replica number that was used to build “assignedRef” from “primRecv”.
kind¶
-
protected int
kind
¶ The general kind of the final Tree. In {PLAIN, INCREMENT_VARIABLE, SET_VARIABLE}.
multiDir¶
-
protected boolean
multiDir
¶ true if node must run in multi-dir style, i.e. in a loop on directions.
overwritesUsed¶
-
protected boolean
overwritesUsed
¶ True if this instruction reads a value that it then overwrites. Default is true because this is safest.
plainTrees¶
-
protected TapList<Tree>
plainTrees
¶ When the trees are created at NewBlockGraphNode creation time (e.g. for kind==PLAIN, as opposed to kind==SET_VARIABLE or INCREMENT_VARIABLE) this field holds the list of these trees. This holds only one Tree at the beginning, but may hold several trees after node’s are merged.
preComments¶
preCommentsBlock¶
srcInstruction¶
-
protected Instruction
srcInstruction
¶
tree¶
whereMask¶
-
protected InstructionMask
whereMask
¶ The where context that must be applied to the final tree.
Constructors¶
NewBlockGraphNode¶
-
protected
NewBlockGraphNode
(int kind, Tree tree, boolean multiDir, Instruction srcInstruction, InstructionMask whereMask)¶
Methods¶
buildInstruction¶
-
protected void
buildInstruction
(SymbolTable srcSymbolTable, SymbolTable bwdSymbolTable, DifferentiationEnv adEnv, Unit diffUnit)¶
fuseWith¶
-
protected boolean
fuseWith
(NewBlockGraphNode otherNode)¶ Fuses this node with the “otherNode”.
- Returns
true when this node must disappear and be merged into “otherNode”. @return false when “otherNode” must disappear and be merged into this node.
gatherMultiInstructions¶
-
protected void
gatherMultiInstructions
(SymbolTable diffSymbolTable, Unit diffUnit, NewSymbolHolder dirIndexSymbolHolder, IterDescriptor multiDirIterDescriptor)¶
interestingFuseWith¶
-
protected boolean
interestingFuseWith
(NewBlockGraphNode otherNode, NewBlockGraph thisGraph)¶ - Returns
true if the fusion of “this” followed by “otherNode” is possible and profitable.