[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-03 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: compiler-rt/test/profile/instrprof-gc-sections.c:30 +// RUN: llvm-nm -jgU %t | grep -vE "main|_start|_IO_stdin_used|__libc_.*" > %t.code.syms +// RUN: diff %t.nocode.syms %t.code.syms + phosek wrote: > MaskRay wrote:

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-02 Thread Petr Hosek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG97ba5cde5266: [InstrProfiling] Use !associated metadata for counters, data and values (authored by phosek). Repository: rG LLVM Github Monorepo

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-02 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 321015. Herald added a subscriber: mgorny. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76802/new/ https://reviews.llvm.org/D76802 Files: clang/lib/CodeGen/BackendUtil.cpp compiler-rt/test/CMakeLists.txt

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-02 Thread Tom Weaver via Phabricator via cfe-commits
TWeaver added a comment. Hiya, this patch (probably) broke the build bot at: http://lab.llvm.org:8011/#/builders/53/builds/1184 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76802/new/ https://reviews.llvm.org/D76802

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-01 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: compiler-rt/test/profile/instrprof-gc-sections.c:30 +// RUN: llvm-nm -jgU %t | grep -vE "main|_start|_IO_stdin_used|__libc_.*" > %t.code.syms +// RUN: diff %t.nocode.syms %t.code.syms + MaskRay wrote: > This fails on my

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: akuegel. MaskRay added inline comments. Comment at: compiler-rt/test/profile/instrprof-gc-sections.c:30 +// RUN: llvm-nm -jgU %t | grep -vE "main|_start|_IO_stdin_used|__libc_.*" > %t.code.syms +// RUN: diff %t.nocode.syms %t.code.syms +

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-01 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf3e39f60b35: [InstrProfiling] Use !associated metadata for counters, data and values (authored by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76802/new/ https://reviews.llvm.org/D76802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-01 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D76802#2534118 , @MaskRay wrote: > "prevents discarding" is not accurate in the context. `__llvm_prf_*` cannot > be discarded because C identifier name input sections are GC roots. > > Add "C identifier name input sections are

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-01 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 320562. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76802/new/ https://reviews.llvm.org/D76802 Files: clang/lib/CodeGen/BackendUtil.cpp compiler-rt/test/profile/instrprof-gc-sections.c llvm/include/llvm/Transforms/Instrumentation.h

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > The !associated metadata may be attached to a global object declaration with > a single argument that references another global object. This metadata > prevents discarding of the global object in linker GC unless the referenced > object is also discarded. "prevents

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. @MaskRay I saw on https://sourceware.org/bugzilla/show_bug.cgi?id=27259 that the infinite loop fix has been cherry picked into 2.36 branch so I updated the condition to `-fbinutils-version=2.36`. Is this OK to land? CHANGES SINCE LAST ACTION

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 320398. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76802/new/ https://reviews.llvm.org/D76802 Files: clang/lib/CodeGen/BackendUtil.cpp compiler-rt/test/profile/instrprof-gc-sections.c llvm/include/llvm/Transforms/Instrumentation.h

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D76802#2526483 , @MaskRay wrote: > Looks quite good. > > In D76802#2526382 , @phosek wrote: > >> @MaskRay does this look good to you? > > Looks like GNU ld has an infinite loop problem

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 319762. phosek added a reviewer: MaskRay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76802/new/ https://reviews.llvm.org/D76802 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Please also comment (and update the description) that self-link may be used. This is subtle. The reason is that the ELF section names (e.g. `__llvm_prf_cnts`) are C identifiers and considered GC roots in the absence of the `SHF_LINK_ORDER` flag. Repository: rG LLVM

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Looks quite good. In D76802#2526382 , @phosek wrote: > @MaskRay does this look good to you? Looks like GNU ld has an infinite loop problem w.r.t self-link SHF_LINK_ORDER: https://sourceware.org/bugzilla/show_bug.cgi?id=27259 >

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. @MaskRay does this look good to you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76802/new/ https://reviews.llvm.org/D76802 ___ cfe-commits mailing list

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D76802#2524039 , @MaskRay wrote: > - `__llvm_prf_cnts` does not need to have a self link `SHF_LINK_ORDER`. > `__llvm_prf_data` linking to `__llvm_prf_cnts` suffices. This is on the > premise that only `__llvm_prf_data` may

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 319493. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76802/new/ https://reviews.llvm.org/D76802 Files: clang/lib/CodeGen/BackendUtil.cpp