[llvm] [PGO][profcheck] ignore explicitly cold functions (PR #151778)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 3 08:54:20 PDT 2025


================
@@ -119,11 +136,20 @@ PreservedAnalyses ProfileInjectorPass::run(Function &F,
 
 PreservedAnalyses ProfileVerifierPass::run(Function &F,
                                            FunctionAnalysisManager &FAM) {
+  const auto EntryCount = F.getEntryCount(/*AllowSynthetic=*/true);
+  if (!EntryCount) {
+    F.getContext().emitError("Profile verification failed: function entry "
----------------
boomanaiden154 wrote:

You should probably have a test for this case?

https://github.com/llvm/llvm-project/pull/151778


More information about the llvm-commits mailing list