Ignore:
Timestamp:
Jun 3, 2015, 9:48:23 AM (4 years ago)
Author:
nmedfort
Message:

More multiplexing changes.

File:
1 edited

Legend:

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

    r4587 r4588  
    6262                                      cl::desc("Moves all instructions into the innermost legal If-scope so that they are only executed when needed."),
    6363                                      cl::cat(cPabloOptimizationsOptions));
     64#ifdef ENABLE_MULTIPLEXING
     65static cl::opt<bool> PabloMutualExclusionPass("mutual-exclusion", cl::init(false),
     66                                      cl::desc("Multiplex Advances whose inputs are mutual exclusive and eliminate any stream that is produces Zero."),
     67                                      cl::cat(cPabloOptimizationsOptions));
     68#endif
    6469
    6570using namespace re;
     
    9095
    9196    if (PrintAllREs || PrintParsedREs) {
    92       std::cerr << "Parser:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
     97        std::cerr << "Parser:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    9398    }
    9499
     
    96101    re_ast = RE_Nullable::removeNullablePrefix(re_ast);
    97102    if (PrintAllREs || PrintStrippedREs) {
    98       std::cerr << "RemoveNullablePrefix:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
     103        std::cerr << "RemoveNullablePrefix:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    99104    }
    100105    re_ast = RE_Nullable::removeNullableSuffix(re_ast);
    101106    if (PrintAllREs || PrintStrippedREs) {
    102       std::cerr << "RemoveNullableSuffix:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
     107        std::cerr << "RemoveNullableSuffix:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    103108    }
    104109   
     
    110115
    111116    if (PrintAllREs || PrintNamedREs) {
    112       std::cerr << "Namer:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    113       std::cerr << "NameMap:\n" << nameMap.printMap() << std::endl;
     117        std::cerr << "Namer:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
     118        std::cerr << "NameMap:\n" << nameMap.printMap() << std::endl;
    114119    }
    115120
     
    118123        re_ast = UTF8_Encoder::toUTF8(nameMap, re_ast);
    119124        if (PrintAllREs || PrintUTF8REs) {
    120           //Print to the terminal the AST that was generated by the utf8 encoder.
    121           std::cerr << "UTF8-encoder:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    122           std::cerr << "NameMap:\n" << nameMap.printMap() << std::endl;
     125            //Print to the terminal the AST that was generated by the utf8 encoder.
     126            std::cerr << "UTF8-encoder:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
     127            std::cerr << "NameMap:\n" << nameMap.printMap() << std::endl;
    123128        }
    124129    }
     
    148153    re_compiler.initializeRequiredStreams(cc_compiler);
    149154    re_compiler.finalizeMatchResult(re_compiler.compile(re_ast));
     155
    150156    if (PrintCompiledREcode) {
    151       //Print to the terminal the AST that was generated by the pararallel bit-stream compiler.
    152       llvm::raw_os_ostream cerr(std::cerr);
    153       cerr << "Initial Pablo AST:\n";
    154       PabloPrinter::print(main.statements(), cerr);
     157        //Print to the terminal the AST that was generated by the pararallel bit-stream compiler.
     158        llvm::raw_os_ostream cerr(std::cerr);
     159        cerr << "Initial Pablo AST:\n";
     160        PabloPrinter::print(main.statements(), cerr);
    155161    }
    156162
     
    162168        CodeSinking::optimize(main);
    163169    }
    164 
    165 
    166 
    167170    #ifdef ENABLE_MULTIPLEXING
     171    if (PabloMutualExclusionPass) {
    168172        AutoMultiplexing::optimize(basisBits, main);
     173    }
    169174    #endif
    170175    if (PrintOptimizedREcode) {
Note: See TracChangeset for help on using the changeset viewer.