Ignore:
Timestamp:
Apr 25, 2017, 2:33:31 PM (2 years ago)
Author:
nmedfort
Message:

Changes towards separate compilation

File:
1 edited

Legend:

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

    r5402 r5425  
    55
    66#include "idisa_target.h"
    7 #include <kernels/toolchain.h>
     7#include <toolchain/toolchain.h>
    88#include <IR_Gen/idisa_avx_builder.h>
    99#include <IR_Gen/idisa_sse_builder.h>
     
    1515namespace IDISA {
    1616   
    17 IDISA_Builder * GetIDISA_Builder(llvm::Module * const mod) {
    18     if (LLVM_UNLIKELY(mod == nullptr)) {
    19         report_fatal_error("GetIDISA_Builder: module cannot be null");
    20     }
    21     if (LLVM_LIKELY(mod->getTargetTriple().empty())) {
    22         mod->setTargetTriple(llvm::sys::getProcessTriple());
    23     }
     17IDISA_Builder * GetIDISA_Builder(llvm::Module * const module) {
    2418    unsigned registerWidth = 0;
    25     Triple T(mod->getTargetTriple());
     19    Triple T(module->getTargetTriple());
    2620    if (T.isArch64Bit()) {
    2721        registerWidth = 64;
     
    3731    if (codegen::BlockSize >= 256) {
    3832        if (hasAVX2) {
    39             return new IDISA_AVX2_Builder(mod, registerWidth, codegen::BlockSize);
     33            return new IDISA_AVX2_Builder(module, registerWidth, codegen::BlockSize);
    4034        }
    4135    } else if (codegen::BlockSize == 64) {
    42         return new IDISA_I64_Builder(mod, registerWidth);
     36        return new IDISA_I64_Builder(module, registerWidth);
    4337    }
    44     return new IDISA_SSE2_Builder(mod, registerWidth, codegen::BlockSize);
     38    return new IDISA_SSE2_Builder(module, registerWidth, codegen::BlockSize);
    4539}
    4640
    47 IDISA_Builder * GetIDISA_GPU_Builder(llvm::Module * const mod) {
    48     return new IDISA_NVPTX20_Builder(mod, 64);
     41IDISA_Builder * GetIDISA_GPU_Builder(llvm::Module * const module) {
     42    return new IDISA_NVPTX20_Builder(module, 64);
    4943}
    5044
Note: See TracChangeset for help on using the changeset viewer.