The patch in http://reviews.llvm.org/D13745 is broken into four parts:
- New interfaces without functional changes.
- Use new interfaces in SelectionDAG, while in other passes treat probabilities as weights.
- Use new interfaces in all other passes.
- Remove old interfaces.
This the second patch above. In this patch SelectionDAG starts to use probability-based interfaces in MBB to add successors but other MC passes are still using weight-based interfaces. Therefore, we need to maintain correct weight list in MBB even when probability-based interfaces are used. This is done by updating weight list in probability-based interfaces by treating the numerator of probabilities as weights. This change affects many test cases that check successor weight values. I will update those test cases once this patch looks good to you.
Saturation due to rounding errors is fine, but it seems we may need a way to differentiate the cases where true user errors we made.