ldc/ldc-1.32.2-llvm-16-stop_using_aggressive_combine.patch

30 lines
895 B
Diff
Raw Normal View History

From 097c9787d6d76cd069e90fdeccc083ccec5b9631 Mon Sep 17 00:00:00 2001
From: Ikey Doherty <ikey@serpentos.com>
Date: Mon, 22 May 2023 09:01:59 +0100
Subject: [PATCH] driver/main: For LLVM > 16, stop using AggressiveInstCombine
This was killed upstream in the codegen pipeline as part of a bunch of
legacy PM removals:
- https://reviews.llvm.org/D137116
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
---
driver/main.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/driver/main.cpp b/driver/main.cpp
index 6d1c3441eb..fcaaf28983 100644
--- a/driver/main.cpp
+++ b/driver/main.cpp
@@ -579,7 +579,9 @@ void initializePasses() {
#endif
initializeVectorization(Registry);
initializeInstCombine(Registry);
+#if LDC_LLVM_VER < 1600
initializeAggressiveInstCombine(Registry);
+#endif
initializeIPO(Registry);
#if LDC_LLVM_VER < 1600
initializeInstrumentation(Registry);