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

Fix invalid rewriter API usages #6960

Merged
merged 3 commits into from
Apr 29, 2024
Merged

Fix invalid rewriter API usages #6960

merged 3 commits into from
Apr 29, 2024

Conversation

7FM
Copy link
Contributor

@7FM 7FM commented Apr 29, 2024

According to llvm/llvm-project@6008cd4:

This is invalid rewriter API usage: ops that were replaced/erased should not be accessed

I probably did not catch all invalid rewriter API usages since I have only checked replaceOpWithNewOp usages.
In general, one can create similar invalid API usages with eraseOp and replaceOp.

@7FM 7FM added bug Something isn't working HW Involving the `hw` dialect HWArith The `hwarith` dialect labels Apr 29, 2024
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.

LGTM, thank you for fixing these bugs!

@7FM 7FM force-pushed the dev/7FM/op_use_after_free branch from 4d99258 to 20519a0 Compare April 29, 2024 13:20
@7FM 7FM merged commit ef68939 into main Apr 29, 2024
4 checks passed
@7FM 7FM deleted the dev/7FM/op_use_after_free branch April 29, 2024 14:36
@mikeurbach
Copy link
Contributor

Thanks @7FM , looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HW Involving the `hw` dialect HWArith The `hwarith` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants