[AArch64][SME] Add utility class for handling SME attributes.
authorSander de Smalen <sander.desmalen@arm.com>
Mon, 12 Sep 2022 11:05:55 +0000 (11:05 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Mon, 12 Sep 2022 12:41:30 +0000 (12:41 +0000)
commitcf72dddaefe9b0b15cf6d1e7d6b991eded78b40f
tree7908ad90ffa7fe1d5e0936c33159505e1753861e
parentc34679b2e826a457a318fa8c5651bd588c916c85
[AArch64][SME] Add utility class for handling SME attributes.

This patch adds a utility class that will be used in subsequent patches
for parsing the function/callsite attributes and determining whether
changes to PSTATE.SM are needed, or whether a lazy-save mechanism is
required.

It also implements some of the restrictions on the SME attributes
in the IR Verifier pass.

More details about the SME attributes and design can be found
in D131562.

Reviewed By: david-arm, aemerson

Differential Revision: https://reviews.llvm.org/D131570
llvm/lib/IR/Verifier.cpp
llvm/lib/Target/AArch64/Utils/AArch64SMEAttributes.cpp [new file with mode: 0644]
llvm/lib/Target/AArch64/Utils/AArch64SMEAttributes.h [new file with mode: 0644]
llvm/lib/Target/AArch64/Utils/CMakeLists.txt
llvm/test/Verifier/sme-attributes.ll [new file with mode: 0644]
llvm/unittests/Target/AArch64/CMakeLists.txt
llvm/unittests/Target/AArch64/SMEAttributesTest.cpp [new file with mode: 0644]