[all-commits] [llvm/llvm-project] f90149: [BOLT] Split unmarked tail code after CFI-bounded ...

Elvina Yakubova via All-commits all-commits at lists.llvm.org
Mon Jul 27 02:17:25 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f901499b11c1fe4fec3075a4b2d01e330f3a00c6
      https://github.com/llvm/llvm-project/commit/f901499b11c1fe4fec3075a4b2d01e330f3a00c6
  Author: Elvina Yakubova <eyakubova at nvidia.com>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    M bolt/include/bolt/Rewrite/RewriteInstance.h
    M bolt/lib/Rewrite/RewriteInstance.cpp
    A bolt/test/AArch64/entry-point-at-function-end.s

  Log Message:
  -----------
  [BOLT] Split unmarked tail code after CFI-bounded functions into separate functions (#176173)

Detect trailing unmarked code after CFI-bounded predecessors
(__BOLT_FDE_FUNC* or symbols whose FDE address range equals their size)
and promote it into separate BinaryFunction objects named
__BOLT_UNMARKED_TAILat<addr>.

A predecessor is only considered when:
  - the target is AArch64
  - it is not a pseudo or fragment function
  - it has slack beyond its recorded size (MaxSize > Size)
  - it is CFI-bounded
  - no function is already registered at the tail start address
  
The trailing region is measured conservatively and we bail out (leaving
the slack attached to the predecessor) when:
- the tail range is not fully contained in the predecessor's origin
section
- a data marker ($d) or a constant island overlaps the region
(data-in-code)
  - disassembly fails or yields a zero-length instruction
- after trimming trailing padding, the tail is empty (i.e. it contained
only padding) or does not end in a return
- any bytes past the decoded code are non-zero, i.e. not pure zero
padding.

The bug was introduced in commit
[cd27741](https://github.com/llvm/llvm-project/commit/cd27741c1111f8a97af5fbca4153fa94f50ed9f3)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list