Ignore:
Timestamp:
Mar 14, 2017, 7:06:06 PM (3 years ago)
Author:
cameron
Message:

Consolidate pipeline compiler options in toolchain

File:
1 edited

Legend:

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

    r5361 r5364  
    2323#include <llvm/Transforms/Utils/Local.h>
    2424#include <object_cache.h>
     25#include <kernels/pipeline.h>
    2526#ifdef CUDA_ENABLED
    2627#include <IR_Gen/llvm2ptx.h>
     
    7980
    8081bool DebugOptionIsSet(DebugFlags flag) {return DebugOptions.isSet(flag);}
     82
     83static cl::opt<bool> pipelineParallel("enable-pipeline-parallel", cl::desc("Enable multithreading with pipeline parallelism."), cl::cat(CodeGenOptions));
     84   
     85static cl::opt<bool> segmentPipelineParallel("enable-segment-pipeline-parallel", cl::desc("Enable multithreading with segment pipeline parallelism."), cl::cat(CodeGenOptions));
     86   
    8187
    8288   
     
    239245}
    240246
    241 
     247void generatePipeline(IDISA::IDISA_Builder * iBuilder, const std::vector<kernel::KernelBuilder *> & kernels) {
     248    if (codegen::pipelineParallel) {
     249        generateParallelPipeline(iBuilder, kernels);
     250    } else if (codegen::segmentPipelineParallel) {
     251        generateSegmentParallelPipeline(iBuilder, kernels);
     252    } else {
     253        codegen::ThreadNum = 1;
     254        generatePipelineLoop(iBuilder, kernels);
     255    }
     256}
     257
     258
Note: See TracChangeset for help on using the changeset viewer.