diff options
author | Artem Klimov <jakmobius@gmail.com> | 2022-07-06 17:02:01 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@ispras.ru> | 2022-10-20 20:51:56 +0300 |
commit | 1d561e1851c466a4952081caef17747781609b00 (patch) | |
tree | 6c929c8bcc04c338d4a9f015e0ae125c200eb5f9 /gcc/cp | |
parent | 3dfdc0d1e1c4e00a77f2afc41d577c1b36cb4702 (diff) | |
download | gcc-1d561e1851c466a4952081caef17747781609b00.zip gcc-1d561e1851c466a4952081caef17747781609b00.tar.gz gcc-1d561e1851c466a4952081caef17747781609b00.tar.bz2 |
ipa-visibility: Optimize TLS access [PR99619]
Fix PR99619, which asks to optimize TLS model based on visibility.
The fix is implemented as an IPA optimization: this allows to take
optimized visibility status into account (as well as avoid modifying
all language frontends).
2022-04-17 Artem Klimov <jakmobius@gmail.com>
gcc/ChangeLog:
PR middle-end/99619
* ipa-visibility.cc (function_and_variable_visibility): Promote
TLS access model afer visibility optimizations.
* varasm.cc (have_optimized_refs): New helper.
(optimize_dyn_tls_for_decl_p): New helper. Use it ...
(decl_default_tls_model): ... here in place of 'optimize' check.
gcc/testsuite/ChangeLog:
PR middle-end/99619
* gcc.dg/tls/vis-attr-gd.c: New test.
* gcc.dg/tls/vis-attr-hidden-gd.c: New test.
* gcc.dg/tls/vis-attr-hidden.c: New test.
* gcc.dg/tls/vis-flag-hidden-gd.c: New test.
* gcc.dg/tls/vis-flag-hidden.c: New test.
* gcc.dg/tls/vis-pragma-hidden-gd.c: New test.
* gcc.dg/tls/vis-pragma-hidden.c: New test.
Co-Authored-By: Alexander Monakov <amonakov@gcc.gnu.org>
Signed-off-by: Artem Klimov <jakmobius@gmail.com>
Diffstat (limited to 'gcc/cp')
0 files changed, 0 insertions, 0 deletions