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
Make IR comparable and legalize it. #4162
Make IR comparable and legalize it. #4162
Conversation
Adds: * Loose comparison for IR nodes and FunctionIR. * IR legalization call just prior to lowering. * Some simple differential diagnostics on the legalized IR.
Note for reviewers. I made some decisions about equality, they aren't set in stone, this is simply a start. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I identified some minor static issues so far. I'll be looking into the behavior next.
|
||
def __eq__(self, other): | ||
if type(self) == type(other): | ||
for name in self.__slots__: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this will not support inheritance. An instance's __slots__
can only see the version defined in its type but not it's parent's.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. Forgot to re-review this PR. This is ready to merge now.
Adds: