[llvm] [StructurizeCFG] Order IF Else block using Heuristics (PR #139605)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon May 12 12:03:52 PDT 2025


================
@@ -419,6 +446,58 @@ INITIALIZE_PASS_DEPENDENCY(RegionInfoPass)
 INITIALIZE_PASS_END(StructurizeCFGLegacyPass, "structurizecfg",
                     "Structurize the CFG", false, false)
 
+/// Then and Else block order in SCC is arbitrary. But based on the
+/// order, after structurization there are cases where there might be extra
----------------
arsenm wrote:

Can we just sort blocks in topological order or something? I'm not sure I understand this heuristic 

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


More information about the llvm-commits mailing list