[PATCH] D88262: [WebAssembly] Make SjLj lowering globals thread-local

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 14:50:48 PDT 2020


tlively added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp:322
+                              GlobalVariable::ExternalLinkage, nullptr, Name,
+                              nullptr, GlobalValue::LocalExecTLSModel);
+  }));
----------------
sbc100 wrote:
> I'm surprised this is the cleanest way to do make the global as TLS...  I still find lambdas a little harder to parse that straight line code.      It kind of makes me what to write a little named functions called `makeTLSGlobal` to make this easier tfor me to read, but maybe thats just me.
Yeah, although I think the readability problem is mostly due to the huge number of arguments the GlobalVariable constructor takes. It would be nice if they had some more specific factory methods or constructor overloads.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88262



More information about the llvm-commits mailing list