[clang] [CIR] Make collectUnreachable more robust (PR #197334)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed May 13 09:48:24 PDT 2026


================
@@ -30,6 +32,13 @@ mlir::Block *replaceCallWithTryCall(cir::CallOp callOp, mlir::Block *unwindDest,
                                     mlir::Location loc,
                                     mlir::RewriterBase &rewriter);
 
+/// Collect ops in blocks that are unreachable from their region's entry,
+/// appending them to \p ops. Used by CIR passes that drive
+/// `applyPartialConversion` and need to feed it operations the conversion
+/// driver's dominance-order traversal would otherwise skip.
+void collectUnreachable(mlir::Operation *parent,
----------------
erichkeane wrote:

Ah, I see... yeah, I think it is worth leaving as is then.  

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


More information about the cfe-commits mailing list