[all-commits] [llvm/llvm-project] e74191: Basic block sections should enable not function se...

Sriraman Tallam via All-commits all-commits at lists.llvm.org
Wed Feb 17 12:45:11 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e74191633036905388245818f54553813c880f83
      https://github.com/llvm/llvm-project/commit/e74191633036905388245818f54553813c880f83
  Author: Sriraman Tallam <tmsriram at google.com>
  Date:   2021-02-17 (Wed, 17 Feb 2021)

  Changed paths:
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/CodeGen/basic-block-sections.c

  Log Message:
  -----------
  Basic block sections should enable not function sections implicitly.

Basic block sections enables function sections implicitly, this is not needed
and is inefficient with "=list" option.

We had basic block sections enable function sections implicitly in clang. This
is particularly inefficient with "=list" option as it places functions that do
not have any basic block sections in separate sections. This causes unnecessary
object file overhead for large applications.

This patch disables this implicit behavior. It only creates function sections
for those functions that require basic block sections.

This patch is the second of two patches and this patch removes the implicit
enabling of function sections with basic block sections in clang.

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




More information about the All-commits mailing list