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

interpreter: (pdl) fix multiple inserted operations in rewrite pattern interpreter #3569

Open
jianyicheng opened this issue Dec 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working interpreter xDSL Interpreter

Comments

@jianyicheng
Copy link
Collaborator

jianyicheng commented Dec 4, 2024

(a + b) + c -> a + (b + c)

@superlopuh superlopuh changed the title Minor fix on the base PDL interpreter transformations: fix rewriting in the base PDL interpreter where multiple operations are added in the rewrite body Dec 4, 2024
@superlopuh superlopuh added bug Something isn't working transformations Changes or adds a transformatio labels Dec 4, 2024
@superlopuh superlopuh changed the title transformations: fix rewriting in the base PDL interpreter where multiple operations are added in the rewrite body interpreter: (pdl) fix multiple operations in rewrite pattern interpreter Dec 4, 2024
@superlopuh
Copy link
Member

I would recommend doing a different approach to the one here: https://github.com/xdslproject/xdsl/pull/3402/files#diff-571b0c5cfc943738c6c960434941019e3e0fdc733da7c96dc242bd727e182ff6R402-R415

Instead, accumulating operations created in the pass to a work list, and adding them in the end, instead of getting them from a use-def chain at the end.

@superlopuh superlopuh added interpreter xDSL Interpreter and removed transformations Changes or adds a transformatio labels Dec 4, 2024
@superlopuh superlopuh changed the title interpreter: (pdl) fix multiple operations in rewrite pattern interpreter interpreter: (pdl) fix multiple inserted operations in rewrite pattern interpreter Dec 9, 2024
@superlopuh
Copy link
Member

@cowardsa to provide example

@cowardsa cowardsa self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working interpreter xDSL Interpreter
Projects
Development

No branches or pull requests

3 participants