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
Paths
| Differential D11026
[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 TimelineComment Actions 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 Comment Actions 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? Closed by commit rL242369: [ARM] Define a subtarget feature that is used to avoid using movt/movw (authored by ahatanak). · Explain WhyJul 15 2015, 5:58 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 29860 llvm/trunk/lib/Target/ARM/ARM.td
llvm/trunk/lib/Target/ARM/ARMSubtarget.h
llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
llvm/trunk/test/CodeGen/ARM/fast-isel-mvn.ll
llvm/trunk/test/CodeGen/ARM/subtarget-no-movt.ll
|