[llvm] [polly] [IR] Add CallBr intrinsics support (PR #133907)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 08:36:44 PDT 2025


================
@@ -553,6 +553,21 @@ bool RegionInfoBase<Tr>::isRegion(BlockT *entry, BlockT *exit) const {
 
   using DST = typename DomFrontierT::DomSetType;
 
+  // Make sure that a region involving a callbr contains every successor
+  // blocks up to the ones that postdominate the callbr block. Otherwise,
+  // StructurizeCFG will tear the callbr apart.
----------------
Meinersbur wrote:

The definition of a region does not grant any guarantees about how it can be modified. Why not fix StructurizeCFG then (like Polly did: bail out on incompatible regions, but let regions be regions)? If you want to change the definition, do so in https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Analysis/RegionInfo.h#L189

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


More information about the llvm-commits mailing list