Hans Wennborg
2012-Apr-25 14:17 UTC
[LLVMdev] Adding support for explicitly specified TLS models (PR9788)
On Wed, Apr 25, 2012 at 14:04, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:> On Wed, Apr 25, 2012 at 12:39:49PM +0100, Hans Wennborg wrote: >> Just as it is illegal to specify thread_local for a target that >> doesn't support it, specifying a TLS model that isn't supported by the >> target would be illegal. > > For ELF, it doesn't make sense to reject one as it can always be > relaxed. An application program shouldn't have to worry about that, it > is just an implementation detail.I'd be fine with that. (Clang should still worry about it though, so it can provide a "the TLS model you selected is not supported by the target, it will fall back to another one" warning.) - Hans
Joerg Sonnenberger
2012-Apr-26 00:10 UTC
[LLVMdev] Adding support for explicitly specified TLS models (PR9788)
On Wed, Apr 25, 2012 at 03:17:13PM +0100, Hans Wennborg wrote:> On Wed, Apr 25, 2012 at 14:04, Joerg Sonnenberger > <joerg at britannica.bec.de> wrote: > > On Wed, Apr 25, 2012 at 12:39:49PM +0100, Hans Wennborg wrote: > >> Just as it is illegal to specify thread_local for a target that > >> doesn't support it, specifying a TLS model that isn't supported by the > >> target would be illegal. > > > > For ELF, it doesn't make sense to reject one as it can always be > > relaxed. An application program shouldn't have to worry about that, it > > is just an implementation detail. > > I'd be fine with that. > > (Clang should still worry about it though, so it can provide a "the > TLS model you selected is not supported by the target, it will fall > back to another one" warning.)There is no point in warning about it. Basically, anything but global dynamic a pure performance optimisation. Joerg
Hans Wennborg
2012-Apr-27 08:19 UTC
[LLVMdev] Adding support for explicitly specified TLS models (PR9788)
On Thu, Apr 26, 2012 at 01:10, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:>> > For ELF, it doesn't make sense to reject one as it can always be >> > relaxed. An application program shouldn't have to worry about that, it >> > is just an implementation detail. >> >> I'd be fine with that. >> >> (Clang should still worry about it though, so it can provide a "the >> TLS model you selected is not supported by the target, it will fall >> back to another one" warning.) > > There is no point in warning about it. Basically, anything but global > dynamic a pure performance optimisation.It was pointed out in #llvm that programs that mix C and assembly to access thread-local variables would break if the TLS model isn't what they specify, so I still think there's a case for warning about it. - Hans
Apparently Analagous Threads
- [LLVMdev] Adding support for explicitly specified TLS models (PR9788)
- [LLVMdev] Adding support for explicitly specified TLS models (PR9788)
- [LLVMdev] Adding support for explicitly specified TLS models (PR9788)
- [LLVMdev] Adding support for explicitly specified TLS models (PR9788)
- [LLVMdev] [llvm-commits] [Patch, RFC] Re: Adding support for explicitly specified TLS models (PR9788)