Ignore:
Timestamp:
May 6, 2015, 8:27:36 AM (4 years ago)
Author:
cameron
Message:

Tracing options; make all command line options static

File:
1 edited

Legend:

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

    r4543 r4544  
    4747#include <iostream>
    4848
    49 cl::OptionCategory eIRDumpOptions("LLVM IR Dump Options", "These options control dumping of LLVM IR.");
     49static cl::OptionCategory eIRDumpOptions("LLVM IR Dump Options", "These options control dumping of LLVM IR.");
    5050static cl::opt<bool> DumpGeneratedIR("dump-generated-IR", cl::init(false), cl::desc("print LLVM IR generated by RE compilation"), cl::cat(eIRDumpOptions));
     51
     52static cl::OptionCategory fTracingOptions("Run-time Tracing Options", "These options control execution traces.");
     53static cl::opt<bool> TraceNext("trace-next-nodes", cl::init(false), cl::desc("Generate dynamic traces of executed Next nodes (while control variables)."), cl::cat(fTracingOptions));
     54static cl::opt<bool> DumpTrace("dump-trace", cl::init(false), cl::desc("Generate dynamic traces of executed assignments."), cl::cat(fTracingOptions));
    5155
    5256extern "C" {
     
    638642    if (const Assign * assign = dyn_cast<const Assign>(stmt)) {
    639643        Value * expr = compileExpression(assign->getExpr());
     644        if (DumpTrace) {
     645            genPrintRegister(assign->getName()->to_string(), expr);
     646        }
    640647        mMarkerMap[assign] = expr;
    641648        if (LLVM_UNLIKELY(assign->isOutputAssignment())) {
     
    645652    else if (const Next * next = dyn_cast<const Next>(stmt)) {
    646653        Value * expr = compileExpression(next->getExpr());
     654        if (TraceNext) {
     655            genPrintRegister(next->getInitial()->getName()->to_string(), expr);
     656        }
    647657        mMarkerMap[next->getInitial()] = expr;
    648658    }
Note: See TracChangeset for help on using the changeset viewer.