Ignore:
Timestamp:
Sep 18, 2015, 1:25:24 PM (4 years ago)
Author:
nmedfort
Message:

Work towards testing reassociation + multiplexing.

File:
1 edited

Legend:

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

    r4754 r4775  
    1414#include <llvm/Support/CommandLine.h>
    1515#include <utf_encoding.h>
     16#include <pablo/analysis/pabloverifier.hpp>
    1617#include <pablo/optimizers/pablo_simplifier.hpp>
    1718#include <pablo/optimizers/pablo_codesinking.hpp>
    1819#ifdef ENABLE_MULTIPLEXING
     20#include <pablo/optimizers/pablo_bddminimization.h>
    1921#include <pablo/optimizers/pablo_automultiplexing.hpp>
    2022#endif
     23#include <pablo/optimizers/booleanreassociationpass.h>
    2124#include <llvm/IR/Verifier.h>
    2225#include <llvm/Support/Debug.h>
     
    6568                                                           clEnumValEnd));
    6669
    67 
     70static cl::opt<bool> EnableReassociation("reassoc", cl::init(false),
     71                                      cl::desc("Enable reassociation and distribution optimization of Boolean functions."), cl::Optional);
    6872
    6973
     
    238242        (*LongestDependenceChainFile) << name;
    239243    }
    240     //std::cerr << name << std::endl;
     244    std::cerr << name << std::endl;
    241245
    242246    PabloFunction * function = PabloFunction::Create(std::move(name), 8, 1);
     
    260264
    261265    #ifdef ENABLE_MULTIPLEXING
     266    BDDMinimizationPass::optimize(*function);
    262267    if (EnableMultiplexing) {
    263268        if (LongestDependenceChainFile) {
     
    279284    }
    280285    #endif
     286    if (EnableReassociation) {
     287        BooleanReassociationPass::optimize(*function);
     288    }
     289
    281290    // Now compile the function ...
    282291    llvm::Function * func = pc.compile(function, module);
Note: See TracChangeset for help on using the changeset viewer.