Package org.apache.sysds.hops.ipa
Class IPAPassFlagLoopsRecompileOnce
- java.lang.Object
-
- org.apache.sysds.hops.ipa.IPAPass
-
- org.apache.sysds.hops.ipa.IPAPassFlagLoopsRecompileOnce
-
public class IPAPassFlagLoopsRecompileOnce extends IPAPass
This rewrite marks loops in the main program as recompile once in order to reduce recompilation overhead. We mark only top-level loops and thus don't need any reset because these loops are executed just once. All other loops are handled by the function-recompile-once rewrite already.
-
-
Constructor Summary
Constructors Constructor Description IPAPassFlagLoopsRecompileOnce()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isApplicable(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).boolean
rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)
Rewrites the given program or its functions in place, with access to the read-only function call graph.boolean
rFlagFunctionForRecompileOnce(StatementBlock sb)
-
-
-
Method Detail
-
isApplicable
public boolean isApplicable(FunctionCallGraph fgraph)
Description copied from class:IPAPass
Indicates if an IPA pass is applicable for the current configuration such as global flags or the chosen execution mode (e.g., HYBRID).- Specified by:
isApplicable
in classIPAPass
- Parameters:
fgraph
- function call graph- Returns:
- true if applicable.
-
rewriteProgram
public boolean rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)
Description copied from class:IPAPass
Rewrites the given program or its functions in place, with access to the read-only function call graph.- Specified by:
rewriteProgram
in classIPAPass
- Parameters:
prog
- dml programfgraph
- function call graphfcallSizes
- function call size infos- Returns:
- true if function call graph should be rebuild
-
rFlagFunctionForRecompileOnce
public boolean rFlagFunctionForRecompileOnce(StatementBlock sb)
-
-