diff options
author | Benjamin Maxwell <benjamin.maxwell@arm.com> | 2025-08-12 09:15:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-12 09:15:30 +0100 |
commit | d0c9599c41217bbd954b0fcbe0e26ea70a88d594 (patch) | |
tree | 6c2934f8ea1e22d168404b7edb7c3e75837e5374 /llvm/utils/UpdateTestChecks/common.py | |
parent | e9ece175f9dad9b38492bab3b90743f9406d08e8 (diff) | |
download | llvm-d0c9599c41217bbd954b0fcbe0e26ea70a88d594.zip llvm-d0c9599c41217bbd954b0fcbe0e26ea70a88d594.tar.gz llvm-d0c9599c41217bbd954b0fcbe0e26ea70a88d594.tar.bz2 |
[AArch64][SME] Use entry pstate.sm for conditional streaming-mode changes (#152169)
We only do conditional streaming mode changes in two cases:
- Around calls in streaming-compatible functions that don't have a
streaming body
- At the entry/exit of streaming-compatible functions with a streaming
body
In both cases, the condition depends on the entry pstate.sm value. Given
this, we don't need to emit calls to __arm_sme_state at every mode
change.
This patch handles this by placing a "AArch64ISD::ENTRY_PSTATE_SM" node
in the entry block and copying the result to a register. The register is
then used whenever we need to emit a conditional streaming mode change.
The "ENTRY_PSTATE_SM" node expands to a call to "__arm_sme_state" only
if (after SelectionDAG) the function is determined to have
streaming-mode changes.
This has two main advantages:
1. It allows back-to-back conditional smstart/stop pairs to be folded
2. It has the correct behaviour for EH landing pads
- These are entered with pstate.sm = 0, and should switch mode based on
the entry pstate.sm
- Note: This is not fully implemented yet
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
0 files changed, 0 insertions, 0 deletions