Skip to content

Commit d7b7b64

Browse files
committed
[CSSPGO] Warn instead of error out for modules that are not probed.
Modules that are not compiled with pseudo probe enabled can still be compiled with a sample profile input, such as in LTO postlink where other modules are probed. Since the profile is unrelated to the current modules, we should warn instead of error out the compilation. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D115642
1 parent 1add613 commit d7b7b64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/IPO/SampleProfile.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,8 @@ bool SampleProfileLoader::doInitialization(Module &M,
20152015
if (!ProbeManager->moduleIsProbed(M)) {
20162016
const char *Msg =
20172017
"Pseudo-probe-based profile requires SampleProfileProbePass";
2018-
Ctx.diagnose(DiagnosticInfoSampleProfile(Filename, Msg));
2018+
Ctx.diagnose(DiagnosticInfoSampleProfile(M.getModuleIdentifier(), Msg,
2019+
DS_Warning));
20192020
return false;
20202021
}
20212022
}

0 commit comments

Comments
 (0)