[PATCH] D128029: [AArch64] Add target feature "all"

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 02:37:10 PDT 2022


peter.smith added a comment.

I definitely agree that there should be the functionality in the disassembler. By default Arm's proprietary toolchain operates in this mode, for want of a better word, we called it universal disassembly. There is an option for architecture aware disassembly by giving it a CPU. For most of Arm (some unfortunate overlap with some mutually exclusive M-profile and A profile extensions) and all of AArch64 there are no overlapping encodings so universal tends to work well.

Main reason for mentioning that is to ask the question; is -mattr=all too low level a concept to model universal disassembly on the command line? I'm thinking it is fine for llvm-mc but perhaps llvm-objdump could do with something a bit more high-level.

While I do think updating all could be fixed by process, i.e. when adding a new architecture remember to add to "all", however if there is a way to do this automatically it would be useful to have that in TableGen. Perhaps something like `computeAvailableFeatures()`. For example `setAllFeatures()` which just calls `Features.set(Feature_...)` for all Subtarget features. With perhaps a backend specific option to toggle off specific features if needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128029



More information about the llvm-commits mailing list