From 2bef8a986f26c5aad8e6756899ebd4cf62081120 Mon Sep 17 00:00:00 2001 From: RachinskiyMaksim <142528998+maksimra@users.noreply.github.com> Date: Thu, 21 Aug 2025 13:54:34 +0300 Subject: [PATCH] [bolt][aarch64] Skip BB with exclusive load/store instructions from instrumentation spanning leaves --- bolt/lib/Passes/Instrumentation.cpp | 2 ++ 1 file changed, 2 insertions(+) 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]);