[PATCH] D12341: add llvm.unpredictable intrinsic and lower it to metadata

Kevin B. Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 15:13:48 PDT 2015


kbsmith1 added a comment.

No, I am not suggesting you have more history.  I am suggesting that you only have a single number that represents the percentage of time that the direction is mispredicted.  It would make a lot of sense for it to be a simple 0-100 value, and would represent the percentage of mispredictions. Anything else takes more space, and is much too closely tied to the branch predictor.

ABAB can be perfectly predicted often, AABB can be perfectly predicted often. The number of transitions from true to false or vice-versa has a poor
correlation to branch predictability, just as the branch probability has a poor correlation to branch predictability.


http://reviews.llvm.org/D12341





More information about the llvm-commits mailing list