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

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 11:32:38 PDT 2020


dschuff accepted this revision.
dschuff added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/include/llvm/Target/TargetMachine.h:114
   StringRef getTargetFeatureString() const { return TargetFS; }
+  void setTargetFeatureString(StringRef FS) { TargetFS = std::string(FS); }
 
----------------
tlively wrote:
> tlively wrote:
> > 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.
> This did remind me to put the passes back in the proper order so that CoalesceLocalsAndStripAtomics runs first again.
Sounds good. Especially given that the string already doesn't match the used features, it sounds like nobody is really using it after init.


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