llvm-project
b3b5e330 - [flang] Lower loops whose branching is confined to their body structurally (#225758)

Commit
8 days ago
[flang] Lower loops whose branching is confined to their body structurally (#225758) Such a loop was classified separately by a previous change but still lowered as a raw CFG, so its structured form was lost. Lower it structurally instead, with its body folded into a region that can hold the branching. The loop keeps its bounds on the op, so it remains available to whatever transforms or parallelizes it. Only the body is folded: the loop control statements are emitted as they are for any structured loop, since a branch from outside may target either of them. Loops an OpenACC or OpenMP directive owns are lowered the same way, so they keep their form too.
Author
Parents
Loading