[PATCH] D35569: [ARM] Remove FeatureNoARM implies ModeThumb.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 07:25:01 PDT 2017


fhahn added a comment.

In https://reviews.llvm.org/D35569#815009, @fhahn wrote:

> In https://reviews.llvm.org/D35569#814990, @efriedma wrote:
>
> > In terms of cleaning this up, we should probably have "FeatureARM", for CPUs which support ARM-mode execution, rather than "FeatureNoARM"; negative features are confusing.
>
>
> That sounds like a  good idea. I'll update this patch tomorrow, unless there are any objections.


After looking into that, I am not sure if replacing FeatureNoARM with FeatureARM is a good idea for practical reasons. The advantage of assuming all CPUs/architectures have ARM mode unless they have FeatureNoARM is the following: it allows the architecture to disable ARM mode for CPUs that have ARM mode. For example, currently `llc < foo.ll.ll -mtriple=thumbv6m-linux-gnueabi` will assume ARM mode is not available (as the v6m architecture does not support ARM mode), even though the generic CPU has ARM mode.

With FeatureARM, the generic CPU would have to have this feature, but when the features of the architecture (v6m) are applied, FeatureARM cannot be removed, so the behavior will be different to the current one (Architecture features are applied after CPU features I think). We could rename FeatureARM to FeatureThumbOnly, which is a bit clearer in my opinion.


https://reviews.llvm.org/D35569





More information about the llvm-commits mailing list