[PATCH] D141518: [AArch64] Move default extensions from clang Driver to TargetParser

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 09:09:25 PST 2023


dmgreen added a comment.

In D141518#4047833 <https://reviews.llvm.org/D141518#4047833>, @pratlucas wrote:

> It makes sense to move this to the TargetParser and the code looks much better indeed. My only concern is that this changes the driver's behaviour in regards to which target feature flags are passed from clang to the backend.
>
> It looks like the implied features are included in the backend calls for the `-mcpu` options and, as far as I can tell, those are correctly captured from the TargetParser info. Should we do the same for `-march` values? Or should we rely strictly in the backend expansion?

Hello. Are you looking at a compiler after D141411 <https://reviews.llvm.org/D141411> went in? I believe after that it should work as you mention. Let me know if it doesn't or you see any problems.

Also I believe that because in the backend HasV8_8aOps includes FeatureMOPS, the feature would already be enabled in codegen (so long as there isn't `-target-feature -mops` to disable it). Same for other features that become mandatory like dotprod, bf16 and i8mm. We would like them to be "known" by clang too though, so that it can get things like preprocessor defs and especially target("..") attributes correct.


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

https://reviews.llvm.org/D141518



More information about the llvm-commits mailing list