[PATCH] D57812: [ARM] Add OptMinSize Subtarget feature

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 09:44:56 PST 2019


efriedma added inline comments.


================
Comment at: lib/Target/ARM/ARMTargetMachine.cpp:279
 
+  I->setOptForMinSize(F.optForMinSize());
   return I.get();
----------------
You can't mutate the subtarget here; subtargets are only allowed to vary based on information in the key of SubtargetMap (or information that's invariant across the module).  In particular, this will break with module passes, like the machine outliner.

The SubtargetMap is under the control of the target; you can change the key type if you want.


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

https://reviews.llvm.org/D57812





More information about the llvm-commits mailing list