Changeset 4889


Ignore:
Timestamp:
Dec 8, 2015, 2:05:05 PM (3 years ago)
Author:
cameron
Message:

Dynamic AVX2 confirmation

Location:
icGREP/icgrep-devel/icgrep
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/toolchain.cpp

    r4888 r4889  
    1818#include <llvm/IRReader/IRReader.h>
    1919#include <llvm/Support/CommandLine.h>
     20#include <llvm/CodeGen/CommandFlags.h>
    2021#include <llvm/Support/SourceMgr.h>
    2122#include <llvm/Support/TargetSelect.h>
     
    177178}
    178179
     180// Dynamic AVX2 confirmation
     181#if (BLOCK_SIZE == 256)
     182#define ISPC_LLVM_VERSION ISPC_LLVM_3_6
     183#include "ispc.cpp"
     184#endif
     185
     186
    179187ExecutionEngine * JIT_to_ExecutionEngine (llvm::Function * f) {
    180188
     
    188196    builder.setMCPU(sys::getHostCPUName());
    189197    builder.setOptLevel(CodeGenOpt::Level::None);
     198
    190199#if (BLOCK_SIZE == 256)
    191     if (!DisableAVX2){
     200    if (!DisableAVX2 && (strncmp(lGetSystemISA(), "avx2", 4) == 0)) {
    192201            std::vector<std::string> attrs;
    193202            attrs.push_back("avx2");
    194203            builder.setMAttrs(attrs);
     204    //std::cerr << "+avx2 set" << std::endl;
    195205    }
    196206#endif
Note: See TracChangeset for help on using the changeset viewer.