In D152577 @xur has a post-submit comment regarding to an awkward usage of MFS for Autofdo - instead of just using -fsplit-machine-function, the user needs to add "-mllvm -mfs-psi-cutoff=0" to choose the right logic for AutoFDO. The compiler should choose the right default values for such case.
This CL separate MFS logic for different profile types.
Can we just use query PSI directly? PSI has the following API, which should be sufficient and we should be able to avoid passing ProfileKind around.