Ignore:
Timestamp:
Mar 29, 2017, 2:29:52 PM (2 years ago)
Author:
nmedfort
Message:

Support for stdin. Needs more testing.

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

Legend:

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

    r5350 r5377  
    1818namespace IDISA {
    1919
    20 VectorType * IDISA_Builder::fwVectorType(unsigned fw) {
    21     int fieldCount = mBitBlockWidth/fw;
    22     return VectorType::get(getIntNTy(fw), fieldCount);
    23 }
    24 
    25 Value * IDISA_Builder::fwCast(unsigned fw, Value * a) {
    26     return a->getType() == fwVectorType(fw) ? a : CreateBitCast(a, fwVectorType(fw));
     20VectorType * IDISA_Builder::fwVectorType(const unsigned fw) {
     21    return VectorType::get(getIntNTy(fw), mBitBlockWidth / fw);
     22}
     23
     24Value * IDISA_Builder::fwCast(const unsigned fw, Value * const a) {
     25    VectorType * const ty = fwVectorType(fw);
     26    assert (a->getType()->canLosslesslyBitCastTo(fwVectorType(fw)));
     27    return CreateBitCast(a, ty);
    2728}
    2829
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.h

    r5374 r5377  
    2929
    3030    llvm::Value * bitCast(llvm::Value * a) {
    31         return (a->getType() == mBitBlockType) ? a : CreateBitCast(a, mBitBlockType);
     31        return CreateBitCast(a, mBitBlockType);
    3232    }
    3333
     
    5656    void CreateBlockAlignedStore(llvm::Value * const value, llvm::Value * const ptr, std::initializer_list<llvm::Value *> indices);
    5757
    58     llvm::VectorType * fwVectorType(unsigned fw);
     58    llvm::VectorType * fwVectorType(const unsigned fw);
    5959
    6060    llvm::Constant * simd_himask(unsigned fw);
Note: See TracChangeset for help on using the changeset viewer.