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

[DRAFT] Remove psyir if branch #2869

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hbrunie
Copy link
Collaborator

@hbrunie hbrunie commented Jan 23, 2025

This PR adds a new PsyIR transformation.

What this transformation should do exactly should be discussed between @schreiberx @arporter and other interested.

Currently there is no test, it is only reusing the code present in Martin's PR #2801.

@hbrunie hbrunie requested a review from arporter January 23, 2025 09:36
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 24.56140% with 43 lines in your changes missing coverage. Please review.

Project coverage is 99.80%. Comparing base (f534847) to head (d0aa7ca).

Files with missing lines Patch % Lines
...lone/psyir/transformations/remove_ifblock_trans.py 24.56% 43 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2869      +/-   ##
==========================================
- Coverage   99.88%   99.80%   -0.09%     
==========================================
  Files         359      360       +1     
  Lines       50860    50917      +57     
==========================================
+ Hits        50804    50818      +14     
- Misses         56       99      +43     

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

@hbrunie hbrunie changed the title Remove psyir if branch [DRAFT] Remove psyir if branch Jan 23, 2025
@hbrunie hbrunie marked this pull request as draft January 23, 2025 10:15
@hbrunie hbrunie self-assigned this Jan 23, 2025
super().__init__()
self._known_reference_bool: Dict[str, bool] = {}
self._known_reference_int: Dict[str, bool] = {}
if json_file_abspath is not None:
Copy link
Member

Choose a reason for hiding this comment

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

This part would need to either be removed entirely (and the transformation purely on PSyIR information for determining compile-time constants) or replaced with functionality that enables a list of names/symbols to be provided to the apply method (to support run-time constants).

@arporter
Copy link
Member

Thanks for this Hugo. Obviously this will need full testing etc. Also, the reading of the json file needs to be replaced with one or more parameters to apply. One of us could take this on if need be?

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