Skip to content
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

[Comb][FIRRTL][Seq] Fix fusing locations to append not add as metadata. #5349

Merged
merged 2 commits into from
Jun 9, 2023

Conversation

dtzSiFive
Copy link
Contributor

@dtzSiFive dtzSiFive commented Jun 9, 2023

Previously we created a chain of FusedLocations that had metadata point to previous, instead append to it.

Leverage (and fix interaction with) FusedLoc::get behavior that decomposes/flattens (and unique's) locs in child FusedLoc's if metadata matches (or doesn't exist, as here).

Add basic test.

@dtzSiFive
Copy link
Contributor Author

In Dedup we have logic based on FusedLoc::get() that we used to limit maximum number of ".fir" locations in a fused list.

For now keep locations but may want to do similar here (make it utility function or pass?) if this creates monster locations.

@dtzSiFive dtzSiFive requested a review from uenoku June 9, 2023 17:02
Copy link
Member

@uenoku uenoku left a comment

Choose a reason for hiding this comment

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

Oh, thank you for finding this! LGTM. Maybe this also has the same bug?

rewriter.getFusedLoc(trueMux.getLoc(), falseMux.getLoc()), op.getCond(),

@dtzSiFive
Copy link
Contributor Author

Oh, thank you for finding this! LGTM. Maybe this also has the same bug?

rewriter.getFusedLoc(trueMux.getLoc(), falseMux.getLoc()), op.getCond(),

Oh, totally! I grep'd around but missed, thanks! Will pull that in too.

@dtzSiFive dtzSiFive changed the title [FIRRTL][Seq] Fix fusing locations to append not add as metadata. [Comb][FIRRTL][Seq] Fix fusing locations to append not add as metadata. Jun 9, 2023
@dtzSiFive dtzSiFive added FIRRTL Involving the `firrtl` dialect Comb Involving the `comb` dialect Seq Involving the `seq` dialect labels Jun 9, 2023
@dtzSiFive dtzSiFive merged commit ddefe28 into llvm:main Jun 9, 2023
5 checks passed
@dtzSiFive dtzSiFive deleted the fix/fused-loc-array-not-as-metadata branch June 9, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comb Involving the `comb` dialect FIRRTL Involving the `firrtl` dialect Seq Involving the `seq` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants