[llvm] [RFC][BOLT][DRAFT] Enable lite mode by default on AArch64 (PR #205545)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 03:55:35 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-bolt
Author: Paschalis Mpeis (paschalis-mpeis)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/205545.diff
2 Files Affected:
- (modified) bolt/lib/Rewrite/RewriteInstance.cpp (+2-2)
- (modified) bolt/test/AArch64/long-jmp-one-stub.s (+1-1)
``````````diff
diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp
index 5e2ecd66b7f9d..97ba88ffb724c 100644
--- a/bolt/lib/Rewrite/RewriteInstance.cpp
+++ b/bolt/lib/Rewrite/RewriteInstance.cpp
@@ -2460,8 +2460,8 @@ void RewriteInstance::adjustCommandLineOptions() {
BC->UseCompactAligner = opts::UseCompactAligner;
BC->X86AlignBranchBoundaryHotOnly = opts::X86AlignBranchBoundaryHotOnly;
- if (BC->isX86() && opts::Lite.getNumOccurrences() == 0 && !opts::StrictMode &&
- !opts::UseOldText)
+ if ((BC->isX86() || BC->isAArch64()) && opts::Lite.getNumOccurrences() == 0 &&
+ !opts::StrictMode && !opts::UseOldText)
opts::Lite = true;
if (opts::Lite && opts::UseOldText) {
diff --git a/bolt/test/AArch64/long-jmp-one-stub.s b/bolt/test/AArch64/long-jmp-one-stub.s
index cd9e0875a43c4..c84de4b0a9bdf 100644
--- a/bolt/test/AArch64/long-jmp-one-stub.s
+++ b/bolt/test/AArch64/long-jmp-one-stub.s
@@ -6,7 +6,7 @@
# RUN: %clang %cflags -O0 %t.o -o %t.exe -Wl,-q
# RUN: link_fdata %s %t.o %t.fdata
# RUN: llvm-bolt %t.exe -o %t.bolt \
-# RUN: --data %t.fdata | FileCheck %s
+# RUN: --data %t.fdata --lite=0 | FileCheck %s
# CHECK: BOLT-INFO: Inserted 1 stubs in the hot area and 0 stubs in the cold area.
``````````
</details>
https://github.com/llvm/llvm-project/pull/205545
More information about the llvm-commits
mailing list