Ignore:
Timestamp:
Dec 23, 2015, 4:28:42 PM (3 years ago)
Author:
nmedfort
Message:

Work on lowering + minor bug fixes.

File:
1 edited

Legend:

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

    r4896 r4899  
    8080
    8181#ifdef ENABLE_MULTIPLEXING
     82static cl::opt<bool> PrintUnloweredCode("print-unlowered-pablo", cl::init(false), cl::desc("print Pablo output prior to lowering. "), cl::cat(dPabloDumpOptions));
     83
    8284static cl::opt<bool> EnableMultiplexing("multiplexing", cl::init(false),
    8385                                        cl::desc("combine Advances whose inputs are mutual exclusive into the fewest number of advances possible (expensive)."),
     
    9799                                         cl::desc("coalesce associative functions prior to optimization passes."),
    98100                                         cl::cat(cPabloOptimizationsOptions));
    99 static cl::opt<bool> EnableDistribution("dist", cl::init(false),
     101static cl::opt<bool> EnablePreDistribution("pre-dist", cl::init(false),
     102                                         cl::desc("apply distribution law optimization."),
     103                                         cl::cat(cPabloOptimizationsOptions));
     104static cl::opt<bool> EnablePostDistribution("post-dist", cl::init(false),
    100105                                         cl::desc("apply distribution law optimization."),
    101106                                         cl::cat(cPabloOptimizationsOptions));
     
    153158    }
    154159#ifdef ENABLE_MULTIPLEXING
    155     if (EnableLowering || EnableDistribution || EnableMultiplexing) {
     160    if (EnableLowering || EnablePreDistribution || EnablePostDistribution || EnableMultiplexing) {
    156161        FlattenAssociativeDFG::transform(*function);
    157162    }
     
    161166    }
    162167#ifdef ENABLE_MULTIPLEXING   
    163     if (EnableDistribution) {
     168    if (EnablePreDistribution) {
    164169        DistributivePass::optimize(*function);
    165170    }
     
    167172        MultiplexingPass::optimize(*function, MultiplexingSetLimit, MultiplexingSelectionLimit, MultiplexingWindowSize);
    168173    }
     174    if (EnablePostDistribution) {
     175        DistributivePass::optimize(*function);
     176    }
    169177    SchedulingPrePass::optimize(*function);
    170     if (EnableLowering || EnableDistribution || EnableMultiplexing) {
     178    if (PrintUnloweredCode) {
     179        //Print to the terminal the AST that was generated by the pararallel bit-stream compiler.
     180        llvm::raw_os_ostream cerr(std::cerr);
     181        cerr << "Unlowered Pablo AST:\n";
     182        PabloPrinter::print(*function, cerr);
     183    }
     184    if (EnableLowering || EnablePreDistribution || EnablePostDistribution || EnableMultiplexing) {
    171185        FactorizeDFG::transform(*function);
    172186    }
Note: See TracChangeset for help on using the changeset viewer.