[LLVMdev] Helping the optimizer along (__assume)
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:
> 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
> 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 Biggar
> paul.biggar at gmail.com
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev