Skip to content
Snippets Groups Projects

Fix canonicalization of >2 loops with the same counter

Merged Daniel Bauer requested to merge hyteg/pystencils:bauerd/fix-canon-loops into v2.0-dev

Previously, when there were more than two loops with the same counter, e.g.

for (int i = 0; false; );
for (int i = 0; false; );
for (int i = 0; false; );

the canonicalization would only duplicate the counter once, resulting in


for (int i__0 = 0; false; );
for (int i__0 = 0; false; );
for (int i = 0; false; );

This MR fixes the issue, so that all symbols are unique:


for (int i__1 = 0; false; );
for (int i__0 = 0; false; );
for (int i = 0; false; );

Merge request reports

Pipeline #71895 passed

Pipeline passed for 5f257fe7 on hyteg:bauerd/fix-canon-loops

Test coverage 84.50% (0.00%) from 1 job
Checking approval status

Merged by Frederik HennigFrederik Hennig 2 months ago (Jan 14, 2025 11:05am UTC)

Loading

Pipeline #71913 passed

Pipeline passed for 131fa9ca on v2.0-dev

Test coverage 84.54% (0.00%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply