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

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Sun Sep 6 22:35:46 PDT 2026


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

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

>From 60505c9e25921c63166d69161862ef0ce000488d Mon Sep 17 00:00:00 2001
From: ergawy <kareem.ergawy at gmail.com>
Date: Fri, 4 Sep 2026 09:38:45 -0700
Subject: [PATCH] [flang] Enable wrap-unstructured-constructs-in-execute-region
 by default

More extensive testing since the flag was introduced, with the
regressions it uncovered now fixed.
---
 flang/lib/Lower/PFTBuilder.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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"));
 



More information about the flang-commits mailing list