Ignore:
Timestamp:
Jun 25, 2016, 9:07:07 AM (3 years ago)
Author:
cameron
Message:

Kernel infrastructure: move common logic into KernelBuilder? base class; demo linking in wc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/p2s_kernel.cpp

    r5071 r5074  
    4747}
    4848               
    49 void p2sKernel::generateKernel() {
     49void p2sKernel::generateDoBlockMethod() {
    5050    IDISA::IDISA_Builder::InsertPoint savePoint = iBuilder->saveIP();
    51     if (mKernelStateType == nullptr) finalizeKernelStateType();
    52     KernelBuilder::generateKernel();
    53 
    5451    Module * m = iBuilder->getModule();
    55     addTrivialFinalBlockMethod(m);
     52   
    5653    Function * doBlockFunction = m->getFunction(mKernelName + doBlock_suffix);
    5754   
     
    7370}
    7471       
    75 void p2s_16Kernel::generateKernel() {
     72void p2s_16Kernel::generateDoBlockMethod() {
    7673    IDISA::IDISA_Builder::InsertPoint savePoint = iBuilder->saveIP();
    77     if (mKernelStateType == nullptr) finalizeKernelStateType();
    78     KernelBuilder::generateKernel();
    79 
    8074    Module * m = iBuilder->getModule();
    81     addTrivialFinalBlockMethod(m);
     75   
    8276    Function * doBlockFunction = m->getFunction(mKernelName + doBlock_suffix);
    8377   
     
    125119const size_t OutputBufferSize=65536;
    126120
    127 void p2s_16Kernel_withCompressedOutputKernel::generateKernel() {
     121void p2s_16Kernel_withCompressedOutputKernel::generateDoBlockMethod() {
    128122    outs().SetBufferSize(OutputBufferSize);
    129123    IDISA::IDISA_Builder::InsertPoint savePoint = iBuilder->saveIP();
    130     if (mKernelStateType == nullptr) finalizeKernelStateType();
    131     KernelBuilder::generateKernel();
    132 
    133    
    134124    Module * m = iBuilder->getModule();
    135125    Type * i8PtrTy = iBuilder->getInt8PtrTy();
     
    139129    Function * writefn = cast<Function>(m->getOrInsertFunction("buffered_write", iBuilder->getVoidTy(), i8PtrTy, i64, nullptr));
    140130
    141     addTrivialFinalBlockMethod(m);
    142131    Function * doBlockFunction = m->getFunction(mKernelName + doBlock_suffix);
    143132   
Note: See TracChangeset for help on using the changeset viewer.