Skip to content

Commit

Permalink
attempt to actually set -disable-copyprop attribute correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Apr 17, 2015
1 parent 83b52f9 commit b940fdf
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/codegen.cpp
Expand Up @@ -4476,6 +4476,10 @@ static void init_julia_llvm_env(Module *m)

extern "C" void jl_init_codegen(void)
{
#if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_)
const char *const argv[] = {"", "-disable-copyprop"}; // llvm bug 21743
cl::ParseCommandLineOptions(sizeof(argv)/sizeof(argv[0]), argv, "disable-copyprop\n");
#endif
#ifdef JL_DEBUG_BUILD
cl::ParseEnvironmentOptions("Julia", "JULIA_LLVM_ARGS");
#endif
Expand Down Expand Up @@ -4540,19 +4544,17 @@ extern "C" void jl_init_codegen(void)
#endif
#ifdef USE_MCJIT
jl_mcjmm = new SectionMemoryManager();
SmallVector<std::string, 4> MAttrs;
#else
// Temporarily disable Haswell BMI2 features due to LLVM bug.
const char *mattr[] = {"-bmi2", "-avx2"
#ifdef V128_BUG
,"-avx"
#endif
#if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_)
,"-disable-copyprop" // llvm bug 21743
const char *mattr[] = {
#ifndef USE_MCJIT
// Temporarily disable Haswell BMI2 features due to LLVM bug.
"-bmi2", "-avx2",
#endif
#ifdef V128_BUG
"-avx",
#endif
};
SmallVector<std::string, 4> MAttrs(mattr, mattr+sizeof(mattr)/sizeof(mattr[0]));
#endif
EngineBuilder eb = EngineBuilder(engine_module)
.setEngineKind(EngineKind::JIT)
#if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_)
Expand Down

0 comments on commit b940fdf

Please sign in to comment.