[PATCH] D13745: Replace all uses of branch weights by branch probabilities on machine code level passes.
Bruno Cardoso Lopes via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 20:06:12 PDT 2015
bruno added a subscriber: bruno.
bruno added a comment.
Hi Cong Hou, very nice! A few comments below.
================
Comment at: include/llvm/CodeGen/MachineBasicBlock.h:435
@@ -427,2 +434,3 @@
/// Set successor weight of a given iterator.
+ void setSuccProbability(succ_iterator I, BranchProbability Prob);
----------------
weight => probability
================
Comment at: lib/CodeGen/MachineBasicBlock.cpp:511
@@ -509,2 +510,3 @@
// If we see non-zero value for the first time it means we actually use Weight
+ // list, so we fill all Probs with 0's.
----------------
Update comment about Weight list.
================
Comment at: lib/CodeGen/MachineBasicBlock.cpp:539
@@ -526,2 +538,3 @@
// If Weight list is empty it means we don't use it (disabled optimization).
+ if (!Probs.empty()) {
----------------
Ditto
================
Comment at: lib/CodeGen/MachineBasicBlock.cpp:552
@@ -539,2 +551,3 @@
// If Weight list is empty it means we don't use it (disabled optimization).
+ if (!Probs.empty()) {
----------------
Ditto
http://reviews.llvm.org/D13745
More information about the llvm-commits
mailing list