On Mon, 8 Sep 2025, H.J. Lu wrote:
> Don't check tls_model attribute when optimizing TLS access since
>
> 1. -ftls-model=initial-exec also can specify tls_model without tls_model
> attribute.
There's a difference: -ftls-model is usable only for upgrading the model;
if you pass -ftls-model=glob
On Tue, Sep 9, 2025 at 11:55 AM Alexander Monakov wrote:
>
>
> On Tue, 9 Sep 2025, H.J. Lu wrote:
>
> > > But this doesn't imply that recomputed model would be weaker.
> > >
> > > As I understand, the actual issue is that decl_default_tls_model does not
> > > iterate the attribute list, and so can
On Tue, 9 Sep 2025, H.J. Lu wrote:
> > But this doesn't imply that recomputed model would be weaker.
> >
> > As I understand, the actual issue is that decl_default_tls_model does not
> > iterate the attribute list, and so can return a weaker model than what the
> > front-end assigned based on th
On Tue, Sep 9, 2025 at 10:36 AM Alexander Monakov wrote:
>
>
>
> On Tue, 9 Sep 2025, H.J. Lu wrote:
>
> > On Tue, Sep 9, 2025 at 9:04 AM Alexander Monakov wrote:
> > >
> > >
> > > On Tue, 9 Sep 2025, H.J. Lu wrote:
> > >
> > > > > > to restore assert if not compiling for shared library. When
>
On Tue, 9 Sep 2025, H.J. Lu wrote:
> On Tue, Sep 9, 2025 at 9:04 AM Alexander Monakov wrote:
> >
> >
> > On Tue, 9 Sep 2025, H.J. Lu wrote:
> >
> > > > > to restore assert if not compiling for shared library. When compiling
> > > > > for shared library, the recomputed model may be weaker.
> >
On Tue, Sep 9, 2025 at 9:04 AM Alexander Monakov wrote:
>
>
> On Tue, 9 Sep 2025, H.J. Lu wrote:
>
> > > > to restore assert if not compiling for shared library. When compiling
> > > > for shared library, the recomputed model may be weaker.
> > >
> > > I don't understand why (for shared libraries
On Tue, 9 Sep 2025, H.J. Lu wrote:
> > > to restore assert if not compiling for shared library. When compiling
> > > for shared library, the recomputed model may be weaker.
> >
> > I don't understand why (for shared libraries), can you explain?
>
> Another shared library or executable may over
Don't check tls_model attribute when optimizing TLS access since
1. -ftls-model=initial-exec also can specify tls_model without tls_model
attribute.
2. Linker can optimize TLS access at link-time.
3. LTO should perform the similar optimization.
Since C, C++, and Fortran front-ends now set the TLS