-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Verif] Mark SymbolicValueOp result as MemAlloc (#8208)
Add the `MemAlloc` side effect to the result of `verif.symbolic_value`. This allows the canonicalizer to delete the op if it has no users while still preventing CSE from mergin multiple symbolic values. Also add a few placeholders to the `lower-contracts.mlir` test to make it more robust.
- Loading branch information
1 parent
1892650
commit b1cae94
Showing
4 changed files
with
131 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// RUN: circt-opt --cse %s | FileCheck %s | ||
|
||
// CHECK-LABEL: @SymbolicValuesMustNotCSE | ||
hw.module @SymbolicValuesMustNotCSE(out a: i32, out b: i32) { | ||
// CHECK: [[TMP1:%.+]] = verif.symbolic_value | ||
// CHECK: [[TMP2:%.+]] = verif.symbolic_value | ||
// CHECK: hw.output [[TMP1]], [[TMP2]] | ||
%0 = verif.symbolic_value : i32 | ||
%1 = verif.symbolic_value : i32 | ||
hw.output %0, %1 : i32, i32 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters