Ignore:
Timestamp:
Jul 2, 2017, 10:00:26 AM (23 months ago)
Author:
cameron
Message:

Ensure size of dynamic buffers is a multiple of cache line size

Location:
icGREP/icgrep-devel/icgrep/IR_Gen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.cpp

    r5541 r5543  
    7878}
    7979
    80 
     80Value * CBuilder::CreateRoundUp(Value * number, Value * divisor, const Twine &Name) {
     81    return CreateMul(CreateUDivCeil(number, divisor), divisor, Name);
     82}
    8183
    8284Value * CBuilder::CreateOpenCall(Value * filename, Value * oflag, Value * mode) {
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.h

    r5541 r5543  
    5656    // Equivalent to CreateUDiv(CreateAdd(number, CreateSub(divisor, ConstantInt::get(divisor->getType(), 1))), divisor)
    5757    llvm::Value * CreateUDivCeil(llvm::Value * number, llvm::Value * divisor, const llvm::Twine &Name = "");
    58        
     58   
     59    // Round up to a multiple of divisor.
     60    llvm::Value * CreateRoundUp(llvm::Value * number, llvm::Value * divisor, const llvm::Twine &Name = "");
     61           
    5962    llvm::Value * CreateMalloc(llvm::Value * size);
    6063
Note: See TracChangeset for help on using the changeset viewer.