Changing the MPIGen pass to a FunctionPass