[PATCH] D143619: [llvm][codegen] Disallow default Emulated TLS for RISCV

Paul Kirth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 08:52:25 PST 2023


paulkirth added a comment.

In D143619#4115147 <https://reviews.llvm.org/D143619#4115147>, @luismarques wrote:

> Does this mean that Android, OpenBSD, and Cygwin have emulated TLS support for all supported architectures other than RISC-V?

I'm not completely sure, but AFAIK this list accurate. What I do know is that we don't support this feature for triples w/ `riscv64` in them.

> Or are you essentially asserting, by making this contribution, that we should add additional opt-outs for other architectures?

I think we should follow suite whenever the architecture(or our policy w.r.t. the architecture) has a similar limitation. I'm not aware of any other architectures with that limitation, though. In this case, we won't support emulated TLS, and having this default set incorrectly leads to some hard to diagnose issues w/ undefined variables showing up under LTO. Ideally, we'd propagate the `fno-emulated-tls` flag through to the linker better, but I think flags not making it through under LTO is a bigger/more general issue and would require non-trivial work + an RFC. But, in this case the default is still wrong for 64-bit RISC-V.

> The test overall looks reasonable but it could be cleaned up a little bit (e.g. the attributes).

Thanks for taking a look. I'll try to minimize the test a bit more.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143619/new/

https://reviews.llvm.org/D143619



More information about the llvm-commits mailing list