[PATCH] D159186: [AArch64][SME] Enable TPIDR2 lazy-save for za_preserved
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 12 00:39:45 PDT 2023
sdesmalen added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:7309
+ else if (auto *ES = dyn_cast<ExternalSymbolSDNode>(CLI.Callee))
+ if (auto SMEABIAttrs = SMEAttrs(ES->getSymbol()))
+ CalleeAttrs = SMEABIAttrs;
----------------
Do we really need the `if`-statement? For example, can we just write:
else if (auto *ES = ...)
CalleeAttrs = SMEAttrs(ES->getSymbol());
If the default for `SMEAttrs(<symbol>)` is that it doesn't have any streaming- or ZA properties then this is equivalent to what we had before this patch
================
Comment at: llvm/lib/Target/AArch64/Utils/AArch64SMEAttributes.cpp:26
assert(!(hasNewZABody() && preservesZA()) &&
"ZA_New and ZA_Preserved are mutually exclusive");
}
----------------
Does this need a new assert to say that NewZA and SharedZA cannot be combined with `NoLazySave`?
================
Comment at: llvm/lib/Target/AArch64/Utils/AArch64SMEAttributes.h:90
+
+ operator bool() { return Bitmask; }
};
----------------
I'd rather we don't add an `operator bool()`, because it's not clear to me what it is supposed to represent that the existing interfaces don't represent already.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159186/new/
https://reviews.llvm.org/D159186
More information about the llvm-commits
mailing list