[llvm] d7fb5b9 - [ctx_prof] PGOCtxProfFlattener must always return `PreservedAnalyses::none()`

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 20:02:26 PDT 2024


Author: Mircea Trofin
Date: 2024-09-06T20:02:18-07:00
New Revision: d7fb5b9df0a8170d082e6f8f254e723283f76bac

URL: https://github.com/llvm/llvm-project/commit/d7fb5b9df0a8170d082e6f8f254e723283f76bac
DIFF: https://github.com/llvm/llvm-project/commit/d7fb5b9df0a8170d082e6f8f254e723283f76bac.diff

LOG: [ctx_prof] PGOCtxProfFlattener must always return `PreservedAnalyses::none()`

This is because it always removes instrumentation. This fixes failures
detectable with extensive checks, e.g. https://lab.llvm.org/buildbot/#/builders/187/builds/987

(Related to PR #107329)

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/PGOCtxProfFlattening.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/PGOCtxProfFlattening.cpp b/llvm/lib/Transforms/Instrumentation/PGOCtxProfFlattening.cpp
index 92c5c91c94a61c..d62ca53af862b1 100644
--- a/llvm/lib/Transforms/Instrumentation/PGOCtxProfFlattening.cpp
+++ b/llvm/lib/Transforms/Instrumentation/PGOCtxProfFlattening.cpp
@@ -315,7 +315,7 @@ PreservedAnalyses PGOCtxProfFlatteningPass::run(Module &M,
   });
   auto &CtxProf = MAM.getResult<CtxProfAnalysis>(M);
   if (!CtxProf)
-    return PreservedAnalyses::all();
+    return PreservedAnalyses::none();
 
   const auto FlattenedProfile = CtxProf.flatten();
 


        


More information about the llvm-commits mailing list