We identify instructions to be instrumented based on Offset annotation.
BOLT "expands" conditional tail calls into a conditional jump to a basic block
with unconditional tail call. We were incorrrectly treating the conditional jumpMove Offset annotation from former CTC to the tail
call.
For expanded CTC we keep Offset attached to the original instruction which is
converted into a regular conditional jump, while leaving the newly created tail
call without an Offset annotation. This leads to attempting the instrumentation
as a regular internal jumpof the conditional jump which points to the basic block with an inherited input
offset thus creating an invalid edge description. At the same time, which produced invalid profile entriesthe newly
created tail call is skipped entirely which means we're not creating a call
description for it.
Add IsCondTailCall basic block property which is set to created basic blocks,If we instead reassign Offset annotation from the conditional jump to the tail
call we fix both issues. The conditional jump will be skipped not creating an
invalid edge description, while tail call will be handled properly (unformly
and use it in instrumentation to correctly handle this casewith regular calls).