[PATCH] D40891: Revert a change in propagateMassToSuccessors that summed redundant edges n^2 times

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 18:38:48 PST 2017


dexonsmith accepted this revision.
dexonsmith added a comment.
This revision is now accepted and ready to land.

LGTM, after you try to shrink the testcase.  Thanks for tracking this down!



================
Comment at: include/llvm/Analysis/BlockFrequencyInfoImpl.h:1318-1320
+    for (auto SuccI = GraphTraits<const BlockT *>::child_begin(BB),
+              SuccE = GraphTraits<const BlockT *>::child_end(BB);
+         SuccI != SuccE; ++SuccI)
----------------
The old code had `SI` and `SE`, which are the typical initialisms.  But if you prefer spelling out `SuccI` that's fine with me.


================
Comment at: test/Analysis/BlockFrequencyInfo/redundant_edges.ll:15-24
+  switch i32 %i, label %blockEnd [
+    i32 0, label %return
+    i32 1, label %return
+    i32 2, label %return
+    i32 3, label %return
+    i32 4, label %return
+    i32 5, label %return
----------------
Do you really need a 8-way switch to see a difference here, or would a 4-way suffice?  a 3-way?


Repository:
  rL LLVM

https://reviews.llvm.org/D40891





More information about the llvm-commits mailing list