[llvm-dev] Linux/ARM: Segfault issue when we build clang sources including __thread variable using -O2 flag
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Fri May 6 06:58:06 PDT 2016
On 5 May 2016 at 23:27, Geunsik Lim <leemgs at gmail.com> wrote:
> BTW, the above "ACPV->AddCurrentAddress == AddCurrentAddress" statement
> does also handle in case of other Oz/Os levels as well as O2/O3 optimization
> levels?
Yes, this code is applied at all optimization levels (when asked). The
actual pass doing the final transformation (loop invariant code
motion) probably doesn't run at -O0, but I'd expect it at all others.
> As I reported previously, we have not experienced a incorrect operation of
> __thread variable (via __tls_get_addr symbol) with O0/O1 flags. Maybe, does
> a key reason of this issue is LLVM's inline transform pass (e.g.,
> llvm-opt)?
The inliner was needed in this case because most TLS accesses were
hidden away in GetThread. You could write C code that would fail at
-O1 if you tried.
I'm' afraid I don't tend to pay attention to exactly which passes get
run at different optimization levels, so can't really answer any
detailed questions there.
Cheers.
Tim.
More information about the llvm-commits
mailing list