[llvm] [SelectOptimize] Emit Fatal Error instead of Asserting on null PSI (PR #192871)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 06:52:52 PDT 2026
================
@@ -369,7 +369,9 @@ PreservedAnalyses SelectOptimizeImpl::run(Function &F,
PSI = FAM.getResult<ModuleAnalysisManagerFunctionProxy>(F)
.getCachedResult<ProfileSummaryAnalysis>(*F.getParent());
- assert(PSI && "This pass requires module analysis pass `profile-summary`!");
+ if (!PSI)
+ reportFatalUsageError("This pass requires the profile-summary module "
----------------
arsenm wrote:
error messages should start with lowercase. Also test would be good
https://github.com/llvm/llvm-project/pull/192871
More information about the llvm-commits
mailing list