[PATCH] D152399: [CodeGen] Fine tune MachineFunctionSplitPass (MFS) for FSAFDO.
Han Shen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 13 14:29:52 PDT 2023
shenhan added a comment.
In D152399#4464394 <https://reviews.llvm.org/D152399#4464394>, @snehasish wrote:
> lgtm, thanks for your patience with all the suggestions!
In D152399#4498827 <https://reviews.llvm.org/D152399#4498827>, @xur wrote:
> It seems that we now need to specify "-mllvm -mfs-psi-cutoff=0" to enable the MFS for FSAFDO, if we want to get the same optimization behavior. This is not good for usage adoption.
> I think if the users want to enable MFS in FSAFDO, they should only need to add -fsplit-machine-functions. They should not need to use ANY extra internal options.
>
> I know the newer change was to unify the heuristic code in isColdBlock. But I don't like the change here.
Thanks. Yes, currently to use FSAFDO MFS, we need these flags "-fsplit-machine-functions -mllvm -mfs-psi-cutoff=0", which is very unfriendly to normal users and that is not the best practice.
> I would propose to replace HasAccurateProfile parameter in isColdBlock with an enum of profileKind (InstruProfile, Sample Profile, or Sample Profile with FSAFDO etc). And we can have different heuristic for different profile kind.
I'll prepare another CL to do the suggested change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152399/new/
https://reviews.llvm.org/D152399
More information about the llvm-commits
mailing list