Ignore:
Timestamp:
Jan 17, 2017, 12:00:43 PM (3 years ago)
Author:
cameron
Message:

New doSegment partial progress

File:
1 edited

Legend:

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

    r5260 r5263  
    2929   
    3030    Function::arg_iterator args = doSegmentFunction->arg_begin();
    31     Value * self = &*(args);
     31    Value * self = &*(args++);
    3232   
    3333    Value * fileItems = getScalarField(self, "fileSize");
     
    5555}
    5656
    57 void MMapSourceKernel::generateFinalSegmentMethod() const {
    58     auto savePoint = iBuilder->saveIP();
    59     Module * m = iBuilder->getModule();
    60     Function * finalSegmentFunction = m->getFunction(mKernelName + finalSegment_suffix);
    61     iBuilder->SetInsertPoint(BasicBlock::Create(iBuilder->getContext(), "entry", finalSegmentFunction, 0));
    62        
    63     Function::arg_iterator args = finalSegmentFunction->arg_begin();
    64     Value * self = &*(args++);
    65     Value * blocksToDo = &*(args);
    66    
    67     createDoSegmentCall(self, blocksToDo);
    68 
    69     iBuilder->CreateRetVoid();
    70     iBuilder->restoreIP(savePoint);
    71 }
    72 
    73 
    7457// The doBlock method is deprecated.   But in case it is used, just call doSegment with
    7558// 1 as the number of blocks to do.
     
    8164    iBuilder->SetInsertPoint(BasicBlock::Create(iBuilder->getContext(), "entry", doBlockFunction, 0));
    8265    Value * self = getParameter(doBlockFunction, "self");
    83     iBuilder->CreateCall(doSegmentFunction, {self, iBuilder->getSize(1)});
     66    iBuilder->CreateCall(doSegmentFunction, {self, ConstantInt::getNullValue(iBuilder->getInt1Ty())});
    8467    iBuilder->CreateRetVoid();
    8568    iBuilder->restoreIP(savePoint);
Note: See TracChangeset for help on using the changeset viewer.