[PATCH] D156389: [BOLT] Add support for instrumenting conditional tail calls

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 20:25:37 PDT 2023


Amir created this revision.
Amir added a reviewer: bolt.
Herald added a reviewer: rafauler.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

BOLT "expands" conditional tail calls into a conditional jump to a basic block
with unconditional tail call. We were incorrrectly treating the conditional jump
as a regular internal jump, which produced invalid profile entries.

Add IsCondTailCall basic block property which is set to created basic blocks,
and use it in instrumentation to correctly handle this case.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156389

Files:
  bolt/include/bolt/Core/BinaryBasicBlock.h
  bolt/include/bolt/Passes/Instrumentation.h
  bolt/lib/Core/BinaryFunction.cpp
  bolt/lib/Passes/Instrumentation.cpp
  bolt/test/runtime/X86/instrumentation-tail-call.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156389.544581.patch
Type: text/x-patch
Size: 9358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230727/37b5d5a6/attachment.bin>


More information about the llvm-commits mailing list