loop invariant code motion for blockstructured meshes
This implements a simple 'loopinvariant code motion' algorithm for blockstructured meshes, based off !329 (closed).
The idea is to find out the minimal iname set for each sub expression and then substract these iname from the iname set of the current instruction to decide if an expression should be hoisted out.
Todo:
-
handle cse within cse -
handle multidimensional cse -
find terms like a * b * c; a * b * d -> _t = a * b; _t * c; _t * d
- currently these are only found if
(a * b) * c; (a * b) * d
- currently these are only found if
-
handle complicated loop nestings correctly, for example jacobian kernels - currently it tries to do licm, if that results in kernels loopy can't schedule, then it falls back to the previous cse implementation
A full documentation of the implementation can be found in the wiki.
Edited by Marcel Koch