.. java:import:: fr.inria.tapenade.representation ArrayDim .. java:import:: fr.inria.tapenade.representation ArrayTypeSpec .. java:import:: fr.inria.tapenade.representation Block .. java:import:: fr.inria.tapenade.representation BlockStorage .. java:import:: fr.inria.tapenade.representation CallArrow .. java:import:: fr.inria.tapenade.representation CallGraph .. java:import:: fr.inria.tapenade.representation FGArrow .. java:import:: fr.inria.tapenade.representation FGConstants .. java:import:: fr.inria.tapenade.representation HeaderBlock .. java:import:: fr.inria.tapenade.representation ILUtils .. java:import:: fr.inria.tapenade.representation Instruction .. java:import:: fr.inria.tapenade.representation PointerTypeSpec .. java:import:: fr.inria.tapenade.representation PublicInfo .. java:import:: fr.inria.tapenade.representation SymbolTable .. java:import:: fr.inria.tapenade.representation SymbolTableConstants .. java:import:: fr.inria.tapenade.representation TapEnv .. java:import:: fr.inria.tapenade.representation TapList .. java:import:: fr.inria.tapenade.representation TypeSpec .. java:import:: fr.inria.tapenade.representation Unit .. java:import:: fr.inria.tapenade.representation UnitStorage .. java:import:: fr.inria.tapenade.representation VariableDecl .. java:import:: fr.inria.tapenade.representation WrapperTypeSpec .. java:import:: fr.inria.tapenade.representation ZoneInfo .. java:import:: fr.inria.tapenade.utils BoolMatrix .. java:import:: fr.inria.tapenade.utils BoolVector .. 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 ToBool .. java:import:: fr.inria.tapenade.utils Tree PointerAnalyzer =============== .. java:package:: fr.inria.tapenade.analysis :noindex: .. java:type:: public final class PointerAnalyzer extends DataFlowAnalyzer Analyzer in charge of detection of possible pointer destinations. .. parsed-literal:: Feature: derives from DataFlowAnalyzer : OK Feature: able to analyze recursive code: OK Feature: distinguishes structure elemts: OK Feature: takes care of pointer dests: OK Feature: refine on loop-local variables: OK Feature: std method for call arguments : OK Feature: able to analyze sub-flow-graph: OK Methods ------- buildExplicitIdentityDestsRow ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static BoolVector buildExplicitIdentityDestsRow(int rowIndex, SymbolTable symbolTable) :outertype: PointerAnalyzer Build a BoolVector dests row representing explicit-Identity for row number "rowIndex". This is a shortcut that doesn't use the maps: valid only if the structure of maps does not change. Also, this does not work when the rowIndex is about a formal parameter! :param rowIndex: The given row index. :param symbolTable: The SymbolTable of the current location in the current Unit. :return: The BoolVector that explicitly represents identity. compareChannelZoneDataDownstream ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected boolean compareChannelZoneDataDownstream(int mpZone, Block refBlock) :outertype: PointerAnalyzer compareDownstreamValues ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected boolean compareDownstreamValues() :outertype: PointerAnalyzer compareUpstreamValues ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected boolean compareUpstreamValues() :outertype: PointerAnalyzer cumulCycleValueWithAdditional ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected void cumulCycleValueWithAdditional(SymbolTable commonSymbolTable) :outertype: PointerAnalyzer cumulValueWithAdditional ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected void cumulValueWithAdditional(SymbolTable commonSymbolTable) :outertype: PointerAnalyzer getValueFlowingThrough ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected boolean getValueFlowingThrough() :outertype: PointerAnalyzer initializeCGForUnit ^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected Object initializeCGForUnit() :outertype: PointerAnalyzer initializeCumulValue ^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected void initializeCumulValue() :outertype: PointerAnalyzer initializeFGForBlock ^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected void initializeFGForBlock() :outertype: PointerAnalyzer Initializes for curBlock before analysis of its Unit. Fills the BoolMatrix of the pointer effect of curBlock. If no pointer around, does nothing and exits quickly. initializeInitBlock ^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected void initializeInitBlock() :outertype: PointerAnalyzer initializeUnit ^^^^^^^^^^^^^^ .. java:method:: @Override protected void initializeUnit() :outertype: PointerAnalyzer Initialize just before pointer analysis on "curUnit". This is re-done once per Unit during each sweep on the CG. propagateValuesForwardThroughBlock ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected boolean propagateValuesForwardThroughBlock() :outertype: PointerAnalyzer replaceActualsByInitials ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void replaceActualsByInitials(BoolVector infoVector, Tree callTree, int whichKind) :outertype: PointerAnalyzer Reciprocal of replaceInitialsByActuals(). Given a data flow info "infoVector" which exists in some (calling) subroutine just before calling some (called) subroutine, changes the "infoVector" so that it contains the same info, but based on the global pointers' initial destination zones at the entry into the called subroutine. This uses the "pointersActualInitialDests" annotation that was precomputed for this call site at the end of pointer analysis. replaceActualsByInitials ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void replaceActualsByInitials(BoolMatrix infoMatrix, Tree callTree, int whichKind) :outertype: PointerAnalyzer replaceInitialsByActuals ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void replaceInitialsByActuals(BoolVector infoVector, Tree callTree, int whichKind, int globNb) :outertype: PointerAnalyzer Given a data flow info "infoVector" where some info concerns zones that are indeed "initial destinations" of global pointers at the entry into a called procedure, changes the "infoVector" so that it contains the same info, but based on the actual destinations of these global pointers at the call site "callTree" in the calling subroutine. This uses the "pointersActualInitialDests" annotation that was precomputed for this call site at the end of pointer analysis. replaceInitialsByActuals ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void replaceInitialsByActuals(BoolMatrix infoMatrix, Tree callTree, int whichKind) :outertype: PointerAnalyzer runAnalysis ^^^^^^^^^^^ .. java:method:: public static void runAnalysis(CallGraph callgraph, TapList rootUnits) :outertype: PointerAnalyzer Main entry point. Builds a PointerAnalyzer, stores it and runs it. setCurBlockEtc ^^^^^^^^^^^^^^ .. java:method:: @Override protected void setCurBlockEtc(Block block) :outertype: PointerAnalyzer In addition to super.setCurBlockEtc(), sets nDPZ and the 3rd size of curRowMap and curColMap. setCurUnitEtc ^^^^^^^^^^^^^ .. java:method:: @Override public void setCurUnitEtc(Unit unit) :outertype: PointerAnalyzer In addition to super.setCurUnitEtc(), sets nDPZ and the contents of curRowMap and curColMap. setEmptyCumulAndCycleValues ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected void setEmptyCumulAndCycleValues() :outertype: PointerAnalyzer terminateCGForUnit ^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected void terminateCGForUnit() :outertype: PointerAnalyzer Places the comments about pointers into the code or curUnit, then cleans last bits of memory. Done only once for each Unit, when all sweeps on the CG are finished. terminateFGForBlock ^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected void terminateFGForBlock() :outertype: PointerAnalyzer terminateUnit ^^^^^^^^^^^^^ .. java:method:: @Override protected boolean terminateUnit() :outertype: PointerAnalyzer Stores the condensed pointer dests info after analysis of "curUnit". Prepares the pointer destination comments when requested. Makes removeDanglingPointers() emit messages for dangling pointers. Builds the public pointer dests info for curUnit, to be used during analysis of calling units. This is re-done once per Unit during each sweep on the CG.