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

Single declarations for hoisted variables in recursive hoist transformation (fixes #143) #144

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

reuterbal
Copy link
Collaborator

The issue are declarations of multiple temporaries in a single statement, of which not all are hoisted. The hoisted temporaries receive an additional intent attribute, which means these need to be declared separately from non-hoisted variables.

This fixes the issue by using the single_variable_declaration utility to create separate declarations for hoisted temporaries.

Piggy-backed is a small fix to ensure case-insensitive behaviour in a call lookup, which showed up when using the supplied test.

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

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

@reuterbal reuterbal force-pushed the 143-hoist-temporaries-declarations branch from ca2e527 to cd325b7 Compare September 6, 2023 19:40
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #144 (cd325b7) into main (35f8284) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #144   +/-   ##
=======================================
  Coverage   92.10%   92.10%           
=======================================
  Files          89       89           
  Lines       16512    16515    +3     
=======================================
+ Hits        15208    15211    +3     
  Misses       1304     1304           
Flag Coverage Δ
lint_rules 96.13% <ø> (ø)
loki 92.03% <100.00%> (+<0.01%) ⬆️
transformations 91.68% <ø> (ø)

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

Files Changed Coverage Δ
loki/transform/transform_hoist_variables.py 98.92% <100.00%> (+0.03%) ⬆️

Copy link
Collaborator

@mlange05 mlange05 left a comment

Choose a reason for hiding this comment

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

Clean and neat. GTG from me. :shipit:

@reuterbal reuterbal merged commit 75fc36f into main Sep 7, 2023
11 checks passed
@reuterbal reuterbal deleted the 143-hoist-temporaries-declarations branch September 7, 2023 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants