about summary refs log tree commit diff
path: root/compiler/rustc_llvm
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2024-01-26 11:36:56 +0300
committerklensy <klensy@users.noreply.github.com>2024-02-06 12:24:30 +0300
commit2a06b69ba2600dbcd599641923fdc23b66344f9c (patch)
treeb4131f34fafd8b6ec3b8cdbc3850430e720cc2e0 /compiler/rustc_llvm
parentff95e52665aa6271b95b731888a4921b4f68f0b6 (diff)
downloadrust-2a06b69ba2600dbcd599641923fdc23b66344f9c.tar.gz
rust-2a06b69ba2600dbcd599641923fdc23b66344f9c.zip
llvm-wrapper: remove llvm 12 hack
effectively reverts https://github.com/rust-lang/rust/commit/9a8acea78355b604dbeb29bc38bd4dbf7bfce95f
Diffstat (limited to 'compiler/rustc_llvm')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 6114f7c8678..ed7aa437ddd 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -945,12 +945,7 @@ LLVMRustOptimize(
         break;
       case LLVMRustOptStage::PreLinkThinLTO:
         MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel);
-        // The ThinLTOPreLink pipeline already includes ThinLTOBuffer passes. However, callback
-        // passes may still run afterwards. This means we need to run the buffer passes again.
-        // FIXME: In LLVM 13, the ThinLTOPreLink pipeline also runs OptimizerLastEPCallbacks
-        // before the RequiredLTOPreLinkPasses, in which case we can remove these hacks.
-        if (OptimizerLastEPCallbacks.empty())
-          NeedThinLTOBufferPasses = false;
+        NeedThinLTOBufferPasses = false;
         for (const auto &C : OptimizerLastEPCallbacks)
           C(MPM, OptLevel);
         break;