[AArch64][SME] Add codegen pass to handle ZA state in arm_new_za functions.
authorDavid Sherwood <david.sherwood@arm.com>
Wed, 5 Oct 2022 08:12:31 +0000 (08:12 +0000)
committerDavid Sherwood <david.sherwood@arm.com>
Wed, 5 Oct 2022 09:43:57 +0000 (09:43 +0000)
commitf0f474dfd03b6131e04ce23a63b070c598a14473
tree980a2d9323ec47b4cc5fbc1ffbf053d7ce647668
parent08497a785bfb790ff966c8d76773fa60ccb4d03b
[AArch64][SME] Add codegen pass to handle ZA state in arm_new_za functions.

The new pass implements the following:

* Inserts code at the start of an arm_new_za function to
    commit a lazy-save when the lazy-save mechanism is active.
* Adds a smstart intrinsic at the start of the function.
* Adds a smstop intrinsic at the end of the function.

Patch co-authored by kmclaughlin.

Differential Revision: https://reviews.llvm.org/D133896
llvm/docs/AArch64SME.rst
llvm/lib/Target/AArch64/AArch64.h
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/lib/Target/AArch64/CMakeLists.txt
llvm/lib/Target/AArch64/SMEABIPass.cpp [new file with mode: 0644]
llvm/test/CodeGen/AArch64/O0-pipeline.ll
llvm/test/CodeGen/AArch64/O3-pipeline.ll
llvm/test/CodeGen/AArch64/sme-new-za-function.ll [new file with mode: 0644]