[all-commits] [llvm/llvm-project] fd0ca2: Revert "Reland "[pgo] Avoid introducing relocation...

Hans via All-commits all-commits at lists.llvm.org
Wed Dec 21 06:29:27 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd0ca2c4e935cb2d8de95f016d7a08229af695da
      https://github.com/llvm/llvm-project/commit/fd0ca2c4e935cb2d8de95f016d7a08229af695da
  Author: Hans Wennborg <hans at chromium.org>
  Date:   2022-12-21 (Wed, 21 Dec 2022)

  Changed paths:
    R compiler-rt/test/profile/Linux/instrprof-discarded-comdat.cpp
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    M llvm/test/Transforms/PGOProfile/comdat.ll
    R llvm/test/Transforms/PGOProfile/prof_avoid_relocs.ll

  Log Message:
  -----------
  Revert "Reland "[pgo] Avoid introducing relocations by using private alias""

This caused lld on mac to assert when building instrumented clang (or
instrumented code in general). See comment on the code review for
reproducer.

> In many cases, we can use an alias to avoid a symbolic relocations,
> instead of using the public, interposable symbol. When the instrumented
> function is in a COMDAT, we can use a hidden alias, and still avoid
> references to discarded sections.
>
> New compiler-rt tests are Linux only for now.
>
> Previous versions of this patch allowed the compiler to name the
> generated alias, but that would only be valid when the functions were
> local. Since the alias may be used across TUs we use a more
> deterministic naming convention, and add a `.local` suffix to the alias
> name just as we do for relative vtables aliases.
>
> Reviewed By: phosek
>
> Differential Revision: https://reviews.llvm.org/D137982

This reverts commit c42e50fede53bbcce79095e7c8115f26826c81ae.




More information about the All-commits mailing list