Skip to content

unstructured nir: new structurizer: universal and based on dominance

Hi karolherbst,

think you are still working on nir for opencl. I implemented a complete new strucutrizer for nir. It took me some time to get this working. But now it runs really nice. It arranges all blocks based on the dominance tree and the dominance frontier of each block. Then it creates bool variables to route to the right blocks. This variables will later be eliminated by the ssa path, as long as the control flow is not irreducible or intertwined or otherwise special.

This algorithm should be able to handle every possible control flow. So with this approach, there is no need to handle left over goto_ifs anymore.

What do you think about it? Could it be used in mesas opencl implementation?

Edited by Karol Herbst

Merge request reports