[PATCH] D22414: [BranchProbabilityInfo] Change analysis result storage to simplify basic block removal
David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 10:48:29 PDT 2016
davidxl added a comment.
Same question as Diego -- what is the build time improvement? The original version looks cleaner and easier to maintain
================
Comment at: lib/Analysis/BranchProbabilityInfo.cpp:627
@@ +626,3 @@
+
+ if (*I == Dst && EdgeProbabilityRecorded(BBSuccProbs, SuccIdx)) {
+ FoundProb = true;
----------------
I don't quite like this EdgeProbablilityRecorded gets checked in multiple different places. It is better to isolate in one private helper function getEdgeProbability_(Src,index) that returns unknown when the index is out of range.
https://reviews.llvm.org/D22414
More information about the llvm-commits
mailing list