Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Suport ir.SubAccess in Utils.splitRef #2021

Merged
merged 3 commits into from
Feb 1, 2021
Merged

Suport ir.SubAccess in Utils.splitRef #2021

merged 3 commits into from
Feb 1, 2021

Conversation

seldridge
Copy link
Member

@seldridge seldridge commented Dec 12, 2020

Add support for firrtl.ir.SubAccess to the firrtl.Utils.splitRef utility method. This avoids a match error on this type. Update the utility method to use IR types as opposed to the WIR type aliases (which are now the same thing). Change the types matched on to be the IR types.

Note: this method should be restricted to only work on firrtl.ir.RefLikeExpression to avoid match errors as it now fully matches on this more specific type.

This can be backported all the way, but will require manual backport fixes. I'll take care of fixing those up.

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • [n/a] Did you update the FIRRTL spec to include every new feature/behavior?
  • [n/a] Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you state the API impact?
  • Did you specify the code generation impact?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • bug fix (avoid match error)

API Impact

No change.

Backend Code Generation Impact

No change.

Desired Merge Strategy

  • Squash: The PR will be squashed and merged (choose this if you have no preference.

Release Notes

None.

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (1.2.x, 1.3.0, 1.4.0) ?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

@seldridge seldridge added this to the 1.2.X milestone Dec 12, 2020
Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Signed-off-by: Schuyler Eldridge <[email protected]>
Change Utils.splitRef to use the actual IR types instead of their
WIR aliases. Update the Scaladoc note to reflect this.

Signed-off-by: Schuyler Eldridge <[email protected]>
@jackkoenig jackkoenig added the Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI. label Feb 1, 2021
@mergify mergify bot merged commit 81ff0fe into master Feb 1, 2021
mergify bot pushed a commit that referenced this pull request Feb 1, 2021
* Add SubAccess case to Utils.splitRef

Signed-off-by: Schuyler Eldridge <[email protected]>

* Update Utils.splitRef to use IR types

Change Utils.splitRef to use the actual IR types instead of their
WIR aliases. Update the Scaladoc note to reflect this.

Signed-off-by: Schuyler Eldridge <[email protected]>

Co-authored-by: Jack Koenig <[email protected]>
(cherry picked from commit 81ff0fe)

# Conflicts:
#	src/main/scala/firrtl/Utils.scala
mergify bot pushed a commit that referenced this pull request Feb 1, 2021
* Add SubAccess case to Utils.splitRef

Signed-off-by: Schuyler Eldridge <[email protected]>

* Update Utils.splitRef to use IR types

Change Utils.splitRef to use the actual IR types instead of their
WIR aliases. Update the Scaladoc note to reflect this.

Signed-off-by: Schuyler Eldridge <[email protected]>

Co-authored-by: Jack Koenig <[email protected]>
(cherry picked from commit 81ff0fe)

# Conflicts:
#	src/main/scala/firrtl/Utils.scala
mergify bot pushed a commit that referenced this pull request Feb 1, 2021
* Add SubAccess case to Utils.splitRef

Signed-off-by: Schuyler Eldridge <[email protected]>

* Update Utils.splitRef to use IR types

Change Utils.splitRef to use the actual IR types instead of their
WIR aliases. Update the Scaladoc note to reflect this.

Signed-off-by: Schuyler Eldridge <[email protected]>

Co-authored-by: Jack Koenig <[email protected]>
(cherry picked from commit 81ff0fe)
@mergify mergify bot added the Backported This PR has been backported to marked stable branch label Feb 1, 2021
mergify bot added a commit that referenced this pull request Feb 1, 2021
* Add SubAccess case to Utils.splitRef

Signed-off-by: Schuyler Eldridge <[email protected]>

* Update Utils.splitRef to use IR types

Change Utils.splitRef to use the actual IR types instead of their
WIR aliases. Update the Scaladoc note to reflect this.

Signed-off-by: Schuyler Eldridge <[email protected]>

Co-authored-by: Jack Koenig <[email protected]>
(cherry picked from commit 81ff0fe)

Co-authored-by: Schuyler Eldridge <[email protected]>
@jackkoenig jackkoenig deleted the subaccess-splitref branch March 26, 2021 23:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Backported This PR has been backported to marked stable branch bugfix Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants