[lld] [lld-macho][arm64] Enhance safe ICF with thunk-based deduplication (PR #106573)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 19:22:56 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 3b0a1ecb99b59fbcc2e587771a6820edd454d10e 8bc9599e95f75231fb9eda656633a68333877431 --extensions h,cpp -- lld/MachO/Arch/ARM64.cpp lld/MachO/Config.h lld/MachO/Driver.cpp lld/MachO/ICF.cpp lld/MachO/Target.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/MachO/ICF.cpp b/lld/MachO/ICF.cpp
index 18efdfcfff..f454885a51 100644
--- a/lld/MachO/ICF.cpp
+++ b/lld/MachO/ICF.cpp
@@ -268,7 +268,8 @@ void ICF::applySafeThunksToRange(size_t begin, size_t end) {
// The standard ICF algorithm will merge all functions in the [begin + 1, end)
// range into icfInputs[begin].So, the body of the first function is always
// kept, even if it is not keepUnique. To make safe_thunks nicely play with
- // this behavior, we ensure that the first function in the range is keepUnique.
+ // this behavior, we ensure that the first function in the range is
+ // keepUnique.
if (!icfInputs[begin]->keepUnique) {
bool haveKeepUnique = false;
for (size_t i = begin + 1; i < end; ++i) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/106573
More information about the llvm-commits
mailing list