rnk added a comment. I think MachO doesn't have comdats, so we need to leave the `__profd_` linkage as it was. I think private linkage also prevents atomization, which inhibits GC / dead stripping. I don't think this change really makes sense for MachO, so you could reasonably reland with that change.
================ Comment at: llvm/test/Instrumentation/InstrProfiling/linkage.ll:64 ; MACHO: @__profc_foo_inline = linkonce_odr hidden global -; MACHO: @__profd_foo_inline = linkonce_odr hidden global +; MACHO: @__profd_foo_inline = private global ; COFF: @__profc_foo_inline = linkonce_odr hidden global{{.*}} section ".lprfc$M", align 8 ---------------- I think we don't want this change for macho. If we make `__profd_` private on Mac, the linker won't be able to deduplicate these `__profd` globals, and there will be multiple copies pointing to the same counters. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103372/new/ https://reviews.llvm.org/D103372 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits