Ignore:
Timestamp:
Aug 28, 2017, 4:00:17 PM (22 months ago)
Author:
nmedfort
Message:

Bug fixes for multigrep mode. Optional PabloKernel? branch hit counter added. Minor optimizations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pablo_toolchain.cpp

    r5562 r5620  
    3333                        clEnumVal(ShowOptimizedPablo, "Print optimizeed Pablo code"),
    3434                        clEnumVal(VerifyPablo, "Run the Pablo verifier"),
    35                         clEnumVal(DumpTrace, "Generate dynamic traces of executed Pablo assignments."),
     35                        clEnumVal(DumpTrace, "Generate dynamic traces of executed Pablo assignments."),                       
    3636                        clEnumValEnd), cl::cat(PabloOptions));
    3737   
     
    4242    PabloOptimizationsOptions(cl::values(clEnumVal(DisableSimplification, "Disable Pablo Simplification pass (not recommended)"),
    4343                                         clEnumVal(DisableCodeMotion, "Moves statements into the innermost legal If-scope and moves invariants out of While-loops."),
    44                                          clEnumVal(EnableDistribution, "Apply distribution law optimization."),
    45 
     44                                         clEnumVal(EnableDistribution, "Apply distribution law optimization."),                                         
    4645                                         clEnumVal(EnableSchedulingPrePass, "Pablo Statement Scheduling Pre-Pass"),
     46                                         clEnumVal(EnableProfiling, "Profile branch statistics."),
    4747                                         clEnumValEnd), cl::cat(PabloOptions));
    4848
    49 bool DebugOptionIsSet(PabloDebugFlags flag) {return DebugOptions.isSet(flag);}
     49bool DebugOptionIsSet(const PabloDebugFlags flag) {return DebugOptions.isSet(flag);}
    5050   
     51bool CompileOptionIsSet(const PabloCompilationFlags flag) {return PabloOptimizationsOptions.isSet(flag);}
    5152
    5253void pablo_function_passes(PabloKernel * kernel) {
     
    6768
    6869    // Scan through the pablo code and perform DCE and CSE
     70    if (Flatten){
     71        FlattenIf::transform(kernel);
     72    }
    6973    if (LLVM_LIKELY(!PabloOptimizationsOptions.isSet(DisableSimplification))) {
    7074        Simplifier::optimize(kernel);
    7175    }
    72     if (Flatten){
    73         FlattenIf::transform(kernel);
     76    if (PabloOptimizationsOptions.isSet(EnableDistribution)) {
     77        DistributivePass::optimize(kernel);
    7478    }
    7579    if (LLVM_LIKELY(!PabloOptimizationsOptions.isSet(DisableCodeMotion))) {
    7680        CodeMotionPass::optimize(kernel);
    77     }
    78     if (PabloOptimizationsOptions.isSet(EnableDistribution)) {
    79         DistributivePass::optimize(kernel);
    8081    }
    8182    if (PabloOptimizationsOptions.isSet(EnableSchedulingPrePass)) {
Note: See TracChangeset for help on using the changeset viewer.