[llvm-branch-commits] [mlir] [mlir][bufferization] Remove remaining dialect conversion-based infra parts (PR #114155)

Matthias Springer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Nov 13 16:23:36 PST 2024


================
@@ -86,18 +86,13 @@ getOrCreateFuncAnalysisState(OneShotAnalysisState &state) {
   return state.addExtension<FuncAnalysisState>();
 }
 
-/// Return the unique ReturnOp that terminates `funcOp`.
-/// Return nullptr if there is no such unique ReturnOp.
-static func::ReturnOp getAssumedUniqueReturnOp(func::FuncOp funcOp) {
-  func::ReturnOp returnOp;
-  for (Block &b : funcOp.getBody()) {
-    if (auto candidateOp = dyn_cast<func::ReturnOp>(b.getTerminator())) {
-      if (returnOp)
-        return nullptr;
-      returnOp = candidateOp;
-    }
-  }
-  return returnOp;
+/// Return all top-level func.return ops in the given function.
----------------
matthias-springer wrote:

The diff was broken because a dependent commit got merged. I rebased on the latest state.

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


More information about the llvm-branch-commits mailing list