Ignore:
Timestamp:
Sep 23, 2015, 12:54:17 AM (4 years ago)
Author:
nmedfort
Message:

Misc changes + potential SIGBUS fix for issue reported by Hongpu.

File:
1 edited

Legend:

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

    r4775 r4788  
    101101    cl::desc("combine Advances whose inputs are mutual exclusive into the fewest number of advances possible (expensive)."),
    102102    cl::cat(cPabloOptimizationsOptions));
     103
     104static cl::opt<bool> EnableReassociation("reassoc", cl::init(false),
     105    cl::desc("perform reassocation and distribution law optimization."),
     106    cl::cat(cPabloOptimizationsOptions));
    103107#endif
    104108
     
    242246        pablo::CodeSinking::optimize(*function);
    243247    }
    244 #ifdef ENABLE_MULTIPLEXING
    245     pablo::BDDMinimizationPass::optimize(*function);
    246     //if (EnableMultiplexing) {
    247         pablo::AutoMultiplexing::optimize(*function);
    248     //}
    249     pablo::BooleanReassociationPass::optimize(*function);
     248#ifdef ENABLE_MULTIPLEXING   
     249    if (EnableMultiplexing) {
     250        pablo::BDDMinimizationPass::optimize(*function);
     251        pablo::AutoMultiplexing::optimize(*function);       
     252    }   
     253    if (EnableReassociation) {
     254        pablo::BooleanReassociationPass::optimize(*function);
     255    }
    250256#endif
    251257    if (PrintOptimizedREcode) {
     
    384390   
    385391    if (icgrep_MCptr) {
    386         GrepExecutor grepEngine = GrepExecutor(icgrep_MCptr);
     392        GrepExecutor grepEngine(icgrep_MCptr);
    387393        grepEngine.setCountOnlyOption(CountOnly);
    388394        grepEngine.setNormalizeLineBreaksOption(NormalizeLineBreaks);
     
    392398        }
    393399        for (unsigned i = firstInputFile; i != inputFiles.size(); ++i) {
    394             grepEngine.doGrep(inputFiles[i].c_str());
     400            grepEngine.doGrep(inputFiles[i]);
    395401        }
    396402    }
Note: See TracChangeset for help on using the changeset viewer.