This reverts commit bc3b3721. The planned change that would have needed non-const MachineFunction refs isn't needed after all.