llvm-project
95a79df6 - [AArch64][clang] Use tablegen rather than hard-coded feature dependencies

Commit
21 days ago
[AArch64][clang] Use tablegen rather than hard-coded feature dependencies Refactor AArch64 frontend feature handling so extension relationships come from the TargetParser extension graph instead of hand-written dependency code in C++. This makes `llvm::AArch64::ExtensionSet` the source of truth for dependency expansion while still keeping the short `Has...` names used in the frontend code. This removes a large amount of duplicated implication logic from `handleTargetFeatures` and related feature queries. The frontend now rebuilds its extension state from TableGen-derived data and then derives its cached feature state from that, rather than maintaining parallel dependency rules in C++. I also preserved several pieces of historical frontend behaviour that are not represented directly in the extension graph. Explicit disables such as `no-sme` still win after implied-feature expansion, direct `+fullfp16` and `+jscvt` still restore the expected NEON-facing state, and SME-family features no longer incorrectly appear to enable AdvSIMD/NEON. Finally, I added regression coverage for the direct-feature and explicit disable cases uncovered during review, including raw `-target-feature` combinations and target-attribute cases such as `no-sme`.
Author
Committer
Parents
Loading