Ignore:
Timestamp:
Feb 10, 2017, 1:46:17 PM (2 years ago)
Author:
nmedfort
Message:

Replaced short vector construction in IDISA_Builder with stack allocated arrays.

File:
1 edited

Legend:

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

    r5292 r5309  
    66
    77#include "idisa_nvptx_builder.h"
    8 #include <llvm/IR/IRBuilder.h>
    9 #include <llvm/IR/Constants.h>
    10 #include <llvm/IR/Intrinsics.h>
    11 #include <llvm/IR/Function.h>
    128#include <llvm/IR/InlineAsm.h>
    139#include <llvm/IR/Module.h>
     
    2218    Type * const int32ty = getInt32Ty();
    2319    Function * barrierOrFunc = cast<Function>(mMod->getOrInsertFunction("llvm.nvvm.barrier0.or", int32ty, int32ty, nullptr));
    24     Value * nonZero_i1 = CreateICmpUGT(val, ConstantInt::get(mBitBlockType, 0));
     20    Value * nonZero_i1 = CreateICmpUGT(val, ConstantInt::getNullValue(mBitBlockType));
    2521    Value * nonZero_i32 = CreateZExt(CreateBitCast(nonZero_i1, getInt1Ty()), int32ty);
    2622    Value * anyNonZero = CreateCall(barrierOrFunc, nonZero_i32);
    27     return CreateICmpNE(anyNonZero,  ConstantInt::get(int32ty, 0));
     23    return CreateICmpNE(anyNonZero,  ConstantInt::getNullValue(int32ty));
    2824}
    2925
     
    10197}
    10298
    103 void IDISA_NVPTX20_Builder::CreateBuiltinFunctions(){   
     99void IDISA_NVPTX20_Builder::CreateBuiltinFunctions(){
    104100    Type * const voidTy = getVoidTy();
    105101    Type * const int32ty = getInt32Ty();
Note: See TracChangeset for help on using the changeset viewer.