Skip to content

Conversation

TH3CHARLie
Copy link
Collaborator

follow up of #9158, make IR less verbose

@TH3CHARLie
Copy link
Collaborator Author

the main changes lie in func_ir.py and ops.py and I used re to replace reg names with values during the IR generation.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Wow, I love to see some many negative lines of code. This makes the test cases much more readable.

Left a few minor comments. It's okay to do the register numbering change in a separate PR, since it will cause a lot of test case changes. (And it's fine to skip it if it turns out to be a lot of work.)

x :: int
r1 :: bool
r2, r3, r4 :: native_int
r3 :: native_int
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unfortunately, this leaves gaps in the register numbering. A relatively easy way to fix this would be to give LoadInt values different names with independent numbering, such as i0, i1, etc., instead of r0, r1, and so on. This way we'd just filter out all iX names, and rX would remain without gaps.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Thanks for the updates! Looks good.

@JukkaL JukkaL merged commit c2e20e9 into python:master Jul 22, 2020
@TH3CHARLie TH3CHARLie deleted the use-int-opt-in-ir-output branch July 22, 2020 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants