-
Notifications
You must be signed in to change notification settings - Fork 29
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
Replace ref by literal #2828
base: master
Are you sure you want to change the base?
Replace ref by literal #2828
Conversation
Thanks Hugo. I'm pretty sure we allow any PSyIR expression as an initial value? |
* Thanks Andrew, indeed, BinaryOp can be an valid initial_value
Thanks. I made a test showing the current limit of this MR with respect to non-literal initial value (for example a binary operation). But I don't understand why |
I think that's because we don't support the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2828 +/- ##
=======================================
Coverage 99.88% 99.88%
=======================================
Files 357 358 +1
Lines 49742 49806 +64
=======================================
+ Hits 49686 49750 +64
Misses 56 56 ☔ View full report in Codecov by Sentry. |
That's ok. I don't deal with "complex" right hand side for now. If this is not a Literal, the parameter is just ignored. |
Replacing PsyIR Reference by PsyIR Literal when it is easy to do so.
Same file, same subroutine, or subroutine contained in module.
Build a param_table with symbol name and Literal, then go through psyir references and symbol_table array type shapes to look for ref with name contained in param_table.
Issues: