summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-core/ispc/ispc/ec35a6f8e60ba77e59a6f2bfec27011e0ab34dda.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-core/ispc/ispc/ec35a6f8e60ba77e59a6f2bfec27011e0ab34dda.patch')
-rw-r--r--dynamic-layers/clang-layer/recipes-core/ispc/ispc/ec35a6f8e60ba77e59a6f2bfec27011e0ab34dda.patch63
1 files changed, 0 insertions, 63 deletions
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/ec35a6f8e60ba77e59a6f2bfec27011e0ab34dda.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/ec35a6f8e60ba77e59a6f2bfec27011e0ab34dda.patch
deleted file mode 100644
index a5ab8c19..00000000
--- a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/ec35a6f8e60ba77e59a6f2bfec27011e0ab34dda.patch
+++ /dev/null
@@ -1,63 +0,0 @@
1From ec35a6f8e60ba77e59a6f2bfec27011e0ab34dda Mon Sep 17 00:00:00 2001
2From: Arina Neshlyaeva <arina.neshlyaeva@intel.com>
3Date: Tue, 23 Aug 2022 15:21:50 -0700
4Subject: [PATCH] Adjust opt passes for LLVM 15
5
6Upstream-Status: Backport
7Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
8---
9 src/opt.cpp | 17 +++++++++++++++++
10 1 file changed, 17 insertions(+)
11
12diff --git a/src/opt.cpp b/src/opt.cpp
13index 910821e26..86219f384 100644
14--- a/src/opt.cpp
15+++ b/src/opt.cpp
16@@ -84,6 +84,9 @@
17 #include <llvm/Transforms/Scalar.h>
18 #include <llvm/Transforms/Scalar/GVN.h>
19 #include <llvm/Transforms/Scalar/InstSimplifyPass.h>
20+#if ISPC_LLVM_VERSION >= ISPC_LLVM_15_0
21+#include <llvm/Transforms/Scalar/SimpleLoopUnswitch.h>
22+#endif
23 #include <llvm/Transforms/Utils.h>
24 #include <llvm/Transforms/Utils/BasicBlockUtils.h>
25
26@@ -647,7 +650,11 @@ void ispc::Optimize(llvm::Module *module, int optLevel) {
27 optPM.add(llvm::createCFGSimplificationPass());
28 #endif
29
30+#if ISPC_LLVM_VERSION < ISPC_LLVM_15_0
31+ // Starting LLVM 15.0 this pass is supported with new pass manager only (217e857)
32+ // TODO: switch ISPC to new pass manager: https://github.com/ispc/ispc/issues/2359
33 optPM.add(llvm::createArgumentPromotionPass());
34+#endif
35
36 optPM.add(llvm::createAggressiveDCEPass());
37 optPM.add(llvm::createInstructionCombiningPass(), 241);
38@@ -722,7 +729,11 @@ void ispc::Optimize(llvm::Module *module, int optLevel) {
39 optPM.add(CreateInstructionSimplifyPass());
40
41 optPM.add(llvm::createFunctionInliningPass());
42+#if ISPC_LLVM_VERSION < ISPC_LLVM_15_0
43+ // Starting LLVM 15.0 this pass is supported with new pass manager only (217e857)
44+ // TODO: switch ISPC to new pass manager: https://github.com/ispc/ispc/issues/2359
45 optPM.add(llvm::createArgumentPromotionPass());
46+#endif
47
48 optPM.add(llvm::createSROAPass());
49
50@@ -736,7 +747,13 @@ void ispc::Optimize(llvm::Module *module, int optLevel) {
51 optPM.add(llvm::createReassociatePass());
52 optPM.add(llvm::createLoopRotatePass());
53 optPM.add(llvm::createLICMPass());
54+ // Loop unswitch pass was removed in LLVM 15.0 (fb4113).
55+ // Recommended replacement: createSimpleLoopUnswitchLegacyPass
56+#if ISPC_LLVM_VERSION < ISPC_LLVM_15_0
57 optPM.add(llvm::createLoopUnswitchPass(false));
58+#else
59+ optPM.add(llvm::createSimpleLoopUnswitchLegacyPass(false));
60+#endif
61 optPM.add(llvm::createInstructionCombiningPass());
62 optPM.add(CreateInstructionSimplifyPass());
63 optPM.add(llvm::createIndVarSimplifyPass());