[flang-commits] [flang] [flang] Enable wrap-unstructured-constructs-in-execute-region by default (PR #221637)

via flang-commits flang-commits at lists.llvm.org
Sun Sep 6 22:36:19 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-fir-hlfir

Author: Kareem Ergawy (ergawy)

<details>
<summary>Changes</summary>

More extensive testing since the flag was introduced, with the regressions it uncovered now fixed, see:
* https://github.com/llvm/llvm-project/pull/218674
* https://github.com/llvm/llvm-project/pull/217220
* https://github.com/llvm/llvm-project/pull/217842
* https://github.com/llvm/llvm-project/pull/216280

---
Full diff: https://github.com/llvm/llvm-project/pull/221637.diff


1 Files Affected:

- (modified) flang/lib/Lower/PFTBuilder.cpp (+1-1) 


``````````diff
diff --git a/flang/lib/Lower/PFTBuilder.cpp b/flang/lib/Lower/PFTBuilder.cpp
index fc37a47abb802..fad47e752d958 100644
--- a/flang/lib/Lower/PFTBuilder.cpp
+++ b/flang/lib/Lower/PFTBuilder.cpp
@@ -28,7 +28,7 @@ static llvm::cl::opt<bool> clDisableStructuredFir(
     llvm::cl::init(false), llvm::cl::Hidden);
 
 llvm::cl::opt<bool> wrapUnstructuredConstructsInExecuteRegion(
-    "wrap-unstructured-constructs-in-execute-region", llvm::cl::init(false),
+    "wrap-unstructured-constructs-in-execute-region", llvm::cl::init(true),
     llvm::cl::desc("try to wrap unstructured constructs' CFGs in "
                    "self-contained MLIR regions"));
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/221637


More information about the flang-commits mailing list