[all-commits] [llvm/llvm-project] 45f3a5: [AArch64] Add target feature "all"
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Jun 30 10:38:34 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 45f3a5aae7320a847bbcb24eca0a33e933ec8561
https://github.com/llvm/llvm-project/commit/45f3a5aae7320a847bbcb24eca0a33e933ec8561
Author: Fangrui Song <i at maskray.me>
Date: 2022-06-30 (Thu, 30 Jun 2022)
Changed paths:
M llvm/lib/Target/AArch64/AArch64.td
M llvm/lib/Target/AArch64/AArch64InstrInfo.td
M llvm/lib/Target/AArch64/AArch64SystemOperands.td
M llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
A llvm/test/CodeGen/AArch64/mattr-all.ll
M llvm/test/MC/AArch64/alias-addsubimm.s
M llvm/test/MC/AArch64/armv8.6a-bf16.s
A llvm/test/MC/Disassembler/AArch64/mattr-all.txt
M llvm/test/TableGen/AsmPredicateCombining.td
M llvm/utils/TableGen/AsmWriterEmitter.cpp
M llvm/utils/TableGen/DecoderEmitter.cpp
M llvm/utils/TableGen/SubtargetFeatureInfo.cpp
Log Message:
-----------
[AArch64] Add target feature "all"
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.
Reviewed By: peter.smith, lenary
Differential Revision: https://reviews.llvm.org/D128029
More information about the All-commits
mailing list