[Mlir-commits] [mlir] [mlir][ArmSME] Suppress potential unused warning (PR #99573)
Chenguang Wang
llvmlistbot at llvm.org
Thu Jul 18 14:39:08 PDT 2024
https://github.com/wecing created https://github.com/llvm/llvm-project/pull/99573
When building in release mode, the assert will be dropped, making `remove` unused.
>From b41801166f6a6fa9a24b1b1a537b08180de8ee61 Mon Sep 17 00:00:00 2001
From: Chenguang Wang <chenguangwang at google.com>
Date: Thu, 18 Jul 2024 14:37:02 -0700
Subject: [PATCH] [mlir][ArmSME] Suppress potential unused warning
When building in release mode, the assert will be dropped, making `remove`
unused.
---
mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp b/mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp
index 5cac770b03ed1..4648944156951 100644
--- a/mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp
+++ b/mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp
@@ -619,6 +619,7 @@ void allocateTilesToLiveRanges(
// Remove the live range from the active/inactive sets.
if (!activeRanges.remove(rangeToSpill)) {
bool removed = inactiveRanges.remove(rangeToSpill);
+ (void)removed;
assert(removed && "expected a range to be removed!");
}
}
More information about the Mlir-commits
mailing list