search for: ftls

Displaying 18 results from an estimated 18 matches for "ftls".

Did you mean: dtls
2012 Jun 14
2
[LLVMdev] [llvm-commits] [Patch, RFC] Re: Adding support for explicitly specified TLS models (PR9788)
..., the following code, static __thread int x[100000]; int* get_x() { return x; } compiled with "clang -shared a.c -o a.so" won't be possible do dlopen. The tls_model attribute comes to the rescue: __attribute((tls_model("global-dynamic"))) will fix this, or specifying -ftls-model="global-dynamic" on the command-line. But this only works if we actually give the user the requested model. Rafael, I think your argument has been that if we're unsure if there is any reason to strictly preserve the user's choice, we should just let LLVM choose a better mod...
2012 Jun 14
0
[LLVMdev] [llvm-commits] [Patch, RFC] Re: Adding support for explicitly specified TLS models (PR9788)
...at's a good point. > > On i386 Linux, the following code, > >  static __thread int x[100000]; >  int* get_x() { return x; } > > compiled with "clang -shared a.c -o a.so" won't be possible do dlopen. I get exactly the same result with gcc 4.7 with and without -ftls-model=global-dynamic: movq %gs:0, %eax addl $x at ntpoff, %eax > Rafael, I think your argument has been that if we're unsure if there > is any reason to strictly preserve the user's choice, we should just > let LLVM choose a better model (and not have to specify any difference &g...
2008 Jul 30
3
[LLVMdev] address space overloading patch broke the llvm-gcc build
...system /usr/local/gnat-llvm/i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-4.2.llvm/libgomp -I. -I../../../gcc-4.2.llvm/libgomp/config/linux/x86 -I../../../gcc-4.2.llvm/libgomp/config/linux -I../../../gcc-4.2.llvm/libgomp/config/posix -I../../../gcc-4.2.llvm/libgomp -Wall -Werror -ftls-model=initial-exec -march=i486 -pthread -mtune=i686 -O2 -g -O2 -MT critical.lo -MD -MP -MF .deps/critical.Tpo -c ../../../gcc-4.2.llvm/libgomp/critical.c -fPIC -DPIC -o .libs/critical.o Overloaded intrinsic has incorrect suffix: '.i8'. It should be '.i8.p0i8' i8 (i8*, i8)* @llvm.at...
2017 Nov 08
2
[RFC] lld: Dropping TLS relaxations in favor of TLSDESC
...sing Global Dynamic model. No relaxations are involved. If you are creating an executable and if your executable is not position-independent, you're using Initial Exec model by default which is as fast as variables accessed through GOT. If you really want to use Local Exec model, you can pass -ftls-model=local-exec to compilers. If you are creating a position-independent executable and you want to use Initial Exec or Local Exec, you can do that by passing -ftls-model={initial-exec,local-exec} to compilers. So I don't see a strong reason to do a complicated instruction rewriting in the l...
2008 Feb 06
2
[LLVMdev] strange visibility error when compiling llvm-gcc-4.2
...i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/s/llvm/svn.gcc42/libgomp -I. -I/s/llvm/svn.gcc42/libgomp/config/linux/x86 -I/s/llvm/svn.gcc42/libgomp/config/linux -I/s/llvm/svn.gcc42/libgomp/config/posix -I/s/llvm/svn.gcc42/libgomp -Wall -Werror -ftls-model=initial-exec -march=i486 -mtune=i686 -Wc,-pthread -O2 -g -O2 -MT lock.lo -MD -MP -MF ".deps/lock.Tpo" -c -o lock.lo /s/llvm/svn.gcc42/libgomp/config/linux/lock.c; \ then mv -f ".deps/lock.Tpo" ".deps/lock.Plo"; else rm -f ".deps/lock.Tpo"; exit...
2011 Jan 21
1
[LLVMdev] -ffixed option in llvm-gcc
Hi I am trying to register shadow a global variable using -ffixed option in llvm-gcc. I am able to accomplish this using gcc however llvm-gcc seems to ignore this option and generate code using the register. command line: >gcc -Wall -m64 -O3 -pthread -ftls-model=initial-exec -ffixed-r12 test.c -o test >objdump -d ./test | grep r12 >llvm-gcc -Wall -m64 -O3 -pthread -ftls-model=initial-exec -ffixed-r12 test.c -o test >objdump -d ./test | grep r12 .... ... //uses r12 register I was wondering if "-ffixed" option is not support...
2017 Nov 08
2
[RFC] lld: Dropping TLS relaxations in favor of TLSDESC
...ker could have that command line option for the second part. > > Now that I spell that out, it is easy to see the TLSDESC big > advantage. It can optimize the case the static linker cannot. Because of this fact, DSOs that use thread-local variables such as libc are already compiled with -ftls-model=initial-exec. So the authors of DSOs in which the performance thread-local variables matters are already aware of the issue and how to workaround it. > If you are creating an executable and if your executable is not > > position-independent, you're using Initial Exec model by de...
2012 Jun 15
2
[LLVMdev] [llvm-commits] [Patch, RFC] Re: Adding support for explicitly specified TLS models (PR9788)
...n i386 Linux, the following code, >> >>  static __thread int x[100000]; >>  int* get_x() { return x; } >> >> compiled with "clang -shared a.c -o a.so" won't be possible do dlopen. > > I get exactly the same result with gcc 4.7 with and without > -ftls-model=global-dynamic: > > movq %gs:0, %eax > addl $x at ntpoff, %eax Thanks for bearing with me on this. I think it's important that we get it right. I could have sworn I tried with -ftls-model yesterday, but apparently I didn't. Seems it works differently than I assumed (I guess...
2008 Jul 30
0
[LLVMdev] address space overloading patch broke the llvm-gcc build
...- > linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-4.2.llvm/ > libgomp -I. -I../../../gcc-4.2.llvm/libgomp/config/linux/x86 - > I../../../gcc-4.2.llvm/libgomp/config/linux -I../../../gcc-4.2.llvm/ > libgomp/config/posix -I../../../gcc-4.2.llvm/libgomp -Wall -Werror - > ftls-model=initial-exec -march=i486 -pthread -mtune=i686 -O2 -g -O2 - > MT critical.lo -MD -MP -MF .deps/critical.Tpo -c ../../../ > gcc-4.2.llvm/libgomp/critical.c -fPIC -DPIC -o .libs/critical.o > Overloaded intrinsic has incorrect suffix: '.i8'. It should be > '.i8.p0i8...
2008 Feb 06
0
[LLVMdev] strange visibility error when compiling llvm-gcc-4.2
...i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/s/llvm/svn.gcc42/libgomp -I. -I/s/llvm/svn.gcc42/libgomp/config/linux/x86 -I/s/llvm/svn.gcc42/libgomp/config/linux -I/s/llvm/svn.gcc42/libgomp/config/posix -I/s/llvm/svn.gcc42/libgomp -Wall -Werror -ftls-model=initial-exec -march=i486 -mtune=i686 -Wc,-pthread -O2 -g -O2 -MT lock.lo -MD -MP -MF ".deps/lock.Tpo" -c -o lock.lo /s/llvm/svn.gcc42/libgomp/config/linux/lock.c; \ > then mv -f ".deps/lock.Tpo" ".deps/lock.Plo"; else rm -f ".deps/lock.Tpo";...
2008 Jul 30
1
[LLVMdev] address space overloading patch broke the llvm-gcc build
...x-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-4.2.llvm/ >> libgomp -I. -I../../../gcc-4.2.llvm/libgomp/config/linux/x86 - >> I../../../gcc-4.2.llvm/libgomp/config/linux -I../../../gcc-4.2.llvm/ >> libgomp/config/posix -I../../../gcc-4.2.llvm/libgomp -Wall -Werror - >> ftls-model=initial-exec -march=i486 -pthread -mtune=i686 -O2 -g -O2 - >> MT critical.lo -MD -MP -MF .deps/critical.Tpo -c ../../../ >> gcc-4.2.llvm/libgomp/critical.c -fPIC -DPIC -o .libs/critical.o >> Overloaded intrinsic has incorrect suffix: '.i8'. It should be >> ...
2008 Feb 06
6
[LLVMdev] strange visibility error when compiling llvm-gcc-4.2
...l/i686-pc-linux-gnu/sys-include - >> DHAVE_CONFIG_H -I. -I/s/llvm/svn.gcc42/libgomp -I. -I/s/llvm/ >> svn.gcc42/libgomp/config/linux/x86 -I/s/llvm/svn.gcc42/libgomp/ >> config/linux -I/s/llvm/svn.gcc42/libgomp/config/posix -I/s/llvm/ >> svn.gcc42/libgomp -Wall -Werror -ftls-model=initial-exec - >> march=i486 -mtune=i686 -Wc,-pthread -O2 -g -O2 -MT lock.lo -MD -MP >> -MF ".deps/lock.Tpo" -c -o lock.lo /s/llvm/svn.gcc42/libgomp/config/ >> linux/lock.c; \ >> then mv -f ".deps/lock.Tpo" ".deps/lock.Plo"; el...
2017 Nov 08
2
[RFC] lld: Dropping TLS relaxations in favor of TLSDESC
...an executable and if your executable is not > >> > position-independent, you're using Initial Exec model by default > which is > >> > as fast as variables accessed through GOT. If you really want to use > >> Local > >> > Exec model, you can pass -ftls-model=local-exec to compilers. > >> > >> But then all the used variables have to be defined in the same > >> executable. You can't have even one from a shared library (think errno). > >> > > > > Not really -- you can still use Local Exec per varia...
2012 Jun 12
0
[LLVMdev] [llvm-commits] [Patch, RFC] Re: Adding support for explicitly specified TLS models (PR9788)
On Tue, Jun 12, 2012 at 07:21:17PM +0100, Hans Wennborg wrote: > On Tue, Jun 12, 2012 at 7:05 PM, Joerg Sonnenberger > <joerg at britannica.bec.de> wrote: > > On Tue, Jun 12, 2012 at 12:36:28PM -0400, Rafael Espíndola wrote: > >> >> Do you know what is the rationale for that? The static linker will > >> >> optimize it anyway (but not do as good a job
2008 Feb 06
0
[LLVMdev] strange visibility error when compiling llvm-gcc-4.2
...gnu/sys-include - > >> DHAVE_CONFIG_H -I. -I/s/llvm/svn.gcc42/libgomp -I. -I/s/llvm/ > >> svn.gcc42/libgomp/config/linux/x86 -I/s/llvm/svn.gcc42/libgomp/ > >> config/linux -I/s/llvm/svn.gcc42/libgomp/config/posix -I/s/llvm/ > >> svn.gcc42/libgomp -Wall -Werror -ftls-model=initial-exec - > >> march=i486 -mtune=i686 -Wc,-pthread -O2 -g -O2 -MT lock.lo -MD -MP > >> -MF ".deps/lock.Tpo" -c -o lock.lo /s/llvm/svn.gcc42/libgomp/config/ > >> linux/lock.c; \ > >> then mv -f ".deps/lock.Tpo" ".deps/lo...
2012 Jun 12
2
[LLVMdev] [llvm-commits] [Patch, RFC] Re: Adding support for explicitly specified TLS models (PR9788)
On Tue, Jun 12, 2012 at 7:05 PM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote: > On Tue, Jun 12, 2012 at 12:36:28PM -0400, Rafael Espíndola wrote: >> >> Do you know what is the rationale for that? The static linker will >> >> optimize it anyway (but not do as good a job as the compiler could). >> > >> > codegen can be more efficient. E.g.
2016 May 03
4
Linux/ARM: Segfault issue when we build clang sources including __thread variable using -O2 flag
...09590 in _start () Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) (gdb) (gdb) (gdb) At that time, I defined the "global-dynamic" TLS model by default with Clang/LLVM compiler as following: SET (CMAKE_C_FLAGS_INIT "-Wall -std=c11 -ftls-model=global-dynamic") We can build and run hello!!! console application with clang/LLVM with -O1 optimization level for Ubuntu/ARM 14.04 32bit as following. src/pal/tools/clang-compiler-override.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/pal/t...
2017 Nov 08
6
[RFC] lld: Dropping TLS relaxations in favor of TLSDESC
tl;dr: TLSDESC have solved most problems in formerly inefficient TLS access models, so I think we can drop TLS relaxation support from lld. lld's code to handle relocations is a mess; the code consists of a lot of cascading "if"s and needs a lot of prior knowledge to understand what it is doing. Honestly it is head-scratching and needs serious refactoring. I'm trying to simplify