================ @@ -1048,7 +1048,8 @@ defvar CIR_ReturnableScopes = [ ]; def CIR_ReturnOp : CIR_Op<"return", [ - ParentOneOf<CIR_ReturnableScopes>, Terminator + ParentOneOf<CIR_ReturnableScopes>, Terminator, + DeclareOpInterfaceMethods<MemoryEffectsOpInterface> ---------------- xlauko wrote:
Without the interface, `cir.return` already has unknown effects, which is what keeps a scope containing it alive. What makes erasing that scope wrong is the non-local exit, not a memory access, so it belongs to the region being exited rather than to the terminator. https://github.com/llvm/llvm-project/pull/242180 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
