[llvm] [AArch64][SME] Conditionally do smstart/smstop (PR #77113)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 16 06:30:06 PST 2024
================
@@ -65,6 +65,16 @@ SMEAttrs::SMEAttrs(const AttributeList &Attrs) {
std::optional<bool>
SMEAttrs::requiresSMChange(const SMEAttrs &Callee,
bool BodyOverridesInterface) const {
+ // If the caller has a streaming body and streaming compatible interface,
+ // we will have already conditionally enabled streaming mode on function
+ // entry. We need to disable streaming mode when a callee does not have A
+ // streaming interface, body, or streaming compatible interface.
+ if (hasStreamingBody() && hasStreamingCompatibleInterface())
+ return (!Callee.hasStreamingInterfaceOrBody() &&
+ !Callee.hasStreamingCompatibleInterface())
+ ? std::optional<bool>(false)
+ : std::nullopt;
+
----------------
sdesmalen-arm wrote:
The three states are to describe:
* `std::nullopt` = No change needed
* `std::optional<bool>(true)` = Change needed, smstart
* `std::optional<bool>(false)` = Change needed, smstop
I do agree the interface is confusing and could be better named.
https://github.com/llvm/llvm-project/pull/77113
More information about the llvm-commits
mailing list