[libc-commits] [libc] [clang] [compiler-rt] [clang-tools-extra] [libcxxabi] [flang] [lldb] [lld] [llvm] [libcxx] [RISCV] Support Global Dynamic TLSDESC in the RISC-V backend (PR #66915)

Fangrui Song via libc-commits libc-commits at lists.llvm.org
Tue Jan 16 21:00:21 PST 2024


================
@@ -80,6 +80,11 @@ static cl::opt<bool> EnableRISCVDeadRegisterElimination(
              " them with stores to x0"),
     cl::init(true));
 
+// TODO: This should be controlled by -mtls-dialect=<option>
+cl::opt<bool> EnableRISCVTLSDESC("riscv-enable-tlsdesc",
----------------
MaskRay wrote:

We should add an option to `codegen::InitTargetOptionsFromCodeGenFlags`, then reference it using something like `DAG.getTarget().useTLSDESC()`. aarch64 ELF only implements TLSDESC for dynamic TLS models, it is fine for it to ignore `useTLSDESC`.

https://github.com/llvm/llvm-project/pull/66915


More information about the libc-commits mailing list