[PATCH] D152577: Part 2 of Fine tune MachineFunctionSplitPass (MFS) for FSAFDO.
Han Shen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 15:02:42 PDT 2023
shenhan added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1255
+ addPass(createMIRAddFSDiscriminatorsPass(
+ sampleprof::FSDiscriminatorPass::Pass3));
+
----------------
xur wrote:
> It seems that you use Pass3 to replace PassLast. Should we use PassLast here? This way we can still save Pass3 for others.
> I don't think we will have other discriminator pass after this.
Agree. Replaced Pass3 with PassLast.
================
Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1279
+ }
+ addPass(createMachineFunctionSplitterPass(HasAccureateSampleProfile));
}
----------------
xur wrote:
> The intention here is to use FSAFDO with improved discriminator for MFS.
> I would suggest a warning (or even a hard error) here if we detect otherwise AFDO mode is used.
> This would helpful to user mistakes (especially that we know MFS + AFDO can degrade the performance).
Yes. Added a check for sample_profile+fs_discriminator must both present.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152577/new/
https://reviews.llvm.org/D152577
More information about the llvm-commits
mailing list