Changeset 4353


Ignore:
Timestamp:
Dec 20, 2014, 7:41:57 PM (4 years ago)
Author:
cameron
Message:

Group options; hide LLVM options

Location:
icGREP/icgrep-devel/icgrep
Files:
3 edited

Legend:

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

    r4348 r4353  
    2929#include <pablo/printer_pablos.h>
    3030
    31 static cl::opt<bool> PrintAllREs("print-REs", cl::init(false), cl::desc("print regular expression passes"));
    32 static cl::opt<bool> PrintParsedREs("print-parsed-REs", cl::init(false), cl::desc("print out parsed regular expressions"));
    33 static cl::opt<bool> PrintStrippedREs("print-stripped-REs", cl::init(false), cl::desc("print out REs with nullable prefixes/suffixes removed"));
    34 static cl::opt<bool> PrintNamedREs("print-named-REs", cl::init(false), cl::desc("print out named REs"));
    35 static cl::opt<bool> PrintUTF8REs("print-utf8-REs", cl::init(false), cl::desc("print out UTF-8 REs"));
    36 static cl::opt<bool> PrintSimplifiedREs("print-simplified-REs", cl::init(false), cl::desc("print out final simplified REs"));
    37 static cl::opt<bool> PrintAllPablo("print-pablo", cl::init(false), cl::desc("print Pablo code passes"));
    38 static cl::opt<bool> PrintCompiledCCcode("print-CC-pablo", cl::init(false), cl::desc("print Pablo output from character class compiler"));
    39 static cl::opt<bool> PrintCompiledREcode("print-RE-pablo", cl::init(false), cl::desc("print Pablo output from the regular expression compiler"));
    40 static cl::opt<bool> PrintOptimizedREcode("print-optimized-pablo", cl::init(false), cl::desc("print final optimized Pablo code"));
     31
     32cl::OptionCategory cRegexOutputOptions("Regex Dump Options",
     33                                      "These options control printing of intermediate regular expression structures.");
     34
     35cl::OptionCategory dPabloDumpOptions("Pablo Dump Options",
     36                                      "These options control printing of intermediate Pablo code.");
     37
     38static cl::opt<bool> PrintAllREs("print-REs", cl::init(false), cl::desc("print regular expression passes"), cl::cat(cRegexOutputOptions));
     39static cl::opt<bool> PrintParsedREs("print-parsed-REs", cl::init(false), cl::desc("print out parsed regular expressions"), cl::cat(cRegexOutputOptions));
     40static cl::opt<bool> PrintStrippedREs("print-stripped-REs", cl::init(false), cl::desc("print out REs with nullable prefixes/suffixes removed"), cl::cat(cRegexOutputOptions));
     41static cl::opt<bool> PrintNamedREs("print-named-REs", cl::init(false), cl::desc("print out named REs"), cl::cat(cRegexOutputOptions));
     42static cl::opt<bool> PrintUTF8REs("print-utf8-REs", cl::init(false), cl::desc("print out UTF-8 REs"), cl::cat(cRegexOutputOptions));
     43static cl::opt<bool> PrintSimplifiedREs("print-simplified-REs", cl::init(false), cl::desc("print out final simplified REs"), cl::cat(cRegexOutputOptions));
     44static cl::opt<bool> PrintAllPablo("print-pablo", cl::init(false), cl::desc("print Pablo code passes"), cl::cat(dPabloDumpOptions));
     45static cl::opt<bool> PrintCompiledCCcode("print-CC-pablo", cl::init(false), cl::desc("print Pablo output from character class compiler"), cl::cat(dPabloDumpOptions));
     46static cl::opt<bool> PrintCompiledREcode("print-RE-pablo", cl::init(false), cl::desc("print Pablo output from the regular expression compiler"), cl::cat(dPabloDumpOptions));
     47static cl::opt<bool> PrintOptimizedREcode("print-optimized-pablo", cl::init(false), cl::desc("print final optimized Pablo code"), cl::cat(dPabloDumpOptions));
    4148
    4249
  • icGREP/icgrep-devel/icgrep/icgrep.cpp

    r4328 r4353  
    1818
    1919int main(int argc, char *argv[]) {
    20     int firstInputFile = 1;  // Normal case when first positional arg is a regex. 
     20    StringMap<cl::Option*> Map;
     21    cl::getRegisteredOptions(Map);
     22    Map["time-passes"]->setHiddenFlag(cl::Hidden);
     23    Map["disable-spill-fusing"]->setHiddenFlag(cl::Hidden);
     24    Map["enable-misched"]->setHiddenFlag(cl::Hidden);
     25    Map["enable-tbaa"]->setHiddenFlag(cl::Hidden);
     26    Map["exhaustive-register-search"]->setHiddenFlag(cl::Hidden);
     27    Map["fatal-assembler-warnings"]->setHiddenFlag(cl::Hidden);
     28    Map["join-liveintervals"]->setHiddenFlag(cl::Hidden);
     29    Map["limit-float-precision"]->setHiddenFlag(cl::Hidden);
     30    Map["mc-x86-disable-arith-relaxation"]->setHiddenFlag(cl::Hidden);
     31    Map["limit-float-precision"]->setHiddenFlag(cl::Hidden);
     32    Map["print-after-all"]->setHiddenFlag(cl::Hidden);
     33    Map["print-before-all"]->setHiddenFlag(cl::Hidden);
     34    Map["print-machineinstrs"]->setHiddenFlag(cl::Hidden);
     35    Map["regalloc"]->setHiddenFlag(cl::Hidden);
     36    Map["rng-seed"]->setHiddenFlag(cl::Hidden);
     37    Map["spiller"]->setHiddenFlag(cl::Hidden);
     38    Map["stackmap-version"]->setHiddenFlag(cl::Hidden);
     39    Map["x86-asm-syntax"]->setHiddenFlag(cl::Hidden);
     40    Map["verify-debug-info"]->setHiddenFlag(cl::Hidden);
     41    Map["verify-dom-info"]->setHiddenFlag(cl::Hidden);
     42    Map["verify-loop-info"]->setHiddenFlag(cl::Hidden);
     43    Map["verify-regalloc"]->setHiddenFlag(cl::Hidden);
     44    Map["verify-scev"]->setHiddenFlag(cl::Hidden);
     45   
     46   
     47    cl::OptionCategory aRegexSourceOptions("Regular Expression Options",
     48                                          "These options control the regular expression source.");
     49   
     50    cl::OptionCategory bGrepOutputOptions("Output Options",
     51                                         "These options control the output.");
     52   
     53    int firstInputFile = 1;  // Normal case when first positional arg is a regex.
    2154    cl::list<std::string> inputFiles(cl::Positional, cl::desc("<regex> <input file ...>"), cl::OneOrMore);
    2255   
    23     cl::opt<bool> CountOnly("c", cl::desc("Count and display the matching lines per file only."));
     56    cl::opt<bool> CountOnly("c", cl::desc("Count and display the matching lines per file only."), cl::cat(bGrepOutputOptions));
    2457    cl::alias CountOnlyLong("-count", cl::desc("Alias for -c"), cl::aliasopt(CountOnly));
    2558   
    26     cl::opt<bool> ShowFileNames("H", cl::desc("Show the file name with each matching line."));
     59    cl::opt<bool> ShowFileNames("H", cl::desc("Show the file name with each matching line."), cl::cat(bGrepOutputOptions));
    2760    cl::alias ShowFileNamesLong("-with-filename", cl::desc("Alias for -H"), cl::aliasopt(ShowFileNames));
    2861   
    29     cl::opt<bool> ShowLineNumbers("n", cl::desc("Show the line number with each matching line."));
     62    cl::opt<bool> ShowLineNumbers("n", cl::desc("Show the line number with each matching line."), cl::cat(bGrepOutputOptions));
    3063    cl::alias ShowLineNumbersLong("-line-number", cl::desc("Alias for -n"), cl::aliasopt(ShowLineNumbers));
    3164   
    32     cl::list<std::string> regexVector("e", cl::desc("Regular exprssion"), cl::ZeroOrMore);
     65    cl::list<std::string> regexVector("e", cl::desc("Regular expression"), cl::ZeroOrMore, cl::cat(aRegexSourceOptions));
    3366   
    34     cl::opt<std::string> RegexFilename("f", cl::desc("Take regular expressions (one per line) from a file"), cl::value_desc("regex file"), cl::init(""));
     67    cl::opt<std::string> RegexFilename("f", cl::desc("Take regular expressions (one per line) from a file"), cl::value_desc("regex file"), cl::init(""), cl::cat(aRegexSourceOptions));
    3568 
    3669    // Does -b mean the byte offset of the line, or the byte offset of the match start within the line?
  • icGREP/icgrep-devel/icgrep/pablo/pablo_compiler.cpp

    r4348 r4353  
    6060//#define DUMP_GENERATED_IR
    6161#include "llvm/Support/CommandLine.h"
    62 static cl::opt<bool> DumpGeneratedIR("dump-generated-IR", cl::init(false), cl::desc("print LLVM IR generated by RE compilation"));
     62
     63cl::OptionCategory eIRDumpOptions("LLVM IR Dump Options",
     64                                    "These options control dumping of LLVM IR.");
     65
     66static cl::opt<bool> DumpGeneratedIR("dump-generated-IR", cl::init(false), cl::desc("print LLVM IR generated by RE compilation"), cl::cat(eIRDumpOptions));
    6367
    6468extern "C" {
Note: See TracChangeset for help on using the changeset viewer.