[llvm] [FixIrreducible] Use CycleInfo instead of a custom SCC traversal (PR #101386)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 11:53:36 PDT 2024


================
@@ -107,6 +107,12 @@ template <typename ContextT> class GenericCycle {
     return is_contained(Entries, Block);
   }
 
+  /// \brief Replace all entries with \p Block as single entry.
+  void setSingleEntry(BlockT *Block) {
+    Entries.clear();
+    Entries.push_back(Block);
----------------
kuhar wrote:

Could this be `nullptr`? Should we add an assert to guard against this?

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


More information about the llvm-commits mailing list