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

Cong Hou congh at google.com
Tue Jul 7 13:45:54 PDT 2015


================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1522
@@ +1521,3 @@
+  // Freq(BB->SuccBB).
+  SmallVector<uint32_t, 8> Weights;
+  auto TI = BB->getTerminator();
----------------
dnovillo wrote:
> Shouldn't you be using weights here instead of frequencies? Frequencies can be computed later out of the branch weights.
Weights are only meaningful in terms of the same source BB. Here I need to know how many weights on BB to SuccBB are contributed by the edge PredBB to BB, and I could not compare the weights on those two edges directly as they only make sense for PredBB and BB respectively.


http://reviews.llvm.org/D10979







More information about the llvm-commits mailing list