Dynamic Optimization Infrastructure

View: New views
2 Messages — Rating Filter:   Alert me  

Dynamic Optimization Infrastructure

by Yale Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Does anyone know if LLVM will soon have a dynamic optimization infrastructure, namely support to generate trampolines back to the JIT/execution manager that get run when a piece of code's frequency exceeds a threshold? I see that there already is a relinkAndRecompileFunction in the JIT, which will be useful. Rather than roll my own mechanisms and have to worry about jumping back to code that gets replaced, are there already works in progress?

Also, is there a way to generate platform independent trampolines (e.g. generate IR that calls a function pointer to the execution engine I want to go to). LLVM seems to be pretty strict about type casts, so I was afraid I wouldn't be able to generate a function pointer initialized to arbitrary data.

_______________________________________________
LLVM Developers mailing list
LLVMdev@...         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Re: Dynamic Optimization Infrastructure

by Evan Cheng-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 3, 2008, at 3:14 PM, Yale Zhang wrote:

> Does anyone know if LLVM will soon have a dynamic optimization  
> infrastructure, namely support to generate trampolines back to the  
> JIT/execution manager that get run when a piece of code's frequency  
> exceeds a threshold? I see that there already is a  
> relinkAndRecompileFunction in the JIT, which will be useful. Rather  
> than roll my own mechanisms and have to worry about jumping back to  
> code that gets replaced, are there already works in progress?

Not that I am aware of. Although there appears to be considerable  
interests in this. Patches welcome.

>
>
> Also, is there a way to generate platform independent trampolines  
> (e.g. generate IR that calls a function pointer to the execution  
> engine I want to go to). LLVM seems to be pretty strict about type  
> casts, so I was afraid I wouldn't be able to generate a function  
> pointer initialized to arbitrary data.

Not sure if this is what you are looking for:
http://llvm.org/docs/LangRef.html#int_trampoline

Evan

>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev@...         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
LLVMdev@...         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
LightInTheBox - Buy quality products at wholesale price!