diff options
author | Sander de Smalen <sander.desmalen@arm.com> | 2024-12-23 19:10:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-23 19:10:21 +0000 |
commit | 2ce168baed02c7a6fdb039f4a2d9e48dee31e5c9 (patch) | |
tree | 46f2ad96acbfc9bf0547a7f7cec6c459fee7b537 /llvm/lib/IR/Verifier.cpp | |
parent | d8e792931226b15d9d2424ecd24ccfe13adc2367 (diff) | |
download | llvm-2ce168baed02c7a6fdb039f4a2d9e48dee31e5c9.zip llvm-2ce168baed02c7a6fdb039f4a2d9e48dee31e5c9.tar.gz llvm-2ce168baed02c7a6fdb039f4a2d9e48dee31e5c9.tar.bz2 |
[AArch64] SME implementation for agnostic-ZA functions (#120150)
This implements the lowering of calls from agnostic-ZA functions to
non-agnostic-ZA functions, using the ABI routines
`__arm_sme_state_size`, `__arm_sme_save` and `__arm_sme_restore`.
This implements the proposal described in the following PRs:
* https://github.com/ARM-software/acle/pull/336
* https://github.com/ARM-software/abi-aa/pull/264
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 48e2776..7b6f7b5 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2268,19 +2268,23 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs, Check((Attrs.hasFnAttr("aarch64_new_za") + Attrs.hasFnAttr("aarch64_in_za") + Attrs.hasFnAttr("aarch64_inout_za") + Attrs.hasFnAttr("aarch64_out_za") + - Attrs.hasFnAttr("aarch64_preserves_za")) <= 1, + Attrs.hasFnAttr("aarch64_preserves_za") + + Attrs.hasFnAttr("aarch64_za_state_agnostic")) <= 1, "Attributes 'aarch64_new_za', 'aarch64_in_za', 'aarch64_out_za', " - "'aarch64_inout_za' and 'aarch64_preserves_za' are mutually exclusive", + "'aarch64_inout_za', 'aarch64_preserves_za' and " + "'aarch64_za_state_agnostic' are mutually exclusive", V); - Check( - (Attrs.hasFnAttr("aarch64_new_zt0") + Attrs.hasFnAttr("aarch64_in_zt0") + - Attrs.hasFnAttr("aarch64_inout_zt0") + - Attrs.hasFnAttr("aarch64_out_zt0") + - Attrs.hasFnAttr("aarch64_preserves_zt0")) <= 1, - "Attributes 'aarch64_new_zt0', 'aarch64_in_zt0', 'aarch64_out_zt0', " - "'aarch64_inout_zt0' and 'aarch64_preserves_zt0' are mutually exclusive", - V); + Check((Attrs.hasFnAttr("aarch64_new_zt0") + + Attrs.hasFnAttr("aarch64_in_zt0") + + Attrs.hasFnAttr("aarch64_inout_zt0") + + Attrs.hasFnAttr("aarch64_out_zt0") + + Attrs.hasFnAttr("aarch64_preserves_zt0") + + Attrs.hasFnAttr("aarch64_za_state_agnostic")) <= 1, + "Attributes 'aarch64_new_zt0', 'aarch64_in_zt0', 'aarch64_out_zt0', " + "'aarch64_inout_zt0', 'aarch64_preserves_zt0' and " + "'aarch64_za_state_agnostic' are mutually exclusive", + V); if (Attrs.hasFnAttr(Attribute::JumpTable)) { const GlobalValue *GV = cast<GlobalValue>(V); |