[Bug middle-end/99619] fails to infer local-dynamic TLS model from hidden visibility

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 20 17:52:47 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99619

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexander Monakov <amonakov@gcc.gnu.org>:

https://gcc.gnu.org/g:1d561e1851c466a4952081caef17747781609b00

commit r13-3416-g1d561e1851c466a4952081caef17747781609b00
Author: Artem Klimov <jakmobius@gmail.com>
Date:   Wed Jul 6 17:02:01 2022 +0300

    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>


More information about the Gcc-bugs mailing list