[PATCH] D88323: [WebAssembly] Check features before making SjLj vars thread-local

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 11:14:41 PDT 2020


tlively added inline comments.


================
Comment at: llvm/include/llvm/Target/TargetMachine.h:114
   StringRef getTargetFeatureString() const { return TargetFS; }
+  void setTargetFeatureString(StringRef FS) { TargetFS = std::string(FS); }
 
----------------
dschuff wrote:
> where does the feature string usually get initialized? just during TM construction? Is there any particular risk in allowing it to be changed after init?
Yes, usually just during initialization. It comes from whatever `-mattr=...` options are provided on the command line, but doesn't actually represent the full set of enabled features because functions can introduce additional features.

I don't think there's much risk in changing the string after creation, especially since we were already changing the feature strings on each individual function and those feature strings seem to be more widely used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88323



More information about the llvm-commits mailing list