Skip to content

Refactor cfold propagation and add eager mode#938

Open
Gustavo2622 wants to merge 1 commit intomainfrom
refactor_cfold
Open

Refactor cfold propagation and add eager mode#938
Gustavo2622 wants to merge 1 commit intomainfrom
refactor_cfold

Conversation

@Gustavo2622
Copy link
Contributor

@Gustavo2622 Gustavo2622 commented Mar 13, 2026

Refactor `cfold` in `ecPhlCodeTx` to track propagated substitutions
and preserved dependencies explicitly, and use that state to decide
when folding can continue across assignments and structured
instructions.

Add an eager `cfold*` variant that keeps folding by promoting
preserved variables into the propagated substitution when possible,
and extend `tests/cfold.ec` with coverage for both the default and
eager behaviors.

@Gustavo2622 Gustavo2622 requested a review from strub March 13, 2026 17:12
@Gustavo2622 Gustavo2622 self-assigned this Mar 13, 2026
Copy link
Member

@strub strub left a comment

Choose a reason for hiding this comment

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

Fix the compilation warnings (CI is failing)

@strub strub force-pushed the refactor_cfold branch 2 times, most recently from 01f9e27 to b2ed6f5 Compare March 24, 2026 10:22
@strub strub changed the title PR: Cfold refactoring Refactor cfold propagation and add eager mode Mar 24, 2026
Refactor `cfold` in `ecPhlCodeTx` to track propagated substitutions
and preserved dependencies explicitly, and use that state to decide
when folding can continue across assignments and structured
instructions.

Add an eager `cfold*` variant that keeps folding by promoting
preserved variables into the propagated substitution when possible,
and extend `tests/cfold.ec` with coverage for both the default and
eager behaviors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants