Ignore:
Timestamp:
Nov 7, 2016, 12:08:13 PM (3 years ago)
Author:
nmedfort
Message:

More 32-bit fixes.

File:
1 edited

Legend:

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

    r5192 r5204  
    2626    , mMod(m)
    2727    , mCacheLineAlignment(CacheAlignment)
     28    , mIsArch32Bit(Triple(llvm::sys::getProcessTriple()).isArch32Bit())
    2829    , mBitBlockType(bitBlockType)
    2930    , mBitBlockWidth(bitBlockType->isIntegerTy() ? cast<IntegerType>(bitBlockType)->getIntegerBitWidth() : cast<VectorType>(bitBlockType)->getBitWidth())
     
    141142    Value * fwCast(unsigned fw, Value * a);
    142143   
    143     inline llvm::Type * getSizeTy() {return Triple(llvm::sys::getProcessTriple()).isArch32Bit() ? getInt32Ty() : getInt64Ty();}
     144    inline bool isArch32Bit() const {
     145        return mIsArch32Bit;
     146    }
     147
     148    inline llvm::IntegerType * getSizeTy() {
     149        return isArch32Bit() ? getInt32Ty() : getInt64Ty();
     150    }
    144151   
    145152    inline llvm::AllocaInst * CreateCacheAlignedAlloca(llvm::Type * Ty, llvm::Value * ArraySize = nullptr) {
     
    155162    Module * mMod;
    156163    unsigned mCacheLineAlignment;
     164    const bool mIsArch32Bit;
    157165    Type * mBitBlockType;
    158166    unsigned mBitBlockWidth;
     
    161169    Constant * mOneInitializer;
    162170    Constant * mPrintRegisterFunction;
     171
    163172   
    164173    VectorType * fwVectorType(unsigned fw);
Note: See TracChangeset for help on using the changeset viewer.