[all-commits] [llvm/llvm-project] 823adc: [BOLT] Validate secondary entry point (#135731)

YongKang Zhu via All-commits all-commits at lists.llvm.org
Tue Apr 15 13:19:37 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 823adc7a2dc90cdd0f953f3dc9684481368f2b62
      https://github.com/llvm/llvm-project/commit/823adc7a2dc90cdd0f953f3dc9684481368f2b62
  Author: YongKang Zhu <yongzhu at fb.com>
  Date:   2025-04-15 (Tue, 15 Apr 2025)

  Changed paths:
    M bolt/include/bolt/Core/BinaryFunction.h
    M bolt/lib/Core/BinaryFunction.cpp
    A bolt/test/AArch64/validate-secondary-entry-point.s
    A bolt/test/RISCV/validate-secondary-entry-point.s

  Log Message:
  -----------
  [BOLT] Validate secondary entry point (#135731)

Some functions have their sizes as zero in input binary's symbol
table, like those compiled by assembler. When figuring out function
sizes, we may create label symbol if it doesn't point to any constant
island. However, before function size is known, marker symbol can
not be correctly associated to a function and therefore all such
checks would fail and we could end up adding a code label pointing
to constant island as secondary entry point and later mistakenly
marking the function as not simple.

Querying the global marker symbol array has big throughput overhead.
Instead we can run an extra check when post processing entry points
to identify such label symbols that actually point to constant islands.



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