[llvm] Revert "[BOLT] Move ADRRelaxationPass (#101371)" (PR #102333)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 10:02:21 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-bolt

Author: Vladislav Khmelevsky (yota9)

<details>
<summary>Changes</summary>

This reverts commit 750b12f06badc4cdf767139c70090db62358bb44.
The pass should run after splitting phase, but before nop removal


---
Full diff: https://github.com/llvm/llvm-project/pull/102333.diff


1 Files Affected:

- (modified) bolt/lib/Rewrite/BinaryPassManager.cpp (+2-2) 


``````````diff
diff --git a/bolt/lib/Rewrite/BinaryPassManager.cpp b/bolt/lib/Rewrite/BinaryPassManager.cpp
index dadb1f4d833b0..5dfef0b71cc79 100644
--- a/bolt/lib/Rewrite/BinaryPassManager.cpp
+++ b/bolt/lib/Rewrite/BinaryPassManager.cpp
@@ -357,8 +357,6 @@ Error BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) {
 
     Manager.registerPass(
         std::make_unique<VeneerElimination>(PrintVeneerElimination));
-
-    Manager.registerPass(std::make_unique<ADRRelaxationPass>());
   }
 
   if (BC.isRISCV()) {
@@ -492,6 +490,8 @@ Error BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) {
   Manager.registerPass(std::make_unique<ReorderData>());
 
   if (BC.isAArch64()) {
+    Manager.registerPass(std::make_unique<ADRRelaxationPass>());
+
     // Tighten branches according to offset differences between branch and
     // targets. No extra instructions after this pass, otherwise we may have
     // relocations out of range and crash during linking.

``````````

</details>


https://github.com/llvm/llvm-project/pull/102333


More information about the llvm-commits mailing list