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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 03:38:26 PST 2019


fhahn added a comment.

In D57812#1386859 <https://reviews.llvm.org/D57812#1386859>, @samparker wrote:

> Hi Florian,
>
> The main motivations here are:
>
> - remove the dependency of a MachineFunction on ARMSubtarget->useMovt so that we can query this function from ARMTTIImpl and other passes not using a MachineFunction.


Right, that makes sense. But wouldn't it work to set optForMinSize in getSubtargetImpl based on the attribute on the machine function, without  adding a sub target attribute (it looks like there are at least a few member variables in ARMSubtarget, that not directly correspond to a sub target feature).

IIUC the new target feature has exactly the same semantics as the existing minsize. Having them both might lead to situations where the target feature is set but not the function attribute and some passes respect just one of them.

> - use the subtarget to enable us to perform different setOperationActions.
> - use the subtarget to enable us to set different scheduling preferences.
> 
>   cheers,


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

https://reviews.llvm.org/D57812





More information about the llvm-commits mailing list