Skip to content

[mlir][ArmSME] Suppress potential unused warning #99573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

wecing
Copy link
Contributor

@wecing wecing commented Jul 18, 2024

When building in release mode, the assert will be dropped, making remove unused.

When building in release mode, the assert will be dropped, making `remove`
unused.
@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2024

@llvm/pr-subscribers-mlir-sme

Author: Chenguang Wang (wecing)

Changes

When building in release mode, the assert will be dropped, making remove unused.


Full diff: https://github.com/llvm/llvm-project/pull/99573.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp (+1)
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!");
         }
       }

@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2024

@llvm/pr-subscribers-mlir

Author: Chenguang Wang (wecing)

Changes

When building in release mode, the assert will be dropped, making remove unused.


Full diff: https://github.com/llvm/llvm-project/pull/99573.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp (+1)
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!");
         }
       }

@wecing wecing merged commit 05bce3f into llvm:main Jul 18, 2024
8 of 9 checks passed
@wecing
Copy link
Contributor Author

wecing commented Jul 18, 2024

whoops, apparently there's 99faa03 as well @kazutakahirata

let me remove my change, then

wecing added a commit to wecing/llvm-project that referenced this pull request Jul 18, 2024
This reverts commit 05bce3f.

The work was already done in 99faa03.
wecing added a commit that referenced this pull request Jul 18, 2024
…99578)

This reverts commit 05bce3f.

The work was already done in 99faa03.
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
When building in release mode, the assert will be dropped, making
`remove` unused.
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
…99578)

This reverts commit 05bce3f.

The work was already done in 99faa03.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants