Skip to content

(towards #1960 and #1799) Improve ArrayAssingment2Loop using call/routinesymbol datatype information#3343

Merged
arporter merged 11 commits intomasterfrom
1960_improve_call_datatype_information
Mar 2, 2026
Merged

(towards #1960 and #1799) Improve ArrayAssingment2Loop using call/routinesymbol datatype information#3343
arporter merged 11 commits intomasterfrom
1960_improve_call_datatype_information

Conversation

@sergisiso
Copy link
Copy Markdown
Collaborator

@sergisiso sergisiso commented Feb 20, 2026

I started this branch to tackle the WHERE with reduction intrinsics, but as in my previous PRs I think this should be solved first in ArrayAssignment2Loop and then integrate it to the WHERE.

The reductions that end up with a scalar can are already be done because we know that that term does not need additional indexing after applying ArrayAssignment2Loop. However the call.datatype was quite limited. It worked for Intrinsics but not generic calls (even when we had a RoutineSymbol with information). And RoutineSymbols defaulted to NoType, even when that was not necessarely the case (I think UnresolvedType is a better default and use the frontend type, e.g. is a CallStmt, to give it the NoType).

I have made the changes needed to fix the above and I feel its already enough for a PR, the WHEREs will come in a follow up.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (df4a4f1) to head (98d8d23).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3343   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         386      386           
  Lines       54187    54215   +28     
=======================================
+ Hits        54165    54193   +28     
  Misses         22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sergisiso
Copy link
Copy Markdown
Collaborator Author

@arporter @LonelyCat124 This is ready for review

Copy link
Copy Markdown
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Looks good Sergi - it's nice to see the improvements to the typing making their way 'upwards'. Just some tidying/clarification and I'm a bit puzzled by a couple of the tests.

Comment thread src/psyclone/psyir/nodes/call.py
Comment thread src/psyclone/psyir/transformations/arrayassignment2loops_trans.py Outdated
Comment thread src/psyclone/psyir/transformations/arrayassignment2loops_trans.py Outdated
Comment thread src/psyclone/psyir/transformations/arrayassignment2loops_trans.py
Comment thread src/psyclone/tests/psyir/frontend/fparser2_call_handler_test.py Outdated
Comment thread src/psyclone/tests/psyir/frontend/fparser2_call_handler_test.py Outdated
Comment thread src/psyclone/tests/psyir/transformations/arrayassignment2loops_trans_test.py Outdated
@sergisiso
Copy link
Copy Markdown
Collaborator Author

@arporter This is ready for another review

Copy link
Copy Markdown
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Thanks Sergi, all looks good now.
I see the ITs were green last time.
The link-check failures seem to be github having a wobble.

@arporter arporter merged commit ab52350 into master Mar 2, 2026
15 checks passed
@arporter arporter deleted the 1960_improve_call_datatype_information branch March 2, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants