Ignore:
Timestamp:
Jun 6, 2017, 6:20:55 PM (2 years ago)
Author:
cameron
Message:

Restore check-ins from the last several days

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.h

    r5489 r5493  
    4646    }
    4747   
    48     llvm::LoadInst * CreateBlockAlignedLoad(llvm::Value * const ptr);
    49     llvm::LoadInst * CreateBlockAlignedLoad(llvm::Value * const ptr, llvm::Value * const index);
    50     llvm::LoadInst * CreateBlockAlignedLoad(llvm::Value * const ptr, std::initializer_list<llvm::Value *> indices);
     48    llvm::LoadInst * CreateBlockAlignedLoad(llvm::Value * const ptr) {
     49        return CreateAlignedLoad(ptr, mBitBlockWidth / 8);
     50    }
    5151
    52     void CreateBlockAlignedStore(llvm::Value * const value, llvm::Value * const ptr);
    53     void CreateBlockAlignedStore(llvm::Value * const value, llvm::Value * const ptr, llvm::Value * const index);
    54     void CreateBlockAlignedStore(llvm::Value * const value, llvm::Value * const ptr, std::initializer_list<llvm::Value *> indices);
     52    llvm::LoadInst * CreateBlockAlignedLoad(llvm::Value * const ptr, llvm::Value * const index) {
     53        return CreateBlockAlignedLoad(CreateGEP(ptr, index));
     54    }
     55
     56    llvm::LoadInst * CreateBlockAlignedLoad(llvm::Value * const ptr, std::initializer_list<llvm::Value *> indices) {
     57        return CreateBlockAlignedLoad(CreateGEP(ptr, indices));
     58    }
     59
     60    llvm::StoreInst * CreateBlockAlignedStore(llvm::Value * const value, llvm::Value * const ptr) {
     61        return CreateAlignedStore(value, ptr, mBitBlockWidth / 8);
     62    }
     63
     64    llvm::StoreInst * CreateBlockAlignedStore(llvm::Value * const value, llvm::Value * const ptr, llvm::Value * const index) {
     65        return CreateBlockAlignedStore(value, CreateGEP(ptr, index));
     66    }
     67
     68    llvm::StoreInst * CreateBlockAlignedStore(llvm::Value * const value, llvm::Value * const ptr, std::initializer_list<llvm::Value *> indices) {
     69        return CreateBlockAlignedStore(value, CreateGEP(ptr, indices));
     70    }
     71
     72    llvm::Value * CreateBlockAlignedMalloc(llvm::Value * size) {
     73        return CreateAlignedMalloc(size, mBitBlockWidth / 8);
     74    }
    5575
    5676    llvm::VectorType * fwVectorType(const unsigned fw);
     
    145165    llvm::Constant * const      mZeroInitializer;
    146166    llvm::Constant * const      mOneInitializer;
    147 
    148167    llvm::Constant *            mPrintRegisterFunction;
    149168};
    150169
    151 inline llvm::LoadInst * IDISA_Builder::CreateBlockAlignedLoad(llvm::Value * const ptr, llvm::Value * const index) {
    152     return CreateBlockAlignedLoad(CreateGEP(ptr, index));
    153 }
    154 
    155 inline llvm::LoadInst * IDISA_Builder::CreateBlockAlignedLoad(llvm::Value * const ptr, std::initializer_list<llvm::Value *> indices) {
    156     return CreateBlockAlignedLoad(CreateGEP(ptr, indices));
    157 }
    158 
    159 inline void IDISA_Builder::CreateBlockAlignedStore(llvm::Value * const value, llvm::Value * const ptr, llvm::Value * const index) {
    160     CreateBlockAlignedStore(value, CreateGEP(ptr, index));
    161 }
    162 
    163 inline void IDISA_Builder::CreateBlockAlignedStore(llvm::Value * const value, llvm::Value * const ptr, std::initializer_list<llvm::Value *> indices) {
    164     CreateBlockAlignedStore(value, CreateGEP(ptr, indices));
    165 }
    166 
    167170}
    168171#endif // IDISA_BUILDER_H
Note: See TracChangeset for help on using the changeset viewer.