Ignore:
Timestamp:
Feb 27, 2017, 2:30:14 PM (2 years ago)
Author:
nmedfort
Message:

Update to BlockOrientedKernel? to move the indirect branch out of the StrideLoopBody? and into StrideLoopDone? to simplify branch prediction.

File:
1 edited

Legend:

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

    r5347 r5351  
    158158
    159159    iBuilder->CreateBr(ifEndBlock);
     160
     161    ifEndBlock->moveAfter(ifExitBlock);
     162
    160163    //End Block
    161164    iBuilder->SetInsertPoint(ifEndBlock);
     
    285288
    286289    // After the whileBody has been compiled, we may be in a different basic block.
    287     BasicBlock * whileExitBlock = iBuilder->GetInsertBlock();
     290    BasicBlock * const whileExitBlock = iBuilder->GetInsertBlock();
    288291
    289292    mCarryManager->leaveLoopBody(whileExitBlock);
     
    336339
    337340    iBuilder->CreateCondBr(condition, whileBodyBlock, whileEndBlock);
     341
     342    whileEndBlock->moveAfter(whileExitBlock);
    338343
    339344    iBuilder->SetInsertPoint(whileEndBlock);
Note: See TracChangeset for help on using the changeset viewer.