[all-commits] [llvm/llvm-project] 277bcf: [ELF][AsmPrinter] Emit trailing dot for constant p...

Mingming Liu via All-commits all-commits at lists.llvm.org
Tue Jul 29 17:05:20 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 277bcf7ffc79e7d8652dc2c89ce79535b405635a
      https://github.com/llvm/llvm-project/commit/277bcf7ffc79e7d8652dc2c89ce79535b405635a
  Author: Mingming Liu <mingmingl at google.com>
  Date:   2025-07-29 (Tue, 29 Jul 2025)

  Changed paths:
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/test/CodeGen/AArch64/constant-pool-partition.ll
    M llvm/test/CodeGen/X86/constant-pool-partition.ll

  Log Message:
  -----------
  [ELF][AsmPrinter] Emit trailing dot for constant pool section when it has a hotness prefix (#150859)

Currently, `TargetLoweringObjectFileELF::getSectionForConstant` produce
`.<section>.hot` or `.<section>.unlikely` for a constant with non-empty
section prefix. This PR changes the implementation add trailing dot when
section prefix is not empty, to disambiguate `.hot` as a hotness prefix
from `.hot` as a (pure C) variable name.

Relevant discussions are in
https://github.com/llvm/llvm-project/pull/148985#discussion_r2221141273
and
https://github.com/llvm/llvm-project/pull/148985#discussion_r2233382641
and



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