This PR adapts code generation to make use of hierarchical control flow regions, and by extension LoopRegions. This forms the fourth core element of the plan to make loops first class citizens of SDFGs and marks the last element in the architecture.
By extending codegen with the capability of handling hierarchical control flow graphs and SDFGs, a myriad of complexities that come with control flow detection are circumvented, which currently lead to significant issues for certain SDFGs (e.g., #635 and #1586). Making use of control flow regions such as LoopRegions instead allows codegen to be much less 'smart' and behave more akin to a lookup table that decides what code to generate for what SDFG element, making it significantly less error prone.
This PR adapts code generation to make use of hierarchical control flow regions, and by extension
LoopRegion
s. This forms the fourth core element of the plan to make loops first class citizens of SDFGs and marks the last element in the architecture.By extending codegen with the capability of handling hierarchical control flow graphs and SDFGs, a myriad of complexities that come with control flow detection are circumvented, which currently lead to significant issues for certain SDFGs (e.g., #635 and #1586). Making use of control flow regions such as
LoopRegion
s instead allows codegen to be much less 'smart' and behave more akin to a lookup table that decides what code to generate for what SDFG element, making it significantly less error prone.