Changeset 5014


Ignore:
Timestamp:
Apr 21, 2016, 12:18:06 PM (19 months ago)
Author:
cameron
Message:

Some updates for compatibility with LLVM 3.8

Location:
icGREP/icgrep-devel/icgrep
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IDISA/idisa_avx_builder.cpp

    r4997 r5014  
    106106    if ((fw == 128) && (mBitBlockWidth == 256)) {
    107107        Value * vperm2i128func = Intrinsic::getDeclaration(mMod, Intrinsic::x86_avx2_vperm2i128);
    108         return CreateCall3(vperm2i128func, fwCast(64, a), fwCast(64, b), getInt8(0x31));
     108        return CreateCall(vperm2i128func, {fwCast(64, a), fwCast(64, b), getInt8(0x31)});
    109109    }
    110110    // Otherwise use default SSE logic.
     
    115115    if ((fw == 128) && (mBitBlockWidth == 256)) {
    116116        Value * vperm2i128func = Intrinsic::getDeclaration(mMod, Intrinsic::x86_avx2_vperm2i128);
    117         return CreateCall3(vperm2i128func, fwCast(64, a), fwCast(64, b), getInt8(0x20));
     117        return CreateCall(vperm2i128func, {fwCast(64, a), fwCast(64, b), getInt8(0x20)});
    118118    }
    119119    // Otherwise use default SSE logic.
     
    126126        Value * a_low = fwCast(16, simd_and(a, simd_lomask(fw)));
    127127        Value * b_low = fwCast(16, simd_and(b, simd_lomask(fw)));
    128         Value * pack = CreateCall2(vpackuswbfunc, a_low, b_low);
     128        Value * pack = CreateCall(vpackuswbfunc, {a_low, b_low});
    129129        return pack;
    130130    }
     
    138138        Value * a_low = simd_srli(fw, a, fw/2);
    139139        Value * b_low = simd_srli(fw, b, fw/2);
    140         Value * pack = CreateCall2(vpackuswbfunc, a_low, b_low);
     140        Value * pack = CreateCall(vpackuswbfunc, {a_low, b_low});
    141141        return pack;
    142142    }
  • icGREP/icgrep-devel/icgrep/IDISA/idisa_builder.cpp

    r5007 r5014  
    6363        std::vector<Value *> args;
    6464        args.push_back(geti8StrVal(*mMod, out.str().c_str(), ""));
    65         Value * const name = arg++;
     65        Value * const name = &*(arg++);
    6666        name->setName("name");
    6767        args.push_back(name);
    68         Value * value = arg;
     68        Value * value = &*arg;
    6969        value->setName("value");
    7070        Type * const byteVectorType = VectorType::get(getInt8Ty(), (mBitBlockWidth / 8));
     
    7979    }
    8080    assert (value->getType()->canLosslesslyBitCastTo(mBitBlockType));
    81     CreateCall2(printRegister, geti8StrVal(*mMod, name.c_str(), name), CreateBitCast(value, mBitBlockType));
     81    CreateCall(printRegister, {geti8StrVal(*mMod, name.c_str(), name), CreateBitCast(value, mBitBlockType)});
    8282}
    8383
     
    9393        std::vector<Value *> args;
    9494        args.push_back(geti8StrVal(*mMod, out.c_str(), ""));
    95         Value * const name = arg++;
     95        Value * const name = &*(arg++);
    9696        name->setName("name");
    9797        args.push_back(name);
    98         Value * value = arg;
     98        Value * value = &*arg;
    9999        value->setName("value");
    100100        args.push_back(value);
     
    111111    }
    112112    assert (num->getType()->isIntegerTy());
    113     CreateCall2(printRegister, geti8StrVal(*mMod, name.c_str(), name), num);
     113    CreateCall(printRegister, {geti8StrVal(*mMod, name.c_str(), name), num});
    114114}
    115115
     
    349349
    350350Value * IDISA_Builder::mvmd_srli(unsigned fw, Value * a, unsigned shift) {
    351     unsigned field_count = mBitBlockWidth/fw;
    352351    return mvmd_dslli(fw, Constant::getNullValue(fwVectorType(fw)), a, shift);
    353352}
  • icGREP/icgrep-devel/icgrep/IDISA/idisa_sse_builder.cpp

    r4999 r5014  
    1717    if ((fw == 16) && (mBitBlockWidth == 128)) {
    1818        Value * packuswb_func = Intrinsic::getDeclaration(mMod, Intrinsic::x86_sse2_packuswb_128);
    19         return CreateCall2(packuswb_func, simd_srli(16, a, 8), simd_srli(16, b, 8));
     19        return CreateCall(packuswb_func, {simd_srli(16, a, 8), simd_srli(16, b, 8)});
    2020    }
    2121    // Otherwise use default logic.
     
    2727        Value * packuswb_func = Intrinsic::getDeclaration(mMod, Intrinsic::x86_sse2_packuswb_128);
    2828        Value * mask = simd_lomask(16);
    29         return CreateCall2(packuswb_func, fwCast(16, simd_and(a, mask)), fwCast(16, simd_and(b, mask)));
     29        return CreateCall(packuswb_func, {fwCast(16, simd_and(a, mask)), fwCast(16, simd_and(b, mask))});
    3030    }
    3131    // Otherwise use default logic.
  • icGREP/icgrep-devel/icgrep/kernels/casefold_pipeline.cpp

    r5010 r5014  
    7272    Function::arg_iterator args = main->arg_begin();
    7373   
    74     Value * const inputStream = args++;
     74    Value * const inputStream = &*(args++);
    7575    inputStream->setName("input");
    76     Value * const bufferSize = args++;
     76    Value * const bufferSize = &*(args++);
    7777    bufferSize->setName("bufferSize");
    7878   
  • icGREP/icgrep-devel/icgrep/kernels/kernel.cpp

    r5008 r5014  
    235235    mDoBlock->setDoesNotThrow();
    236236    Function::arg_iterator args = mDoBlock->arg_begin();
    237     mKernelStateParam = args++;
     237    mKernelStateParam = &*(args++);
    238238    mKernelStateParam->setName("this");
    239239    if (mInputScalarType) {
    240         mInputScalarParam = args++;
     240        mInputScalarParam = &*(args++);
    241241        mInputScalarParam->setName("inputScalars");
    242242    }
    243243    if (mInputStreamType) {
    244244        for (const unsigned offset : mInputStreamOffsets) {
    245             Value * const inputStreamSet = args++;
     245            Value * const inputStreamSet = &*(args++);
    246246            inputStreamSet->setName("inputStreamSet" + std::to_string(offset));
    247247            mInputStreamParam.emplace(offset, inputStreamSet);
     
    249249    }
    250250    if (mOutputScalarType) {
    251         mOutputScalarParam = args++;
     251        mOutputScalarParam = &*(args++);
    252252        mOutputScalarParam->setName("outputScalars");
    253253    }
    254254    if (mOutputStreamType) {
    255         mOutputStreamParam = args;
     255        mOutputStreamParam = &*args;
    256256        mOutputStreamParam->setName("outputStreamSet");
    257257    }
  • icGREP/icgrep-devel/icgrep/kernels/pipeline.cpp

    r5010 r5014  
    6666    Function::arg_iterator args = main->arg_begin();
    6767
    68     Value * const inputStream = args++;
     68    Value * const inputStream = &*(args++);
    6969    inputStream->setName("input");
    70     Value * const bufferSize = args++;
     70    Value * const bufferSize = &*(args++);
    7171    bufferSize->setName("bufferSize");
    72     Value * const fileName = args++;
     72    Value * const fileName = &*(args++);
    7373    fileName->setName("fileName");
    74     Value * const finalLineUnterminated = args++;
     74    Value * const finalLineUnterminated = &*(args++);
    7575    finalLineUnterminated->setName("finalLineUnterminated");
    7676
  • icGREP/icgrep-devel/icgrep/kernels/scanmatchgen.cpp

    r5008 r5014  
    6767
    6868    Function::arg_iterator args = function->arg_begin();
    69     Value * instance = args++;
     69    Value * instance = &*(args++);
    7070    instance->setName("this");
    71     Value * matches_input_parm = args++;
     71    Value * matches_input_parm = &*(args++);
    7272    matches_input_parm->setName("matches");
    73     Value * record_breaks_input_parm = args++;
     73    Value * record_breaks_input_parm = &*(args++);
    7474    record_breaks_input_parm->setName("breaks");
    75     Value * scanwordPos = args++;
     75    Value * scanwordPos = &*(args++);
    7676    scanwordPos->setName("scanwordPos");
    77     Value * recordStart_input_parm = args++;
     77    Value * recordStart_input_parm = &*(args++);
    7878    recordStart_input_parm->setName("pendingLineStart");
    79     Value * recordNum_input_parm = args++;
     79    Value * recordNum_input_parm = &*(args++);
    8080    recordNum_input_parm->setName("lineNum");
    8181
  • icGREP/icgrep-devel/icgrep/kernels/symboltablepipeline.cpp

    r5010 r5014  
    365365    Value * gatherFunctionPtr = iBuilder->CreateLoad(iBuilder->CreateGEP(gatherFunctionPtrArray, groupIV));
    366366    Value * outputBuffer = iBuilder->CreatePointerCast(kBuilder->getOutputStream(groupIV), iBuilder->getInt8PtrTy());
    367     iBuilder->CreateCall5(gatherFunctionPtr, base, startArrayPtr, endArrayPtr, iBuilder->getInt32(32), outputBuffer);
     367    iBuilder->CreateCall(gatherFunctionPtr, {base, startArrayPtr, endArrayPtr, iBuilder->getInt32(32), outputBuffer});
    368368    // Copy the unused start positions to the front of the start position array and adjust the start index
    369369    Value * remainingArrayPtr = iBuilder->CreateGEP(startArrayPtr, iBuilder->getInt32(gatherCount));
     
    418418
    419419        Function::arg_iterator args = function->arg_begin();
    420         Value * const base = args++;
     420        Value * const base = &*(args++);
    421421        base->setName("base");
    422         Value * startArray = args++;
     422        Value * startArray = &*(args++);
    423423        startArray->setName("startArray");
    424         Value * endArray = args++;
     424        Value * endArray = &*(args++);
    425425        endArray->setName("endArray");
    426         Value * const numOfKeys = args++;
     426        Value * const numOfKeys = &*(args++);
    427427        numOfKeys->setName("numOfKeys");
    428         Value * result = args++;
     428        Value * result = &*(args++);
    429429        result->setName("result");
    430430
     
    652652    Function::arg_iterator args = main->arg_begin();
    653653
    654     Value * const inputStream = args++;
     654    Value * const inputStream = &*(args++);
    655655    inputStream->setName("inputStream");
    656656
    657     Value * const bufferSize = args++;
     657    Value * const bufferSize = &*(args++);
    658658    bufferSize->setName("bufferSize");
    659659
     
    767767        Value * endArrayPtr = iBuilder->CreatePointerCast(endArray, PointerType::get(iBuilder->getInt32Ty(), 0));
    768768        Value * outputBuffer = iBuilder->CreatePointerCast(gatheringInstance->getOutputStream(groupIV), iBuilder->getInt8PtrTy());
    769         iBuilder->CreateCall5(mGatherFunction.at(i), base, startArrayPtr, endArrayPtr, startIndex, outputBuffer);
     769        iBuilder->CreateCall(mGatherFunction.at(i), {base, startArrayPtr, endArrayPtr, startIndex, outputBuffer});
    770770        iBuilder->CreateBr(nextNonEmptyGroup);
    771771
  • icGREP/icgrep-devel/icgrep/kernels/u8u16_pipeline.cpp

    r5010 r5014  
    7676    Function::arg_iterator args = main->arg_begin();
    7777   
    78     Value * const inputStream = args++;
     78    Value * const inputStream = &*(args++);
    7979    inputStream->setName("input");
    80     Value * const bufferSize = args++;
     80    Value * const bufferSize = &*(args++);
    8181    bufferSize->setName("bufferSize");
    8282   
Note: See TracChangeset for help on using the changeset viewer.