[LLVMdev] precondition suggestion to LLVM
Dmitry N. Mikushin
maemarcus at gmail.com
Mon Oct 22 20:06:06 PDT 2012
Hi Niko,
Do you mean branch prediction, i.e. __builtin_expect [1]? Many
compilers support it, I think clang (LLVM's C/C++ frontend) is among
them.
- D.
[1] http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
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
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list