This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Define subtarget feature "dont-use-movt" to disallow emitting movt/movw pairs
ClosedPublic

Authored by ahatanak on Jul 7 2015, 7:44 PM.

Details

Summary

This patch defines a new ARM subtarget feature that replaces the cl::opt option ArmUseMOVT to disallow emitting movt/movw pairs.

The corresponding clang patch is here: http://reviews.llvm.org/D11025

Diff Detail

Event Timeline

ahatanak updated this revision to Diff 29233.Jul 7 2015, 7:44 PM
ahatanak retitled this revision from to [ARM] Define subtarget feature "dont-use-movt" to disallow emitting movt/movw pairs.
ahatanak updated this object.
ahatanak added reviewers: echristo, dexonsmith.
ahatanak added a subscriber: llvm-commits.
echristo edited edge metadata.Jul 8 2015, 1:52 PM

Let's have the feature be a positive feature that just happens to be on by default in a lot of places. +/-dont-use-movt seems weird.

-eric

Do you mean I should replace ARMSubtarget::DontUseMovt with ARMSubtarget::UseMovt which is true by default? That should work.

Or do you mean we should use FeatureUseMovt : SubtargetFeature<"use-movt"> instead of FeatureDontUseMovt<"dont-use-movt">? If I understand correctly how subtarget features work, I think that would require clang (and other front-ends) to add feature "+use-movt" whenever we want to allow emitting movt/movw pairs as opposed to adding "+dont-use-movt" only when we want to disallow doing so. Assuming you would want to allow movt/movw pairs in the common case, wouldn't it be better to use a negative feature?

This revision was automatically updated to reflect the committed changes.