[PATCH] D10979: Update the branch weight metadata in JumpThreading pass.

David davidxl at google.com
Fri Jul 17 11:23:53 PDT 2015


davidxl added inline comments.

================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1543
@@ +1542,3 @@
+  BlockFrequency PredBBFreq(0);
+  if (HasProfileData)
+    for (auto Pred : Preds)
----------------
Can be skipped when Preds' s size == 1

================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1551
@@ +1550,3 @@
+  // frequencies of Preds.
+  if (HasProfileData)
+    BFI->setBlockFreq(PredBB, PredBBFreq.getFrequency());
----------------
Can be skipped if Preds's size is 1


http://reviews.llvm.org/D10979







More information about the llvm-commits mailing list