Skip to content

Commit 3311112

Browse files
authored
Support BranchProbabilityInfo in update_analyze_test_checks.py (#72943)
- Change `BranchProbabilityPrinterPass` output to match expectations of `update_analyze_test_checks.py`. - Add `Branch Probability Analysis` to list of supported analyses. - Process `llvm/test/Analysis/BranchProbabilityInfo/basic.ll` with `update_analyze_test_checks.py` as proof of concept. Leaving the other tests unchanged to reduce the amount of churn.
1 parent d213220 commit 3311112

File tree

7 files changed

+271
-178
lines changed

7 files changed

+271
-178
lines changed

llvm/lib/Analysis/BranchProbabilityInfo.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,9 +1322,8 @@ BranchProbabilityAnalysis::run(Function &F, FunctionAnalysisManager &AM) {
13221322

13231323
PreservedAnalyses
13241324
BranchProbabilityPrinterPass::run(Function &F, FunctionAnalysisManager &AM) {
1325-
OS << "Printing analysis results of BPI for function "
1326-
<< "'" << F.getName() << "':"
1327-
<< "\n";
1325+
OS << "Printing analysis 'Branch Probability Analysis' for function '"
1326+
<< F.getName() << "':\n";
13281327
AM.getResult<BranchProbabilityAnalysis>(F).print(OS);
13291328
return PreservedAnalyses::all();
13301329
}

0 commit comments

Comments
 (0)