Ignore:
Timestamp:
Feb 22, 2017, 4:23:51 PM (2 years ago)
Author:
nmedfort
Message:

Added a simple CreateAssert? function in CBuilder and ReadOnly? flag for getStreamSetBufferPtr method to prevent expanding input stream sets. Begun work on CarryManager? to preallocate variable-length carry data slots.

File:
1 edited

Legend:

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

    r5329 r5340  
    4444}
    4545
    46 void PabloCompiler::initializeKernelData() {
    47     Examine();
    48     mCarryManager->initializeCarryData(mKernel);
    49 }
    50    
    5146void PabloCompiler::compile() {
    5247
     
    6358}
    6459
    65 inline void PabloCompiler::Examine() {
    66     Examine(mKernel->getEntryBlock());
    67 }
    68 
    69 void PabloCompiler::Examine(const PabloBlock * const block) {
     60void PabloCompiler::initializeKernelData() {
     61    examineBlock(mKernel->getEntryBlock());
     62    mCarryManager->initializeCarryData(mKernel);
     63}
     64
     65void PabloCompiler::allocateKernelData() {
     66    mCarryManager->allocateCarryData(mKernel);
     67}
     68
     69void PabloCompiler::examineBlock(const PabloBlock * const block) {
    7070    for (const Statement * stmt : *block) {
    7171        if (LLVM_UNLIKELY(isa<Lookahead>(stmt))) {
     
    7676            }
    7777        } else if (LLVM_UNLIKELY(isa<Branch>(stmt))) {
    78             Examine(cast<Branch>(stmt)->getBody());
     78            examineBlock(cast<Branch>(stmt)->getBody());
    7979        } else if (LLVM_UNLIKELY(isa<Count>(stmt))) {
    8080            mAccumulator.insert(std::make_pair(stmt, iBuilder->getInt32(mKernel->addUnnamedScalar(stmt->getType()))));
Note: See TracChangeset for help on using the changeset viewer.