[PATCH] D34769: [X86] X86::CMOV to Branch heuristic based optimization
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 11:53:58 PDT 2017
hfinkel added a comment.
Interestingly, we just recently introduced a pass into the PowerPC backend that does essentially the same thing; lib/Target/PowerPC/PPCExpandISEL.cpp. Could you please take a look at that and see how it compares to this implementation? I'm obviously curious as to whether we could add some target callbacks and unify the underlying logic in a target-independent pass. FWIW, both implementations are around 500 lines.
One thing that's not clear to me: how are you determining whether or not the branch is predictable?
One outstanding TODO item we have from the PPC functionality is to support __builtin_unpredictable (which turns in to metadata at the IR level). Have you looked at that?
https://reviews.llvm.org/D34769
More information about the llvm-commits
mailing list