Ignore:
Timestamp:
Feb 2, 2017, 9:17:55 PM (2 years ago)
Author:
cameron
Message:

Debug Options: SerializeThreads?; unify ShowIR, ShowPablo?, ShowREs, ShowASM

Location:
icGREP/icgrep-devel/icgrep/re
Files:
2 edited

Legend:

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

    r5267 r5295  
    2626
    2727static cl::bits<RE_PrintFlags>
    28     PrintOptions(cl::values(clEnumVal(PrintAllREs, "print regular expression passes"),
    29                             clEnumVal(PrintParsedREs, "print out parsed regular expressions"),
    30                             clEnumVal(PrintStrippedREs, "print out REs with nullable prefixes/suffixes removed"),
    31                             clEnumVal(PrintSimplifiedREs, "print out final simplified REs"),
     28    PrintOptions(cl::values(clEnumVal(ShowREs, "Print parsed or generated regular expressions"),
     29                            clEnumVal(ShowAllREs, "Print all regular expression passes"),
     30                            clEnumVal(ShowStrippedREs, "Print REs with nullable prefixes/suffixes removed"),
     31                            clEnumVal(ShowSimplifiedREs, "Print final simplified REs"),
    3232                            clEnumValEnd), cl::cat(RegexOptions));
    3333
     
    5555
    5656RE * regular_expression_passes(RE * re_ast)  {
    57     if (PrintOptions.isSet(PrintAllREs) || PrintOptions.isSet(PrintParsedREs)) {
     57    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowREs)) {
    5858        std::cerr << "Parser:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    5959    }
     
    6161    //Optimization passes to simplify the AST.
    6262    re_ast = re::RE_Nullable::removeNullablePrefix(re_ast);
    63     if (PrintOptions.isSet(PrintAllREs) || PrintOptions.isSet(PrintStrippedREs)) {
     63    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowStrippedREs)) {
    6464        std::cerr << "RemoveNullablePrefix:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    6565    }
    6666    re_ast = re::RE_Nullable::removeNullableSuffix(re_ast);
    67     if (PrintOptions.isSet(PrintAllREs) || PrintOptions.isSet(PrintStrippedREs)) {
     67    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowStrippedREs)) {
    6868        std::cerr << "RemoveNullableSuffix:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    6969    }
    7070    re_ast = re::RE_Nullable::removeNullableAssertion(re_ast);
    71     if (PrintOptions.isSet(PrintAllREs) || PrintOptions.isSet(PrintStrippedREs)) {
     71    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowStrippedREs)) {
    7272        std::cerr << "RemoveNullableAssertion:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    7373    }
    7474    re_ast = re::RE_Nullable::removeNullableAfterAssertion(re_ast);
    75     if (PrintOptions.isSet(PrintAllREs) || PrintOptions.isSet(PrintStrippedREs)) {
     75    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowStrippedREs)) {
    7676        std::cerr << "RemoveNullableAfterAssertion" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
    7777    }
    7878   
    7979    re_ast = re::RE_Simplifier::simplify(re_ast);
    80     if (PrintOptions.isSet(PrintAllREs) || PrintOptions.isSet(PrintSimplifiedREs)) {
     80    if (PrintOptions.isSet(ShowAllREs) || PrintOptions.isSet(ShowSimplifiedREs)) {
    8181        //Print to the terminal the AST that was generated by the simplifier.
    8282        std::cerr << "Simplifier:" << std::endl << Printer_RE::PrintRE(re_ast) << std::endl;
  • icGREP/icgrep-devel/icgrep/re/re_toolchain.h

    r5267 r5295  
    1515
    1616enum RE_PrintFlags {
    17     PrintAllREs, PrintParsedREs, PrintStrippedREs, PrintSimplifiedREs
     17    ShowREs, ShowAllREs, ShowStrippedREs, ShowSimplifiedREs
    1818};
    1919   
Note: See TracChangeset for help on using the changeset viewer.