This is used by disassemblers: llvm-mc -disassemble -mattr= and llvm-objdump --mattr=.
The main use case is for llvm-objdump to disassemble all known instructions
(D128030).
In user-facing tools, "all" is intentionally not supported in producers:
integrated assembler (.arch_extension all), clang -march (-march=armv9.3a+all).
Due to the code structure, llvm-mc -mattr=+all llc -mattr=+all are not
rejected (they are internal tool). Add llvm/test/CodeGen/AArch64/mattr-all.ll
to catch behavior changes.
AArch64SysReg::SysReg::haveFeatures: check FeatureAll to print
AArch64SysReg::SysReg::AltName for some system registers (e.g. ERRIDR_EL1, RNDR).
AArch64.td: add AssemblerPredicateWithAll to additionally test FeatureAll.
Change all AssemblerPredicate (except UseNegativeImmediates) to AssemblerPredicateWithAll.
utils/TableGen/{DecoderEmitter,SubtargetFeatureInfo}.cpp: support arbitrarily
nested all_of, any_of, and not.
Note: A predicate supports all_of, any_of, and not. For a target (though
currently not for AArch64) an encoding may be disassembled differently with
different target features.
Note: AArch64MCCodeEmitter::computeAvailableFeatures is not available to
the disassembler.
I think this will introduce a bit of a maintenance burden and I can see new features being missed, could this be generated by tablegen?