Skip to content

Eliminate branches: implement isl analysis and recurse into conditionals

Daniel Bauer requested to merge hyteg/pystencils:bauerd/isl into backend-rework

TODO

  • Implement some tests
  • Shall we make the isl analysis optional? (Previously it was so probably yes.)

In combination with loop cutting/peeling I noticed a difference to the old backend. Previously loop counters got inlined, so the AST contained expressions like

if (n < n) {
  // ...
}

which got elided by ISL.

Now, the loop counter is declared as a variable, i.e.

int i = n;
if (i < n) {
  // ...
}

which can not be removed because we do not analyze declarations/assignments.

I think this is OK because these conditionals do not appear inside the loop. Anyway, I wanted to mention it.

Edited by Daniel Bauer

Merge request reports