Ignore:
Timestamp:
Jan 31, 2017, 4:08:11 PM (2 years ago)
Author:
nmedfort
Message:

Removed 'function' and 'self' parameters from generateXXXMethod() functions.

File:
1 edited

Legend:

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

    r5260 r5292  
    5353std::pair<Value *, Value *> IDISA_NVPTX20_Builder::bitblock_advance(Value * a, Value * shiftin, unsigned shift) {
    5454    Value * id = CreateCall(tidFunc);
    55     Value * retVal = CreateCall(mLongAdvanceFunc, std::vector<Value *>({id, a, CreateBitCast(getInt64(shift), mBitBlockType), shiftin}));
    56     Value * shifted = CreateExtractValue(retVal, std::vector<unsigned>({0}));
    57     Value * shiftOut = CreateExtractValue(retVal, std::vector<unsigned>({1}));
     55    Value * retVal = CreateCall(mLongAdvanceFunc, {id, a, CreateBitCast(getInt64(shift), mBitBlockType), shiftin});
     56    Value * shifted = CreateExtractValue(retVal, {0});
     57    Value * shiftOut = CreateExtractValue(retVal, {1});
    5858    return std::pair<Value *, Value *>(shiftOut, shifted);
    5959}
     
    6161std::pair<Value *, Value *> IDISA_NVPTX20_Builder::bitblock_add_with_carry(Value * a, Value * b, Value * carryIn) {
    6262    Value * id = CreateCall(tidFunc);
    63     Value * retVal = CreateCall(mLongAddFunc, std::vector<Value *>({id, a, b, carryIn}));
    64     Value * sum = CreateExtractValue(retVal, std::vector<unsigned>({0}));
    65     Value * carry_out_strm = CreateExtractValue(retVal, std::vector<unsigned>({1}));
     63    Value * retVal = CreateCall(mLongAddFunc, {id, a, b, carryIn});
     64    Value * sum = CreateExtractValue(retVal, {0});
     65    Value * carry_out_strm = CreateExtractValue(retVal, {1});
    6666    return std::pair<Value *, Value *>(carry_out_strm, sum);
    6767}
     
    7070
    7171    Type * const carryTy = ArrayType::get(mBitBlockType, groupThreads+1);
    72     carry = new GlobalVariable(/*Module=*/*mMod,
     72    carry = new GlobalVariable(*mMod,
    7373        /*Type=*/carryTy,
    7474        /*isConstant=*/false,
     
    8383    Type * const bubbleTy = ArrayType::get(mBitBlockType, groupThreads);
    8484
    85     bubble = new GlobalVariable(/*Module=*/*mMod,
     85    bubble = new GlobalVariable(*mMod,
    8686        /*Type=*/bubbleTy,
    8787        /*isConstant=*/false,
     
    111111void IDISA_NVPTX20_Builder::CreateLongAdvanceFunc(){
    112112  Type * const int32ty = getInt32Ty();
    113   Type * returnType = StructType::get(mMod->getContext(), std::vector<Type *>({mBitBlockType, mBitBlockType}));
     113  Type * returnType = StructType::get(mMod->getContext(), {mBitBlockType, mBitBlockType});
    114114
    115115  mLongAdvanceFunc = cast<Function>(mMod->getOrInsertFunction("LongAdvance", returnType, int32ty, mBitBlockType, mBitBlockType, mBitBlockType, nullptr));
     
    159159  Type * const int64ty = getInt64Ty();
    160160  Type * const int32ty = getInt32Ty();
    161   Type * returnType = StructType::get(mMod->getContext(), std::vector<Type *>({mBitBlockType, mBitBlockType}));
     161  Type * returnType = StructType::get(mMod->getContext(), {mBitBlockType, mBitBlockType});
    162162
    163163  mLongAddFunc = cast<Function>(mMod->getOrInsertFunction("LongAdd", returnType, int32ty, mBitBlockType, mBitBlockType, mBitBlockType, nullptr));
Note: See TracChangeset for help on using the changeset viewer.