From aa3506c5f0b68624895e9643824a52dafaf8ab80 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Thu, 28 Jul 2016 23:31:12 +0000 Subject: [BPI] Add new LazyBPI analysis Summary: The motivation is the same as in D22141: In order to add the hotness attribute to optimization remarks we need BFI to be available in all passes that emit optimization remarks. BFI depends on BPI so unless we make this lazy as well we would still compute BPI unconditionally. The solution is to use the new LazyBPI pass in LazyBFI and only compute BPI when computation of BFI is requested by the client. I extended the laziness test using a LoopDistribute test to also cover BPI. Reviewers: hfinkel, davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22835 llvm-svn: 277083 --- llvm/lib/Analysis/Analysis.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Analysis/Analysis.cpp') diff --git a/llvm/lib/Analysis/Analysis.cpp b/llvm/lib/Analysis/Analysis.cpp index c04447ca58c..d31adfa90ed 100644 --- a/llvm/lib/Analysis/Analysis.cpp +++ b/llvm/lib/Analysis/Analysis.cpp @@ -54,6 +54,7 @@ void llvm::initializeAnalysis(PassRegistry &Registry) { initializeIVUsersWrapperPassPass(Registry); initializeInstCountPass(Registry); initializeIntervalPartitionPass(Registry); + initializeLazyBranchProbabilityInfoPassPass(Registry); initializeLazyBlockFrequencyInfoPassPass(Registry); initializeLazyValueInfoWrapperPassPass(Registry); initializeLintPass(Registry); -- cgit v1.2.3