[all-commits] [llvm/llvm-project] e8147a: Uniuqe Names for Internal Linkage Symbols.

Sriraman Tallam via All-commits all-commits at lists.llvm.org
Thu May 7 18:22:28 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e8147ad8222602d16728c370d5fac086260d058c
      https://github.com/llvm/llvm-project/commit/e8147ad8222602d16728c370d5fac086260d058c
  Author: Sriraman Tallam <tmsriram at google.com>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M clang/docs/UsersManual.rst
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    A clang/test/CodeGen/unique-internal-linkage-names.cpp
    A clang/test/Driver/funique-internal-linkage-names.c

  Log Message:
  -----------
  Uniuqe Names for Internal Linkage Symbols.

This is a standalone patch and this would help Propeller do a better job of code
layout as it can accurately attribute the profiles to the right internal linkage
function.

This also helps SampledFDO/AutoFDO correctly associate sampled profiles to the
right internal function. Currently, if there is more than one internal symbol
foo, their profiles are aggregated by SampledFDO.

This patch adds a new clang option, -funique-internal-funcnames, to generate
unique names for functions with internal linkage. This patch appends the md5
hash of the module name to the function symbol as a best effort to generate a
unique name for symbols with internal linkage.

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




More information about the All-commits mailing list