Package org.apache.sysds.hops.codegen
Class SpoofCompiler
- java.lang.Object
-
- org.apache.sysds.hops.codegen.SpoofCompiler
-
public class SpoofCompiler extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpoofCompiler.CompilerTypestatic classSpoofCompiler.GeneratorAPIstatic classSpoofCompiler.IntegrationTypestatic classSpoofCompiler.PlanCachePolicystatic classSpoofCompiler.PlanSelectorstatic classSpoofCompiler.RegisterAlloc
-
Field Summary
Fields Modifier and Type Field Description static SpoofCompiler.GeneratorAPIAPIstatic SpoofCompiler.IntegrationTypeINTEGRATIONstatic SpoofCompiler.CompilerTypeJAVA_COMPILERstatic HashMap<SpoofCompiler.GeneratorAPI,Long>native_contextsstatic SpoofCompiler.PlanCachePolicyPLAN_CACHE_POLICYstatic intPLAN_CACHE_SIZEstatic SpoofCompiler.PlanSelectorPLAN_SEL_POLICYstatic booleanPRUNE_REDUNDANT_PLANSstatic booleanRECOMPILE_CODEGENstatic SpoofCompiler.RegisterAllocREG_ALLOC_POLICY
-
Constructor Summary
Constructors Constructor Description SpoofCompiler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcleanupCodeGenerator()static PlanSelectioncreatePlanSelector()Factory method for alternative plan selection policies.static voidgenerateCode(DMLProgram dmlprog)static voidgenerateCode(Program rtprog)static ArrayList<Hop>generateCodeFromHopDAGs(ArrayList<Hop> roots)static ArrayList<Instruction>generateCodeFromHopDAGsToInst(Hop root)static ArrayList<Instruction>generateCodeFromHopDAGsToInst(StatementBlock sb, ArrayList<Hop> roots)static voidgenerateCodeFromProgramBlock(ProgramBlock current)static voidgenerateCodeFromStatementBlock(StatementBlock current)static voidloadNativeCodeGenerator(SpoofCompiler.GeneratorAPI generator)static ArrayList<Hop>optimize(ArrayList<Hop> roots, boolean recompile)Main interface of sum-product optimizer, statement block dag.static Hopoptimize(Hop root, boolean recompile)Main interface of sum-product optimizer, predicate dag.static voidsetConfiguredPlanSelector()static voidsetExecTypeSpecificJavaCompiler()static voidunloadNativeCodeGenerator()
-
-
-
Field Detail
-
JAVA_COMPILER
public static SpoofCompiler.CompilerType JAVA_COMPILER
-
PLAN_SEL_POLICY
public static SpoofCompiler.PlanSelector PLAN_SEL_POLICY
-
INTEGRATION
public static final SpoofCompiler.IntegrationType INTEGRATION
-
RECOMPILE_CODEGEN
public static final boolean RECOMPILE_CODEGEN
- See Also:
- Constant Field Values
-
PRUNE_REDUNDANT_PLANS
public static final boolean PRUNE_REDUNDANT_PLANS
- See Also:
- Constant Field Values
-
PLAN_CACHE_POLICY
public static SpoofCompiler.PlanCachePolicy PLAN_CACHE_POLICY
-
PLAN_CACHE_SIZE
public static final int PLAN_CACHE_SIZE
- See Also:
- Constant Field Values
-
REG_ALLOC_POLICY
public static final SpoofCompiler.RegisterAlloc REG_ALLOC_POLICY
-
API
public static SpoofCompiler.GeneratorAPI API
-
native_contexts
public static HashMap<SpoofCompiler.GeneratorAPI,Long> native_contexts
-
-
Method Detail
-
loadNativeCodeGenerator
public static void loadNativeCodeGenerator(SpoofCompiler.GeneratorAPI generator)
-
unloadNativeCodeGenerator
public static void unloadNativeCodeGenerator()
-
generateCode
public static void generateCode(DMLProgram dmlprog)
-
generateCode
public static void generateCode(Program rtprog)
-
generateCodeFromStatementBlock
public static void generateCodeFromStatementBlock(StatementBlock current)
-
generateCodeFromProgramBlock
public static void generateCodeFromProgramBlock(ProgramBlock current)
-
generateCodeFromHopDAGsToInst
public static ArrayList<Instruction> generateCodeFromHopDAGsToInst(StatementBlock sb, ArrayList<Hop> roots)
-
generateCodeFromHopDAGsToInst
public static ArrayList<Instruction> generateCodeFromHopDAGsToInst(Hop root)
-
optimize
public static Hop optimize(Hop root, boolean recompile)
Main interface of sum-product optimizer, predicate dag.- Parameters:
root- dag root noderecompile- true if invoked during dynamic recompilation- Returns:
- dag root node of modified dag
-
optimize
public static ArrayList<Hop> optimize(ArrayList<Hop> roots, boolean recompile)
Main interface of sum-product optimizer, statement block dag.- Parameters:
roots- dag root nodesrecompile- true if invoked during dynamic recompilation- Returns:
- dag root nodes of modified dag
-
cleanupCodeGenerator
public static void cleanupCodeGenerator()
-
createPlanSelector
public static PlanSelection createPlanSelector()
Factory method for alternative plan selection policies.- Returns:
- plan selector
-
setConfiguredPlanSelector
public static void setConfiguredPlanSelector()
-
setExecTypeSpecificJavaCompiler
public static void setExecTypeSpecificJavaCompiler()
-
-