[PATCH] D130053: [WebAssembly] Use `localexec` as default TLS model for non-Emscripten targets

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 13:40:33 PDT 2022


sbc100 added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/tls-general-dynamic.ll:6
 ; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=-bulk-memory,atomics | FileCheck %s --check-prefixes=CHECK,NO-TLS
 target triple = "wasm32-unknown-unknown"
 
----------------
Should we change the triple here to be `wasm32-unknown-emscripten` and remove it from the lines above.

Also, might be worth adding a comment above.  Something like:

"This is a test for the experimental emscripten-specific general dynamic TLS support.  See tls-local-exec.ll for non-emscripten targets (since they lower all TLS to localexec)"


================
Comment at: llvm/test/CodeGen/WebAssembly/tls-local-exec.ll:5
+
+; Also, run the same tests without a specified TLS mode--this should still emit `localexec` code.
+; RUN: sed -e 's/\[\[TLS_MODE\]\]//' %s | llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=+bulk-memory,atomics - | FileCheck --check-prefixes=CHECK,TLS %s
----------------
Maybe add something like "...on non-emscripten targets which don't currently support dynamic linking."

Also, should we run this with explicit general dynamic too? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130053



More information about the llvm-commits mailing list