-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Moore] Add more AssignedVariableOp canonicalizations (#7477)
Change the `AssignedVariableOp` to directly return type `T` instead of the `ref<T>`. This removes the implied allocation and assignment, and makes this op behave essentially like `hw.wire`. The canonicalizers for `VariableOp` and `NetOp` can now replace all reads from the old variable or net with the value of `AssignedVariableOp` directly, since there is no more `ref<T>` type involved. This also allows us to fully eliminate unnamed variables and nets that have a unique continuous assignment. Also add canonicalizers that remove `AssignedVariableOp` if they shadow an input or output port of the same name, or if there are multiple such variables with the same name in a chain. At a later stage we may want to replace `AssignedVariableOp` entirely with `dbg.variable`.
- Loading branch information
1 parent
562036c
commit 450c968
Showing
3 changed files
with
309 additions
and
45 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
Oops, something went wrong.