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

Fixing nested associate scope-parentage tracking after inlining #281

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

mlange05
Copy link
Collaborator

A curious corner case when inlining procedures that would result in nested associates, as the newly created parentage cannot be inferred via the usual pin-hole insertion approach. So, instead we now ensure that we update the parent in AttachScopes and call this after the call-inlining is finalised. A test is provided that illustrates the problem.

@mlange05 mlange05 requested a review from reuterbal April 10, 2024 10:15
Copy link

Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/281/index.html

This is needed to correctly infer parentage among scoped IR nodes
is they have been moved (eg. via inlining associates).
@mlange05 mlange05 force-pushed the naml-fix-inline-nested-assoc branch from 892e01c to da93e18 Compare April 10, 2024 11:09
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.85%. Comparing base (6b58fe7) to head (da93e18).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
+ Coverage   92.83%   92.85%   +0.01%     
==========================================
  Files         102      102              
  Lines       18121    18165      +44     
==========================================
+ Hits        16823    16867      +44     
  Misses       1298     1298              
Flag Coverage Δ
lint_rules 96.39% <ø> (ø)
loki 92.82% <100.00%> (+0.02%) ⬆️
transformations 92.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@mlange05 mlange05 marked this pull request as ready for review April 10, 2024 11:57
Copy link
Collaborator

@reuterbal reuterbal left a comment

Choose a reason for hiding this comment

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

Thanks, looks like a clean-enough approach to fix this and valuable addition to the rescoping functionality in general.

Comment on lines +921 to +923
assert call.name == 'rick_is'
assert call.arguments == ('never%going_to%give_you%up',)
# Q. E. D.
Copy link
Collaborator

Choose a reason for hiding this comment

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

🤣

@reuterbal reuterbal added the ready for merge This PR has been approved and is ready to be merged label Apr 10, 2024
@reuterbal reuterbal merged commit f4a0c33 into main Apr 11, 2024
12 checks passed
@reuterbal reuterbal deleted the naml-fix-inline-nested-assoc branch April 11, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for merge This PR has been approved and is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants