[llvm-commits] [PATCH] X86: Turn cmovs into branches when profitable.

Andrew Trick atrick at apple.com
Fri Apr 27 14:31:47 PDT 2012


On Apr 26, 2012, at 10:48 PM, Evan Cheng <evan.cheng at apple.com> wrote:

> That seems like a BranchProbabilityInfo deficiency. Andy, what do you think? Benjamin, can you point us to examples of long select chains? Are they in real world benchmarks?


Rhetorical question: If we have profile data or simple static heuristics that suggest a biased branch, should we really have turned it into a select?
Obvious answer: the front end doesn't want to know about condition probabilities.

...but handling this in any branch profiler won't be clean.

We'll probably have to plop metadata on the select if we really care that much. When we convert back to control flow, it will be easy to move the metadata to the branch's MD_prof and update BranchProbability if needed. It doesn't seem too hard to add support to LowerExpectIntrinsic.

-Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120427/95f24167/attachment.html>


More information about the llvm-commits mailing list