Ignore:
Timestamp:
May 8, 2016, 7:01:04 PM (3 years ago)
Author:
cameron
Message:

Add EOFmask internal state value to generated Pablo functions; implement pablo.inFile

File:
1 edited

Legend:

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

    r5031 r5035  
    112112
    113113    mCarryManager->initialize(function, mKernelBuilder);
    114 
     114   
     115    mKernelBuilder->addInternalState(mBitBlockType, "EOFmask");
     116   
    115117    mFunction = mKernelBuilder->prepareFunction({mInputStreamOffset.begin(), mInputStreamOffset.end()});
    116118
     
    396398    } else if (const InFile * e = dyn_cast<InFile>(stmt)) {
    397399        // Currently InFile(x) => x;  a no-op
    398         expr = compileExpression(e->getExpr());
     400        Value * EOFmask = iBuilder->CreateLoad(mKernelBuilder->getInternalState("EOFmask"));
     401        expr = iBuilder->simd_and(compileExpression(e->getExpr()), iBuilder->simd_not(EOFmask));
    399402    } else if (const Count * c = dyn_cast<Count>(stmt)) {
    400403        Value * const to_count = compileExpression(c->getExpr());
Note: See TracChangeset for help on using the changeset viewer.