[llvm] WIP: [bolt][aarch64] Change indirect call instrumentation snippet (PR #180229)

Alexey Moksyakov via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 05:30:58 PST 2026


================
@@ -311,9 +311,12 @@ void Instrumentation::instrumentIndirectTarget(BinaryBasicBlock &BB,
                  : IndCallHandlerExitBBFunction->getSymbol(),
       IndCallSiteID, &*BC.Ctx);
 
-  Iter = BB.eraseInstruction(Iter);
-  Iter = insertInstructions(CounterInstrs, BB, Iter);
-  --Iter;
+  if (!BC.isAArch64()) {
+    Iter = BB.eraseInstruction(Iter);
+    Iter = insertInstructions(CounterInstrs, BB, Iter);
+    --Iter;
+  } else
+    Iter = insertInstructions(CounterInstrs, BB, Iter);
----------------
yavtuk wrote:

update instrumented indirect call snippet, mov instruction is replaced by ldr 

https://github.com/llvm/llvm-project/pull/180229


More information about the llvm-commits mailing list