[all-commits] [llvm/llvm-project] 6660ce: [InstrProfiling] Emit bias variable eagerly

Petr Hosek via All-commits all-commits at lists.llvm.org
Wed Aug 4 10:18:28 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6660cec568504df47d9becb0c552c20577880df8
      https://github.com/llvm/llvm-project/commit/6660cec568504df47d9becb0c552c20577880df8
  Author: Petr Hosek <phosek at google.com>
  Date:   2021-08-04 (Wed, 04 Aug 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/Instrumentation/InstrProfiling.h
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    A llvm/test/Instrumentation/InstrProfiling/bias-var.ll

  Log Message:
  -----------
  [InstrProfiling] Emit bias variable eagerly

Rather than emitting the bias variable lazily as needed, emit it
eagerly. This allows profile runtime to refer to this variable
unconditionally without having to use the weak reference. The bias
variable is in a COMDAT so there'll never be more than one instance,
and if it's not needed, linker should be able to GC it, so the overhead
should be minimal.

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




More information about the All-commits mailing list