> 2013-10-01 Teresa Johnson <tejohn...@google.com> > > * dojump.c (do_jump_1): Divide probability between > both conditions of a TRUTH_ORIF_EXPR. > > + { > + /* Spread the probability evenly between the two conditions. So > + the first condition has half the total probability of being true. > + The second condition has the other half of the total probability, > + so its jump has a probability of half the total, relative to > + the probability we reached it (i.e. the first condition > was false). */ > + int op0_prob = prob / 2; > + int op1_prob = GCOV_COMPUTE_SCALE ((prob / 2), inv (op0_prob));
Documentation of the functions says that PROB may be -1 when it is unknown, In that case you want to arrange op0_prob=op1_prob = -1. What about TRUTH_ANDIF_EXPR code above? I think it needs similar adjusting Patch is preaproved with these changes. Thanks! Honza