aeubanks wrote: very nice and clean, thanks! would be good to add a test (e.g. add a MachineFunction pass that intentionally breaks some MachineFunctionProperties invariant) https://github.com/llvm/llvm-project/pull/83668