[LLVMdev] Intrinsic support

Kenneth Uildriks kennethuil at gmail.com
Wed Oct 13 04:36:13 PDT 2010


On Wed, Oct 13, 2010 at 2:41 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Nick,
>
>> I have no idea how to make use of llvm.invariant to help
>> devirtualization. If no use or other use case for them can be found,
>> maybe they should be removed.
>
> the dragonegg plugin uses llvm.invariant to help the code generators
> optimize the code it produces for builtin_init_trampoline.  It writes
> some values into memory which is then constant forever after.  Because
> pointers to this memory are passed into all kinds of functions, the
> optimizers don't understand that the values are constant without help,
> thus the use of llvm.invariant.  It doesn't work very well, but it is
> still better than not doing it at all.

I suppose the LLVM trampoline intrinsics aren't well supported?  Or do
they just not fit your use case?




More information about the llvm-dev mailing list