[LLVMdev] Helping the optimizer along (__assume)

Daniel Berlin dberlin at dberlin.org
Thu Oct 23 12:16:35 PDT 2008


Doesn't llvm-gcc support GCC's builtin_expect?
Or does it transform it into nothing?


On Wed, Oct 22, 2008 at 6:28 PM, Paul Biggar <paul.biggar at gmail.com> wrote:
> Hi,
>
> I'm interested in whether or not there is a way of providing
> source-level annotations to help LLVM with optimizations, similar to
> VisualC++'s __assume facility
> (http://msdn.microsoft.com/en-us/library/1b3fsfxw.aspx).
>
> As part of our PHP compiler (phpcompiler.org), it would be great to be
> able to annotate our generated C code with, for example, (var !=
> NULL), or (var->type == STRING), and have that information passed
> around (esp interprocedurally at link-time) by the LLVM optimizers. It
> would also greatly simplify our code generation.
>
> I can provide a detailed example if what I'm asking is unclear...
>
>
> Thanks in advance,
> Paul
> phpcompiler.org
>
> --
> Paul Biggar
> paul.biggar at gmail.com
> _______________________________________________
> 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