summaryrefslogtreecommitdiff
path: root/dev-lang/julia/files/julia-1.6.5-llvm_bad_perf_fix.patch
blob: f38c26bfd52e0ab829526b2e8729767156d27ed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Patch from
  https://github.com/JuliaLang/julia/commit/7df16be0.patch
fixes bad performance with LLVM 12

From 7df16be0bfafee6d304ee0690366fa33845cc8d6 Mon Sep 17 00:00:00 2001
From: Valentin Churavy <v.churavy@gmail.com>
Date: Wed, 12 May 2021 18:44:40 -0400
Subject: [PATCH] [LLVM] add correlated value propagation after jump threading

---
 src/aotcompile.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp
index db3f9f4b0e22..4cc22d127528 100644
--- a/src/aotcompile.cpp
+++ b/src/aotcompile.cpp
@@ -692,6 +692,7 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level,
     PM->add(createSROAPass());
     PM->add(createInstSimplifyLegacyPass());
     PM->add(createJumpThreadingPass());
+    PM->add(createCorrelatedValuePropagationPass());
 
     PM->add(createReassociatePass());
 
@@ -743,6 +744,7 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level,
     // loops over Union-typed arrays to vectorize.
     PM->add(createInstructionCombiningPass());
     PM->add(createJumpThreadingPass());
+    PM->add(createCorrelatedValuePropagationPass());
     PM->add(createDeadStoreEliminationPass());
 
     // More dead allocation (store) deletion before loop optimization