1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/Instrumentation/InstrProfiling
Fangrui Song bc783ac6a6 [InstrProfiling] Delete linkage/visibility toggling for Windows
The linkage/visibility of `__profn_*` variables are derived
from the profiled functions.

    extern_weak => linkonce
    available_externally => linkonce_odr
    internal => private
    extern => private
    _ => unchanged

The linkage/visibility of `__profc_*`/`__profd_*` variables are derived from
`__profn_*` with linkage/visibility wrestling for Windows.

The changes can be folded to the following without changing semantics.

```
if (TT.isOSBinFormatCOFF() && !NeedComdat) {
  Linkage = GlobalValue::InternalLinkage;
  Visibility = GlobalValue::DefaultVisibility;
}
```

That said, I think we can just delete the code block.

An extern/internal function will now use private `__profc_*`/`__profd_*`
variables, instead of internal ones. This saves some symbol table entries.

A non-comdat {linkonce,weak}_odr function will now use hidden external
`__profc_*`/`__profd_*` variables instead of internal ones.  There is potential
object file size increase because such symbols need `/INCLUDE:` directives.
However such non-comdat functions are rare (note that non-comdat weak
definitions don't prevent duplicate definition error).

The behavior changes match ELF.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D103355
2021-06-02 16:49:54 -07:00
..
X86 Revert "[InstrProfiling] Use nobits as __llvm_prf_cnts section type in ELF" 2021-02-24 00:41:43 -08:00
always_inline.ll [InstrProfiling][test] Fix stale tests 2021-05-28 21:14:03 -07:00
atomic-updates.ll [InstrProfiling][test] Fix stale tests 2021-05-28 21:14:03 -07:00
comdat.ll [InstrProfiling][test] Improve tests 2021-05-29 14:30:44 -07:00
early-exit.ll [InstrProfiling][test] Fix stale tests 2021-05-28 21:14:03 -07:00
icall.ll [InstrProfiling] Place __llvm_prf_vnodes and __llvm_prf_names in llvm.used on ELF 2021-03-03 11:32:24 -08:00
linkage.ll [InstrProfiling] Delete linkage/visibility toggling for Windows 2021-06-02 16:49:54 -07:00
no-counters.ll
noruntime.ll [InstrProfiling][test] Fix stale tests 2021-05-28 21:14:03 -07:00
platform.ll [InstrProfiling] Delete linkage/visibility toggling for Windows 2021-06-02 16:49:54 -07:00
profiling.ll [InstrProfiling] Delete linkage/visibility toggling for Windows 2021-06-02 16:49:54 -07:00
runtime-counter-relocation.ll [InstrProfiling][test] Fix stale tests 2021-05-28 21:14:03 -07:00