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

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 19:21:55 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);
----------------
ssahasra wrote:

Good catch! Replaced it with a stronger test to check that `Block` is contained in the current cycle.

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


More information about the llvm-commits mailing list