Ignore:
Timestamp:
Feb 15, 2017, 4:08:37 PM (2 years ago)
Author:
nmedfort
Message:

memcpy/memset support for 32-bit systems; more error messages/handling; bug fix for ParabixCharacterClassKernelBuilder?. continued work on parenthesis matching + expandable buffers.

File:
1 edited

Legend:

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

    r5267 r5320  
    1010#include <IR_Gen/idisa_i64_builder.h>
    1111#include <IR_Gen/idisa_nvptx_builder.h>
    12 #include <llvm/ADT/Triple.h>
     12#include <llvm/IR/Module.h>
    1313
    1414namespace IDISA {
     
    1616IDISA_Builder * GetIDISA_Builder(llvm::Module * mod) {
    1717    const bool hasAVX2 = AVX2_available();
    18     const bool isArch32Bit = Triple(llvm::sys::getProcessTriple()).isArch32Bit();
     18    DataLayout DL(mod);
     19    Type * const intTy = DL.getIntPtrType(mod->getContext());
     20    const auto registerWidth = intTy->getIntegerBitWidth();
    1921    if (LLVM_LIKELY(codegen::BlockSize == 0)) {  // No BlockSize override: use processor SIMD width
    2022        codegen::BlockSize = hasAVX2 ? 256 : 128;
     
    2224    if (codegen::BlockSize >= 256) {
    2325        if (hasAVX2) {
    24             return new IDISA_AVX2_Builder(mod, isArch32Bit ? 32 : 64, codegen::BlockSize);
     26            return new IDISA_AVX2_Builder(mod, registerWidth, codegen::BlockSize);
    2527        }
    2628    } else if (codegen::BlockSize == 64) {
    27         return new IDISA_I64_Builder(mod, isArch32Bit ? 32 : 64);
     29        return new IDISA_I64_Builder(mod, registerWidth);
    2830    }
    29     return new IDISA_SSE2_Builder(mod, isArch32Bit ? 32 : 64, codegen::BlockSize);
     31    return new IDISA_SSE2_Builder(mod, registerWidth, codegen::BlockSize);
    3032}
    3133
Note: See TracChangeset for help on using the changeset viewer.