Package org.apache.sysds.parser
Class ForStatementBlock
java.lang.Object
org.apache.sysds.parser.LiveVariableAnalysis
org.apache.sysds.parser.StatementBlock
org.apache.sysds.parser.ForStatementBlock
- All Implemented Interfaces:
ParseInfo
- Direct Known Subclasses:
ParForStatementBlock
-
Field Summary
Fields inherited from class org.apache.sysds.parser.StatementBlock
DEFAULT_LOOP_REPETITIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanalyze(VariableSet loPassed) intinitializebackwardLV(VariableSet loPassed) initializeforwardLV(VariableSet activeInPassed) For each statement: gen rule: for each variable read in current statement but not updated in any PRIOR statement, add to gen Handles case where variable both read and updated in same statement (i = i + 1, i needs to be added to gen) kill rule: for each variable updated in current statement but not read in this or any PRIOR statement, add to kill.voidperformConstantPropagation(HashMap<String, ConstIdentifier> currConstVars) booleanbooleanbooleanbooleanvoidsetFromHops(Hop hops) voidsetFromLops(Lop lops) voidsetIncrementHops(Hop hops) voidsetIncrementLops(Lop lops) voidvoidbooleanvalidate(DMLProgram dmlProg, VariableSet ids, HashMap<String, ConstIdentifier> constVars, boolean conditional) Methods inherited from class org.apache.sysds.parser.StatementBlock
addStatement, addStatementBlock, getBeginColumn, getBeginLine, getCheckpointPositions, getConstIn, getConstOut, getDMLProg, getEndColumn, getEndLine, getFilename, getHops, getLoopDepRatio, getLops, getName, getNumStatements, getOutputNamesofSB, getOutputsofSB, getSBID, getStatement, getStatements, getText, getUpdateInPlaceVars, hasHops, isMergeableFunctionCallBlock, isNondeterministic, isRecompileOnce, isRewritableFunctionCall, isSplitDag, mergeable, mergeFunctionCalls, mergeStatementBlocks, printBlockErrorLocation, printErrorLocation, printWarningLocation, raiseValidateError, raiseValidateError, requiresRecompilation, rewriteFunctionCallStatements, rHoistFunctionCallsFromExpressions, rHoistFunctionCallsFromExpressions, rHoistFunctionCallsFromExpressions, setBeginColumn, setBeginLine, setCheckpointPosition, setDMLProg, setEndColumn, setEndLine, setFilename, setHops, setLoopDepRatio, setLops, setNondeterministic, setParseInfo, setRecompileOnce, setSplitDag, setStatementFormatType, setStatementFormatType, setStatements, setText, setUpdateInPlaceVars, toString, updateRecompilationFlagMethods inherited from class org.apache.sysds.parser.LiveVariableAnalysis
getGen, getKill, getWarn, liveIn, liveOut, setGen, setKill, setLiveIn, setLiveOut, setReadVariables, setUpdatedVariables, updateLiveVariablesOut, variablesRead, variablesUpdated
-
Constructor Details
-
ForStatementBlock
public ForStatementBlock()
-
-
Method Details
-
getIterPredicate
-
validate
public VariableSet validate(DMLProgram dmlProg, VariableSet ids, HashMap<String, ConstIdentifier> constVars, boolean conditional) - Overrides:
validatein classStatementBlock
-
initializeforwardLV
Description copied from class:StatementBlockFor each statement: gen rule: for each variable read in current statement but not updated in any PRIOR statement, add to gen Handles case where variable both read and updated in same statement (i = i + 1, i needs to be added to gen) kill rule: for each variable updated in current statement but not read in this or any PRIOR statement, add to kill.- Overrides:
initializeforwardLVin classStatementBlock
-
initializebackwardLV
- Overrides:
initializebackwardLVin classStatementBlock
-
setFromHops
-
setToHops
-
setIncrementHops
-
getFromHops
-
getToHops
-
getIncrementHops
-
setFromLops
-
setToLops
-
setIncrementLops
-
getFromLops
-
getToLops
-
getIncrementLops
-
getInputstoSB
- Overrides:
getInputstoSBin classStatementBlock
-
analyze
- Overrides:
analyzein classStatementBlock
-
performConstantPropagation
-
updatePredicateRecompilationFlags
public boolean updatePredicateRecompilationFlags() -
requiresPredicateRecompilation
public boolean requiresPredicateRecompilation() -
requiresFromRecompilation
public boolean requiresFromRecompilation() -
requiresToRecompilation
public boolean requiresToRecompilation() -
requiresIncrementRecompilation
public boolean requiresIncrementRecompilation() -
getEstimateReps
public int getEstimateReps()
-