[LLVMdev] precondition suggestion to LLVM
Dmitry N. Mikushin
maemarcus at gmail.com
Mon Oct 22 20:06:06 PDT 2012
Do you mean branch prediction, i.e. __builtin_expect ? Many
compilers support it, I think clang (LLVM's C/C++ frontend) is among
2012/10/23 Niko Zarzani <koni10 at hotmail.it>:
> Hi all,
> Is there any way to tell LLVM some additional information about the
> variables in the code in order to make better optimization?
> For example, if my function has a certain precondition (such as x>0) then it
> will be possible to better optimize the code given that information (which
> the compiler does not know).
> I am new in this field and I don't know if there are ways to tell the
> compiler preconditions (such as by using some preprocessing directives).
> Thank you in advance,
> Niko Zarzani
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev