[PATCH] D33934: [BPI] Don't assume that strcmp returning >0 is more likely than <0

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 05:42:07 PDT 2017


john.brawn added inline comments.


================
Comment at: include/llvm/Analysis/BranchProbabilityInfo.h:48
+  BranchProbabilityInfo(const Function &F, const LoopInfo &LI,
+                        const TargetLibraryInfo *TLI = nullptr) {
+    calculate(F, LI, TLI);
----------------
chandlerc wrote:
> Is all of the support for null TLI necessary? It seems like we should always be able to provide it..
BranchProbabilityInfo is created directly (without using the pass manager) in ModuleSummaryAnalysis, OptimizationDiagnosticInfo, PartialInlining, and PGOInstrumentation, and would require some extra plumbing to have a TargetLibraryInfo available at the point it is created. Or alternatively I could create TargetLibraryInfo directly, except that's messy as there's no simple way to do that.


Repository:
  rL LLVM

https://reviews.llvm.org/D33934





More information about the llvm-commits mailing list