[llvm] [BFI] Detect irreducible SCC from CycleInfo instead of by failing. NFC (PR #214941)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 9 11:13:06 PDT 2026


================
@@ -222,12 +223,13 @@ class LLVM_ABI BlockFrequencyInfoImplBase {
     using NodeList = SmallVector<BlockNode, 4>;
     using HeaderMassList = SmallVector<BlockMass, 1>;
 
-    LoopData *Parent;            ///< The parent loop.
-    bool IsPackaged = false;     ///< Whether this has been packaged.
-    uint32_t NumHeaders = 1;     ///< Number of headers.
-    ExitMap Exits;               ///< Successor edges (and weights).
-    NodeList Nodes;              ///< Header and the members of the loop.
-    HeaderMassList BackedgeMass; ///< Mass returned to each loop header.
+    LoopData *Parent;                 ///< The parent loop.
+    bool IsPackaged = false;          ///< Whether this has been packaged.
+    bool ContainsIrreducible = false; ///< Contains irreducible sub-SCCs.
----------------
MaskRay wrote:

`bool ContainsIrreducible` is about the loop's own nodes. Packaged sub-loops are not counted. The flag does not propagate to ancestor loops (if I understand your question correctly).

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


More information about the llvm-commits mailing list