[llvm] [AArch64] Set the default streaming hazard size to 1024 for +sme,+sve (PR #123753)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 06:32:22 PST 2025
================
@@ -179,7 +179,12 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo {
/// Returns the size of memory region that if accessed by both the CPU and
/// the SME unit could result in a hazard. 0 = disabled.
- unsigned getStreamingHazardSize() const { return StreamingHazardSize; }
+ unsigned getStreamingHazardSize() const {
+ // If StreamingHazardSize has been explicitly set to a value, use that.
+ // Otherwise, default to 1024 bytes when both SME and SVE are available,
+ // for all other configurations default to no streaming hazards.
+ return StreamingHazardSize.value_or(hasSME() && hasSVE() ? 1024 : 0);
----------------
sdesmalen-arm wrote:
Please also add a check that `!hasSMEFA64()` (because if FA64 is available, then I wouldn't expect any hazards)
https://github.com/llvm/llvm-project/pull/123753
More information about the llvm-commits
mailing list