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

interactive: return str(operation) instead of operation #2162

Closed
dshaaban01 opened this issue Feb 14, 2024 · 1 comment
Closed

interactive: return str(operation) instead of operation #2162

dshaaban01 opened this issue Feb 14, 2024 · 1 comment
Assignees
Labels
interactive xdsl-gui things tool

Comments

@dshaaban01
Copy link
Collaborator

dshaaban01 commented Feb 14, 2024

get_all_possible_rewrites() returns the op_idx (among other variables), which is used in compute_available_pass_list() in order to get the op to later print it. We thus run op = list(self.current_module.walk())[op_idx] twice for every operation (we already compute this for every operation in get_all_possible_rewrites() )

I tried two solutions:

  1. returning the str(Operation) from get_all_possible_rewrites():

However, when the rewrite is displayed in the gui, we now get

%0 = arith.addi %1, %2 instead of
Addi(%res = arith.addi %two, %n : i32)

  1. returning the Operation from get_all_possible_rewrites() - (This wont work either way due to issues with testing and equality checking of an Operation, but added it here for completeness):

When the rewrite is displayed in the gui, we now get

Addi(%0 = arith.addi %1, %2)
instead of
Addi(%res = arith.addi %two, %n : i32)

Not sure why we lose the information (i.e. the names of the user defined regs).

@dshaaban01 dshaaban01 added tool interactive xdsl-gui things labels Feb 14, 2024
@dshaaban01 dshaaban01 changed the title interactive: optimize get_all_possible_rewrites() interactive: return str(operation) instead of operation Feb 19, 2024
@superlopuh
Copy link
Member

Fixed in #3601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interactive xdsl-gui things tool
Projects
None yet
Development

No branches or pull requests

2 participants