This patch adds error diagnostics to Clang when code uses the AArch64 SME
attributes without specifying 'sme' as available target attribute.
- Function definitions marked as 'arm_streaming', 'arm_locally_streaming', 'arm_shared_za' or 'arm_new_za' will by definition use or require SME instructions.
- Calls from non-streaming functions to streaming-functions require the compiler to enable/disable streaming-SVE mode around the call-site.
In some cases we can accept the SME attributes without having 'sme' enabled:
- Function declaration can have the SME attributes.
- Definitions can be __arm_streaming_compatible since the generated code should execute on processing elements without SME.
Seems like we can easily split this into two and distinguish the cases, since the code that gives the error can always tell which case applies. I think not having SME for streaming mode is logically more fundamental than not having SME for ZA.
I think sme should be SME (if it's referring to the ISA feature) or should be quoted (if it's referring to the feature syntax).