Ignore:
Timestamp:
Jan 14, 2017, 3:49:56 PM (3 years ago)
Author:
nmedfort
Message:

Changes working towards simplifying accessing stream elements + some modifications to simplify include / forward declarations within the CodeGen? library.

File:
1 edited

Legend:

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

    r5246 r5260  
    88#include <cc/cc_compiler.h>
    99#include <pablo/builder.hpp>
     10#include <llvm/IR/Module.h>
    1011
    1112using namespace cc;
     
    2526    Value * blockNo = getScalarField(self, blockNoScalar);
    2627   
    27     Value * codeUnitStreamBlock_ptr = getStreamSetBlockPtr(self, "codeUnitStream", blockNo);
    28     Value * ccStreamBlock_ptr = getStreamSetBlockPtr(self, "ccStream", blockNo);
    29 
    3028    unsigned packCount = 8 * mCodeUnitSize; 
    3129    unsigned codeUnitWidth = 8 * mCodeUnitSize;
    3230    Value * codeUnitPack[packCount];
    3331    for (unsigned i = 0; i < packCount; i++) {
    34         codeUnitPack[i] = iBuilder->CreateBlockAlignedLoad(codeUnitStreamBlock_ptr, {iBuilder->getInt32(0), iBuilder->getInt32(0), iBuilder->getInt32(i)});
     32        Value * ptr = getStream(self, "codeUnitStream", blockNo, iBuilder->getInt32(0), iBuilder->getInt32(i));
     33        codeUnitPack[i] = iBuilder->CreateBlockAlignedLoad(ptr);
    3534    }
    3635
    37     std::vector<Value *> ccStreams;
    3836    for (unsigned j = 0; j < mCharClasses.size();  j++) {
    3937        Value * theCCstream = iBuilder->allZeroes();
     
    6866            theCCstream = iBuilder->simd_or(theCCstream, pack);
    6967        }
    70         iBuilder->CreateBlockAlignedStore(theCCstream, ccStreamBlock_ptr, {iBuilder->getInt32(0), iBuilder->getInt32(j)});
     68        Value * ptr = getStream(self, "ccStream", blockNo, iBuilder->getInt32(j));
     69        iBuilder->CreateBlockAlignedStore(theCCstream, ptr);
    7170    }
    7271 
Note: See TracChangeset for help on using the changeset viewer.