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: fixed 1st and 3rd point of the to-do list; issue #1162 #1322

Closed
wants to merge 1 commit into from

Conversation

andreaVMC
Copy link

fixed 1st and 3rd point of the to-do list
This pull request includes significant changes to the heir_py/mlir_emitter.py file to enhance type inference for assignments and return statements. The most important changes include replacing hardcoded types with inferred types and adding a new method to handle type inference.

Enhancements to type inference:

  • heir_py/mlir_emitter.py: Modified the emit_assign method to replace the hardcoded type i64 with a call to self.infer_type(assign.value).
  • heir_py/mlir_emitter.py: Modified the emit_return method to replace the hardcoded type i64 with a call to self.infer_type(ret.value).

Addition of type inference method:

@j2kun
Copy link
Collaborator

j2kun commented Feb 11, 2025

So I hate to be a naysayer, but this type inference task is a lot more complicated than what is attempted in this PR, and we already have an in-progress PR to implement this feature: #1253.

In the future if you're interested in contributing it would be worthwhile to start a conversation on the GitHub issue or in our discord to discuss the approach before getting into coding.

@j2kun j2kun closed this Feb 11, 2025
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