Package org.apache.sysds.hops.rewrite
Class StatementBlockRewriteRule
- java.lang.Object
- 
- org.apache.sysds.hops.rewrite.StatementBlockRewriteRule
 
- 
- Direct Known Subclasses:
- MarkForLineageReuse,- RewriteCompressedReblock,- RewriteForLoopVectorization,- RewriteHoistLoopInvariantOperations,- RewriteInjectSparkLoopCheckpointing,- RewriteMarkLoopVariablesUpdateInPlace,- RewriteMergeBlockSequence,- RewriteRemoveEmptyBasicBlocks,- RewriteRemoveForLoopEmptySequence,- RewriteRemoveUnnecessaryBranches,- RewriteSplitDagDataDependentOperators,- RewriteSplitDagUnknownCSVRead
 
 public abstract class StatementBlockRewriteRule extends Object Base class for all hop rewrites in order to enable generic application of all rules.
- 
- 
Constructor SummaryConstructors Constructor Description StatementBlockRewriteRule()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static StringcreateCutVarName(boolean fun)abstract booleancreatesSplitDag()Indicates if the rewrite potentially splits dags, which is used for phase ordering of rewrites.abstract List<StatementBlock>rewriteStatementBlock(StatementBlock sb, ProgramRewriteStatus state)Handle an arbitrary statement block.abstract List<StatementBlock>rewriteStatementBlocks(List<StatementBlock> sbs, ProgramRewriteStatus state)Handle a list of statement blocks.
 
- 
- 
- 
Method Detail- 
createCutVarNamepublic static String createCutVarName(boolean fun) 
 - 
createsSplitDagpublic abstract boolean createsSplitDag() Indicates if the rewrite potentially splits dags, which is used for phase ordering of rewrites.- Returns:
- true if dag splits are possible.
 
 - 
rewriteStatementBlockpublic abstract List<StatementBlock> rewriteStatementBlock(StatementBlock sb, ProgramRewriteStatus state) Handle an arbitrary statement block. Specific type constraints have to be ensured within the individual rewrites. If a rewrite does not apply to individual blocks, it should simply return the input block.- Parameters:
- sb- statement block
- state- program rewrite status
- Returns:
- list of statement blocks
 
 - 
rewriteStatementBlockspublic abstract List<StatementBlock> rewriteStatementBlocks(List<StatementBlock> sbs, ProgramRewriteStatus state) Handle a list of statement blocks. Specific type constraints have to be ensured within the individual rewrites. If a rewrite does not require sequence access, it should simply return the input list of statement blocks.- Parameters:
- sbs- list of statement blocks
- state- program rewrite status
- Returns:
- list of statement blocks
 
 
- 
 
-