[all-commits] [llvm/llvm-project] a64411: Basic block sections for functions with implicit-s...

Sriraman Tallam via All-commits all-commits at lists.llvm.org
Thu Apr 29 12:31:00 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a64411916cc8b3e87cf767dc24b3bce52af92575
      https://github.com/llvm/llvm-project/commit/a64411916cc8b3e87cf767dc24b3bce52af92575
  Author: Sriraman Tallam <tmsriram at google.com>
  Date:   2021-04-29 (Thu, 29 Apr 2021)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    A llvm/test/CodeGen/X86/basic-block-sections-named-section.ll
    A llvm/test/CodeGen/X86/basic-block-sections-pragma-sections.ll

  Log Message:
  -----------
  Basic block sections for functions with implicit-section-name attribute

Functions can have section names set via #pragma or section attributes,
basic block sections should be correctly named for such functions.

With #pragma, the expectation is that all functions in that file are placed
in the same section in the final binary. Basic block sections should be
correctly named with the unique flag set so that the final binary has all the
basic blocks of the function in that named section. This patch fixes the bug
by calling getExplictSectionGlobal when implicit-section-name attribute is set
to make sure the function's basic blocks get the correct section name.

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




More information about the All-commits mailing list