Skip to content

Conversation

@hbrunie
Copy link
Contributor

@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
@codecov
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?

@hbrunie hbrunie mentioned this pull request Mar 17, 2025
@hbrunie hbrunie force-pushed the remove_psyir_if_branch branch from e75f500 to 6e55a14 Compare May 6, 2025 13:47
@hbrunie hbrunie changed the title [DRAFT] Remove psyir if branch Remove psyir if branch May 6, 2025
@hbrunie hbrunie linked an issue May 6, 2025 that may be closed by this pull request
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.

SympyWriter

3 participants