Assignment Propagation#271
Merged
Merged
Conversation
f22a2b1 to
10035d0
Compare
ekiwi
reviewed
Jul 8, 2026
Collaborator
|
@Nikil-Shyamsunder : I just rebased this on |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the graph IR assignment representation away from nested ITEs and adds a reaching-definitions pass that gives us info so we can propagates assignment forward so every reachable node has a total assignment for every DUT input port.
The main interesting things:
Assignment Representation: (see #268 for details)
Op::Assignnow stores anAssignmentsummary:Assignment { dont_care: ExprRef, concretes: Vec<(ExprRef, ExprRef)> }edge_contract.rsimplements ordered and unordered assignment merging over this representation.DontCarefrom theother side.
The graph interpreter and graphviz output were updated to understand the new assignment summaries.
dont_carefirst, then concrete branches.X if g; value if h.DontCareor concrete branch.Reaching Definitions analysis:
reaching_defs.rsadds reaching-definitions analysis over the graph.out_defsper nodeAssignment propagation:
propagate_assigns.rsuses the reaching definitions to rewrite reachable nodes so that every DUT input port has a total assignment at every node.out_defassignment for every input port.incoming conflicts.
Default DontCare on Entry, Assign DontCare on exit:
lowering.rsnow emits explicit defaultDontCareassignments on the entry node.DontCare, i.e. transactions relinquish their ports on exit.Tests
This PR updates the unit tests around assignment merging and lowering:
Assignment, not on theAction.DontCarenode and exit relinquish assignments.