Move resetTargetOptions from taking a MachineFunction to a Function