diff options
author | Teresa Johnson <tejohnson@google.com> | 2023-07-11 12:08:08 -0700 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2023-07-11 13:16:20 -0700 |
commit | 546ec641b4b1bbbf9e66a53983b635fe85d365e6 (patch) | |
tree | 8fd8db251d11189371e8805ae74d35ebab5edb7d /llvm/lib/LTO/LTOBackend.cpp | |
parent | 95014050dac528f53ab704d62a16a44ed0df032b (diff) | |
download | llvm-546ec641b4b1bbbf9e66a53983b635fe85d365e6.zip llvm-546ec641b4b1bbbf9e66a53983b635fe85d365e6.tar.gz llvm-546ec641b4b1bbbf9e66a53983b635fe85d365e6.tar.bz2 |
Restore "[MemProf] Use new option/pass for profile feedback and matching"
This restores commit b4a82b62258c5f650a1cccf5b179933e6bae4867, reverted
in 3ab7ef28eebf9019eb3d3c4efd7ebfd160106bb1 because it was thought to
cause a bot failure, which ended up being unrelated to this patch set.
Differential Revision: https://reviews.llvm.org/D154856
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOBackend.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp index 897380c..29e2887 100644 --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -236,20 +236,21 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM, auto FS = vfs::getRealFileSystem(); std::optional<PGOOptions> PGOOpt; if (!Conf.SampleProfile.empty()) - PGOOpt = PGOOptions(Conf.SampleProfile, "", Conf.ProfileRemapping, FS, - PGOOptions::SampleUse, PGOOptions::NoCSAction, true); + PGOOpt = PGOOptions(Conf.SampleProfile, "", Conf.ProfileRemapping, + /*MemoryProfile=*/"", FS, PGOOptions::SampleUse, + PGOOptions::NoCSAction, true); else if (Conf.RunCSIRInstr) { - PGOOpt = PGOOptions("", Conf.CSIRProfile, Conf.ProfileRemapping, FS, - PGOOptions::IRUse, PGOOptions::CSIRInstr, - Conf.AddFSDiscriminator); + PGOOpt = PGOOptions("", Conf.CSIRProfile, Conf.ProfileRemapping, + /*MemoryProfile=*/"", FS, PGOOptions::IRUse, + PGOOptions::CSIRInstr, Conf.AddFSDiscriminator); } else if (!Conf.CSIRProfile.empty()) { - PGOOpt = PGOOptions(Conf.CSIRProfile, "", Conf.ProfileRemapping, FS, - PGOOptions::IRUse, PGOOptions::CSIRUse, - Conf.AddFSDiscriminator); + PGOOpt = PGOOptions(Conf.CSIRProfile, "", Conf.ProfileRemapping, + /*MemoryProfile=*/"", FS, PGOOptions::IRUse, + PGOOptions::CSIRUse, Conf.AddFSDiscriminator); NoPGOWarnMismatch = !Conf.PGOWarnMismatch; } else if (Conf.AddFSDiscriminator) { - PGOOpt = PGOOptions("", "", "", nullptr, PGOOptions::NoAction, - PGOOptions::NoCSAction, true); + PGOOpt = PGOOptions("", "", "", /*MemoryProfile=*/"", nullptr, + PGOOptions::NoAction, PGOOptions::NoCSAction, true); } TM->setPGOOption(PGOOpt); |