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

[FIRRTL][InferResets] Fix reset inference through const cast. #5370

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

dtzSiFive
Copy link
Contributor

Update these as operations that cannot have types inferred from inputs, drop (incomplete) code handling while propagating through SSA use/def graph. In order to support updating in this way, we'd need to walk the source/dest type and update modulo the const structure present on each.

Luckily don't need to, this portion is for flowing through operations not explicitly handled as part of the traced network. ConstCast is handled this way, and so its destination type can be fixed up using updateReset() earlier in the function.

Fix reset inference of const-cast involving aggregates, add test.

Fixes #5333.

@dtzSiFive dtzSiFive requested a review from trilorez June 12, 2023 22:39
@dtzSiFive dtzSiFive added the FIRRTL Involving the `firrtl` dialect label Jun 13, 2023
Copy link
Contributor

@darthscsi darthscsi left a comment

Choose a reason for hiding this comment

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

LGTM

Update these as operations that cannot have types inferred
from inputs, drop (incomplete) code handling while propagating
through SSA use/def graph.  In order to support updating in this way,
we'd need to walk the source/dest type and update modulo the const
structure present on each.

Luckily don't need to, this portion is for flowing through operations
not explicitly handled as part of the traced network.
ConstCast is handled this way, and so its destination type
can be fixed up using `updateReset()` earlier in the function.

Fix reset inference of const-cast involving aggregates, add test.

Fixes llvm#5333.
@dtzSiFive dtzSiFive merged commit 5892ede into llvm:main Jun 21, 2023
@dtzSiFive dtzSiFive deleted the fix/issue-5333 branch June 21, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIRRTL Involving the `firrtl` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIRRTL] infer resets doesn't work with const-cast of aggregates
2 participants