Package org.apache.sysds.hops.ipa
Class IPAPassFlagFunctionsRecompileOnce
- java.lang.Object
- 
- org.apache.sysds.hops.ipa.IPAPass
- 
- org.apache.sysds.hops.ipa.IPAPassFlagFunctionsRecompileOnce
 
 
- 
 public class IPAPassFlagFunctionsRecompileOnce extends IPAPass This rewrite marks functions with loops as recompile once in order to reduce recompilation overhead. Such functions are recompiled on function entry with the size information of the function inputs which is often sufficient to decide upon execution types; in case there are still unknowns, the traditional recompilation per atomic block still applies. TODO call after lops construction
- 
- 
Constructor SummaryConstructors Constructor Description IPAPassFlagFunctionsRecompileOnce()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisApplicable(FunctionCallGraph fgraph)Indicates if an IPA pass is applicable for the current configuration such as global flags or the chosen execution mode (e.g., HYBRID).booleanrewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)Rewrites the given program or its functions in place, with access to the read-only function call graph.booleanrFlagFunctionForRecompileOnce(StatementBlock sb, boolean inLoop)Returns true if this statementblock requires recompilation inside a loop statement block.
 
- 
- 
- 
Method Detail- 
isApplicablepublic boolean isApplicable(FunctionCallGraph fgraph) Description copied from class:IPAPassIndicates if an IPA pass is applicable for the current configuration such as global flags or the chosen execution mode (e.g., HYBRID).- Specified by:
- isApplicablein class- IPAPass
- Parameters:
- fgraph- function call graph
- Returns:
- true if applicable.
 
 - 
rewriteProgrampublic boolean rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes) Description copied from class:IPAPassRewrites the given program or its functions in place, with access to the read-only function call graph.- Specified by:
- rewriteProgramin class- IPAPass
- Parameters:
- prog- dml program
- fgraph- function call graph
- fcallSizes- function call size infos
- Returns:
- true if function call graph should be rebuild
 
 - 
rFlagFunctionForRecompileOncepublic boolean rFlagFunctionForRecompileOnce(StatementBlock sb, boolean inLoop) Returns true if this statementblock requires recompilation inside a loop statement block.- Parameters:
- sb- statement block
- inLoop- true if in loop
- Returns:
- true if statement block requires recompilation inside a loop statement block
 
 
- 
 
-