Ignore:
Timestamp:
Oct 5, 2015, 8:30:12 AM (4 years ago)
Author:
cameron
Message:

Encapsulating all-zeroes and all-ones initializers within IDISA builder

File:
1 edited

Legend:

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

    r4720 r4821  
    88 */
    99#include <llvm/IR/Module.h>
     10#include <llvm/IR/Constant.h>
    1011#include <llvm/IR/Type.h>
    1112#include <llvm/IR/Value.h>
     
    2324    , mLLVMBuilder(nullptr)
    2425    , mBitBlockType(bitBlockType)
    25     , mBitBlockSize(bitBlockType->isIntegerTy() ? cast<IntegerType>(bitBlockType)->getIntegerBitWidth() : cast<VectorType>(bitBlockType)->getBitWidth()) {
     26    , mBitBlockSize(bitBlockType->isIntegerTy() ? cast<IntegerType>(bitBlockType)->getIntegerBitWidth() : cast<VectorType>(bitBlockType)->getBitWidth())
     27    , mZeroInitializer(Constant::getNullValue(bitBlockType))
     28    , mOneInitializer(Constant::getAllOnesValue(bitBlockType)) {
    2629
    2730    }
     
    3134        mLLVMBuilder = b;
    3235    }
     36   
     37    Type * getBitBlockType() { return mBitBlockType;}
     38    int getBitBlockSize() { return mBitBlockSize;}
     39    Constant * allZeroes() {return mZeroInitializer;}
     40    Constant * allOnes() {return mOneInitializer;}
    3341       
    3442    Value * simd_add(unsigned fw, Value * a, Value * b);
     
    7179    Type * mBitBlockType;
    7280    unsigned mBitBlockSize;
     81    Constant * mZeroInitializer;
     82    Constant * mOneInitializer;
    7383   
    7484    Value * bitBlockCast(Value * a);
Note: See TracChangeset for help on using the changeset viewer.