Ignore:
Timestamp:
Nov 30, 2015, 4:30:02 PM (4 years ago)
Author:
nmedfort
Message:

More work on n-ary operations. Unresolved bug in DistributionPass?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/toolchain.cpp

    r4878 r4885  
    3838#include <pablo/optimizers/codemotionpass.h>
    3939#include <pablo/passes/flattenassociativedfg.h>
     40#include <pablo/passes/factorizedfg.h>
    4041#ifdef ENABLE_MULTIPLEXING
    4142#include <pablo/optimizers/pablo_automultiplexing.hpp>
     
    8889                                        cl::desc("maximum number of selections from any partial candidate multiplexing set."),
    8990                                        cl::cat(cPabloOptimizationsOptions));
    90 
     91static cl::opt<bool> EnableLowering("lowering", cl::init(false),
     92                                         cl::desc("coalesce associative functions prior to optimization passes."),
     93                                         cl::cat(cPabloOptimizationsOptions));
    9194static cl::opt<bool> EnableReassociation("reassoc", cl::init(false),
    9295                                         cl::desc("perform reassocation and distribution law optimization."),
     
    133136        PabloPrinter::print(*function, cerr);
    134137    }
    135 #ifndef NDEBUG
     138    #ifndef NDEBUG
    136139    PabloVerifier::verify(*function, "creation");
    137 #endif
     140    #endif
    138141    return function;
    139142}
     
    144147        Simplifier::optimize(*function);
    145148    }
    146     // FlattenAssociativeDFG::transform(*function);
     149#ifdef ENABLE_MULTIPLEXING
     150    if (EnableLowering || EnableMultiplexing) {
     151        FlattenAssociativeDFG::transform(*function);
     152    }
     153#endif
    147154    if (PabloSinkingPass) {
    148155        CodeMotionPass::optimize(*function);
     
    150157#ifdef ENABLE_MULTIPLEXING   
    151158    if (EnableMultiplexing) {
    152         BDDMinimizationPass::optimize(*function);
     159        // BDDMinimizationPass::optimize(*function);
    153160        AutoMultiplexing::optimize(*function, MultiplexingSetLimit, MultiplexingSelectionLimit);
     161        FlattenAssociativeDFG::transform(*function);
    154162    }
    155163    if (EnableReassociation) {
     
    157165    }
    158166#endif
     167    if (EnableLowering || EnableMultiplexing) {
     168        FactorizeDFG::transform(*function);
     169    }
    159170    if (PrintOptimizedREcode) {
    160171        //Print to the terminal the AST that was generated by the pararallel bit-stream compiler.
Note: See TracChangeset for help on using the changeset viewer.