We present the recently added generic Mem2Reg infrastructure in MLIR for unstructured control-flow. Mem2Reg converts memory locations into SSA values. This new set of interfaces and rewrites allows any dialect to benefit from the provided cross-dialect Mem2Reg implementation in upstream MLIR. This new infrastructure is accompanied by an implementation of Scalar Replacement Of Aggregates (SROA) to turn allocations of aggregates into independent allocations of their fields. In this talk, we show how those algorithms are integrated in MLIR, what it takes for a dialect to benefit from Mem2Reg and SROA and the benefits of a generic approach.