[PATCH] D30633: [BPI] Reduce the probability of unreachable edge to minimal value greater than 0

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 07:45:57 PDT 2017


chandlerc added reviewers: davidxl, dexonsmith.
chandlerc added a comment.

This at least seems like a very reasonable patch to me. I'd like to double check with David and Duncan as well (I've added them as reviewers). My only lingering concern would be if this will run the risk of underflow coming up more often, but that is probably not too much of an issue now that BFI does a better job of things.

Regarding using 'zero' as a viable probability: I'm mostly worried what other assumptions have crept into the codebase as a consequence of these being non-zero. But this is definitely something we can overcome if zero is a substantially better way to model this. The things I think would be needed:

1. Some thorough testing of using zero in this way, both with and without an additional profile.
2. Start a brief llvm-dev thread just to make sure others who may not be watching the reviews are paying attention.
3. In #2, somewhat clearly spell out the reason why the approach in this patch is significantly improved by using 'zero'.

None of this is insurmountable, but it is somewhat expensive, so I only wanted us to go down this path if necessary.


https://reviews.llvm.org/D30633





More information about the llvm-commits mailing list