Skip to content

Fix canonicalization of >2 loops with the same counter

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