All: Single Entry and Multiple Exits disables traditional Loop optimization. The presence of short circuit also makes the CFG as Single Entry and Multiple Exits. The transformation from SEME(Single Entry and Multiple Exits) to SESE( Single Entry and Single Exits enables many Loop Optimizations.
The approach like Node Splitting to make SEME regions to SESE regions is an important optimization on the CFG that Enable the transformation with respect to Loops and Conditionals. The Loops transformation in LLVM does the node splitting to convert from SEME regions to SESE regions. The presence of break and GOTO statements inside the loops makes the CFG unstructured transforming it SEME. To convert such control Flow from unstructured to Structured control flow enables many Loop transformation. I would like to implement a transformation phase on the loops before any Loop optimizations pass is enabled to transform Unstructured CFG to structured CFG like LLVM. Does the GCC already has such transformation passes on Loops? Please share your thoughts. Thanks & Regards Ajit