Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Conversation

yota9
Copy link
Member

@yota9 yota9 commented Aug 7, 2024

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

This reverts commit 750b12f.
The pass should run after splitting phase, but before nop removal
@yota9 yota9 requested review from aaupov and maksfb as code owners August 7, 2024 17:01
@yota9 yota9 added the BOLT label Aug 7, 2024
@yota9 yota9 requested a review from mtvec August 7, 2024 17:01
@llvmbot
Copy link
Member

llvmbot commented Aug 7, 2024

@llvm/pr-subscribers-bolt

Author: Vladislav Khmelevsky (yota9)

Changes

This reverts commit 750b12f.
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 --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.

@yota9 yota9 merged commit 445023f into llvm:main Aug 7, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants