Changeset 5034


Ignore:
Timestamp:
May 6, 2016, 6:20:47 PM (17 months ago)
Author:
cameron
Message:

Clean out duplicate parameters for wc

File:
1 edited

Legend:

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

    r5033 r5034  
    5959             clEnumValEnd), cl::cat(wcFlags), cl::Grouping);
    6060                                                 
    61 static cl::OptionCategory eIRDumpOptions("LLVM IR Dump Options", "These options control dumping of LLVM IR.");
    62 static cl::opt<bool> DumpGeneratedIR("dump-generated-IR", cl::init(false), cl::desc("Print LLVM IR generated by Pablo Compiler."), cl::cat(eIRDumpOptions));
    63 
    64 static cl::OptionCategory cMachineCodeOptimization("Machine Code Optimizations", "These options control back-end compilier optimization levels.");
    65 
    66 static cl::opt<char> OptLevel("O", cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] (default = '-O0')"),
    67                               cl::cat(cMachineCodeOptimization), cl::Prefix, cl::ZeroOrMore, cl::init('0'));
    68 
    69 static cl::opt<unsigned> SegmentSize("segment-size", cl::desc("Segment Size"), cl::value_desc("positive integer"), cl::init(1));
    7061
    7162
     
    185176
    186177void wcPipelineBuilder::CreateKernels(PabloFunction * function){
    187     mS2PKernel = new KernelBuilder(iBuilder, "s2p", SegmentSize);
    188     mWC_Kernel = new KernelBuilder(iBuilder, "wc", SegmentSize);
     178    mS2PKernel = new KernelBuilder(iBuilder, "s2p", codegen::SegmentSize);
     179    mWC_Kernel = new KernelBuilder(iBuilder, "wc", codegen::SegmentSize);
    189180   
    190181    generateS2PKernel(mMod, iBuilder, mS2PKernel);
     
    234225    BasicBlock * segmentCondBlock = nullptr;
    235226    BasicBlock * segmentBodyBlock = nullptr;
    236     const unsigned segmentSize = SegmentSize;
     227    const unsigned segmentSize = codegen::SegmentSize;
    237228    if (segmentSize > 1) {
    238229        segmentCondBlock = BasicBlock::Create(mMod->getContext(), "segmentCond", main, 0);
     
    331322                           
    332323    Module * M = new Module("wc", getGlobalContext());
    333    
    334324    IDISA::IDISA_Builder * idb = IDISA::GetIDISA_Builder(M);
    335325
    336326    wcPipelineBuilder pipelineBuilder(M, idb);
    337 
    338327    Encoding encoding(Encoding::Type::UTF_8, 8);
    339    
    340328    pablo::PabloFunction * function = wc_gen(encoding);
    341    
    342 
    343329    pipelineBuilder.CreateKernels(function);
    344 
    345330    llvm::Function * main_IR = pipelineBuilder.ExecuteKernels();
    346    
    347     if (DumpGeneratedIR) {
    348         M->dump();
    349     }
    350    
    351     //verifyModule(*M, &dbgs());
    352     //std::cerr << "ExecuteKernels(); done\n";
     331
    353332    wcEngine = JIT_to_ExecutionEngine(M);
    354333   
    355334    wcEngine->finalizeObject();
    356     //std::cerr << "finalizeObject(); done\n";
    357335
    358336    delete idb;
Note: See TracChangeset for help on using the changeset viewer.