Ignore:
Timestamp:
Sep 7, 2017, 4:56:56 PM (2 years ago)
Author:
nmedfort
Message:

Partial check-in for avoidance of compiling Pablo/LLVM code to determine the Kernel struct type when using a cached object. Inactive RE alternation minimization check in.

File:
1 edited

Legend:

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

    r5620 r5630  
    1212#include <re/re_star_normal.h>         // for RE_Star_Normal
    1313#include <re/re_simplifier.h>          // for RE_Simplifier
     14#include <re/re_minimizer.h>
    1415#include <re/re_local.h>
    1516#include <re/printer_re.h>
     
    6364
    6465    //Optimization passes to simplify the AST.
    65     re_ast = re::RE_Nullable::removeNullablePrefix(re_ast);
     66    re_ast = RE_Nullable::removeNullablePrefix(re_ast);
    6667    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowStrippedREs)) {
    6768        std::cerr << "RemoveNullablePrefix:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    6869    }
    69     re_ast = re::RE_Nullable::removeNullableSuffix(re_ast);
     70    re_ast = RE_Nullable::removeNullableSuffix(re_ast);
    7071    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowStrippedREs)) {
    7172        std::cerr << "RemoveNullableSuffix:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    7273    }
    73     re_ast = re::RE_Nullable::removeNullableAssertion(re_ast);
     74    re_ast = RE_Nullable::removeNullableAssertion(re_ast);
    7475    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowStrippedREs)) {
    7576        std::cerr << "RemoveNullableAssertion:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    7677    }
    77     //re_ast = re::RE_Nullable::removeNullableAfterAssertion(re_ast);
     78    //re_ast = RE_Nullable::removeNullableAfterAssertion(re_ast);
    7879    //if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowStrippedREs)) {
    7980    //    std::cerr << "RemoveNullableAfterAssertion" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    8081    //}
    8182   
    82     re_ast = re::RE_Simplifier::simplify(re_ast);
     83    // re_ast = RE_Minimizer::minimize(re_ast);
     84
     85    re_ast = RE_Simplifier::simplify(re_ast);
     86
    8387    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowSimplifiedREs)) {
    8488        //Print to the terminal the AST that was generated by the simplifier.
     
    8690    }
    8791
    88     re_ast = re::RE_Star_Normal::star_normal(re_ast);
     92    re_ast = RE_Star_Normal::star_normal(re_ast);
     93
    8994    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowSimplifiedREs)) {
    9095        //Print to the terminal the AST that was transformed to the star normal form.
    9196        std::cerr << "Star_Normal_Form:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    9297    }   
     98
    9399    return re_ast;
    94100}
     
    98104    bool local = RE_Local::isLocalLanguage(re_ast) && isTypeForLocal(re_ast);
    99105    cc::CC_Compiler cc_compiler(kernel, basis);
    100     re::RE_Compiler re_compiler(kernel, cc_compiler, local);
     106    RE_Compiler re_compiler(kernel, cc_compiler, local);
    101107    re_compiler.compileUnicodeNames(re_ast);
    102108    re_compiler.compile(re_ast);
Note: See TracChangeset for help on using the changeset viewer.