[PATCH] D105176: [InstrProfiling] Use external weak reference for bias variable

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 20:24:35 PDT 2021


phosek added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:697
         Bias->setVisibility(GlobalVariable::HiddenVisibility);
+        if (TT.supportsCOMDAT())
+            Bias->setComdat(M->getOrInsertComdat(Bias->getName()));
----------------
davidxl wrote:
> Is this change still needed?
It's not necessary for correctness, but should enable GC in the case this variable ends up unused.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105176/new/

https://reviews.llvm.org/D105176



More information about the llvm-commits mailing list