[all-commits] [llvm/llvm-project] 34e70d: Append ".__part." to every basic block section sym...

Sriraman Tallam via All-commits all-commits at lists.llvm.org
Wed Dec 23 11:36:14 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 34e70d722dfd0e73d460802e8d43d3a885d24784
      https://github.com/llvm/llvm-project/commit/34e70d722dfd0e73d460802e8d43d3a885d24784
  Author: Sriraman Tallam <tmsriram at google.com>
  Date:   2020-12-23 (Wed, 23 Dec 2020)

  Changed paths:
    M clang/test/CodeGen/basic-block-sections.c
    M lld/test/ELF/lto/basic-block-sections.ll
    M llvm/lib/CodeGen/MachineBasicBlock.cpp
    M llvm/test/CodeGen/X86/basic-block-sections-blockaddress-taken.ll
    M llvm/test/CodeGen/X86/basic-block-sections-clusters-branches.ll
    M llvm/test/CodeGen/X86/basic-block-sections-clusters-eh.ll
    M llvm/test/CodeGen/X86/basic-block-sections-clusters.ll
    M llvm/test/CodeGen/X86/basic-block-sections-directjumps.ll
    M llvm/test/CodeGen/X86/basic-block-sections-eh.ll
    M llvm/test/CodeGen/X86/basic-block-sections-list.ll
    M llvm/test/CodeGen/X86/basic-block-sections-listbb.ll
    M llvm/test/CodeGen/X86/basic-block-sections-mir-parse.mir
    M llvm/test/CodeGen/X86/basic-block-sections-unreachable.ll
    M llvm/test/CodeGen/X86/basic-block-sections.ll
    A llvm/test/CodeGen/X86/basic-block-sections_2.ll
    M llvm/test/CodeGen/X86/cfi-basic-block-sections-1.ll
    M llvm/test/CodeGen/X86/cfi-inserter-basic-block-sections-callee-save-registers.ll
    M llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll
    M llvm/test/DebugInfo/X86/basic-block-sections_1.ll

  Log Message:
  -----------
  Append ".__part." to every basic block section symbol.

Every basic block section symbol created by -fbasic-block-sections will contain
".__part." to know that this symbol corresponds to a basic block fragment of
the function.

This patch solves two problems:

a) Like D89617, we want function symbols with suffixes to be properly qualified
   so that external tools like profile aggregators know exactly what this
   symbol corresponds to.
b) The current basic block naming just adds a ".N" to the symbol name where N is
   some integer. This collides with how clang creates __cxx_global_var_init.N.
   clang creates these symbol names to call constructor functions and basic
   block symbol naming should not use the same style.

Fixed all the test cases and added an extra test for __cxx_global_var_init
breakage.

Differential Revision: https://reviews.llvm.org/D93082




More information about the All-commits mailing list