[LLVMdev] Helping the optimizer along (__assume)

Paul Biggar paul.biggar at gmail.com
Wed Oct 22 15:28:46 PDT 2008


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



More information about the llvm-dev mailing list