From 8580e9d2070b6a3deed9d0d709ce395e472e1c39 Mon Sep 17 00:00:00 2001 From: "Arch D. Robison" Date: Mon, 28 Sep 2015 16:03:22 -0500 Subject: [PATCH] Fix issue #13106 by adding TargetTransformInfoWrapperPass to pass list. --- src/codegen.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index e178a4597c861..64fdadb1d2f8a 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -35,6 +35,7 @@ #include #include #ifdef LLVM37 +#include #include #else #include @@ -5752,7 +5753,9 @@ static void init_julia_llvm_env(Module *m) FPM->add(llvm::createMemorySanitizerPass(true)); # endif #endif -#ifndef LLVM37 +#ifdef LLVM37 + FPM->add(createTargetTransformInfoWrapperPass(jl_TargetMachine->getTargetIRAnalysis())); +#else jl_TargetMachine->addAnalysisPasses(*FPM); #endif #ifdef LLVM38