[llvm] [bolt][aarch64] Skip BB instrumentation with exclusive load/store instructions (PR #154734)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 21 04:08:54 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-bolt
Author: RachinskiyMaksim (maksimra)
<details>
<summary>Changes</summary>
Basic blocks with exclusive load/store instructions are skipped from instrumentation for aarch64. In case of non-conservative mode the spanning tree leaves BB must be skipped either if contains exclusive instructions.
Related to #<!-- -->153492
---
Full diff: https://github.com/llvm/llvm-project/pull/154734.diff
1 Files Affected:
- (modified) bolt/lib/Passes/Instrumentation.cpp (+2)
``````````diff
diff --git a/bolt/lib/Passes/Instrumentation.cpp b/bolt/lib/Passes/Instrumentation.cpp
index c2f876f0dff9e..ab54c2d68565f 100644
--- a/bolt/lib/Passes/Instrumentation.cpp
+++ b/bolt/lib/Passes/Instrumentation.cpp
@@ -579,6 +579,8 @@ void Instrumentation::instrumentFunction(BinaryFunction &Function,
if (!opts::ConservativeInstrumentation) {
for (auto BBI = Function.begin(), BBE = Function.end(); BBI != BBE; ++BBI) {
BinaryBasicBlock &BB = *BBI;
+ if (BBToSkip.find(&BB) != BBToSkip.end())
+ continue;
if (STOutSet[&BB].size() == 0)
instrumentLeafNode(BB, BB.begin(), IsLeafFunction, *FuncDesc,
BBToID[&BB]);
``````````
</details>
https://github.com/llvm/llvm-project/pull/154734
More information about the llvm-commits
mailing list