[llvm-dev] How can I tell llvm, that a branch is preferred ?
Diego Novillo via llvm-dev
llvm-dev at lists.llvm.org
Tue Oct 27 11:03:26 PDT 2015
On Tue, Oct 27, 2015 at 10:55 AM, Nat! via llvm-dev <llvm-dev at lists.llvm.org
> wrote:
> If I read the llvm language correctly, it doesn't have a way to specify
> the preferred branch, correct ? I see nothing in the specs for "branch" or
> "switch". And __buildin_expect does nothing, that I am sure of.
>
>
Well, you could generate a !prof annotation to specify branch weights that
are then used when computing branch probability and block frequencies (
http://llvm.org/docs/BranchWeightMetadata.html)
Diego.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151027/244ee946/attachment.html>
More information about the llvm-dev
mailing list