[LLVMdev] jump to function

Richard Osborne richard at xmos.com
Wed May 20 14:44:11 PDT 2009


dan mihai wrote:
> Hello,
>
> Is it possible to jump from one function to the beginning of another 
> function?
>
> For instance, assume wrapper_FOO is a wrapper for FOO. I replace the code
> ..............................
> bar() {
>  FOO(...)
> }
> ..............................
> with
> ..............................
> bar() {
>   wrapper_FOO(...)
> }
> ..............................
>
> Now, for efficiency, I'd like to have
> wrapper_FOO() {
>   <do some work>
>   jump FOO;
> }
Tail call optimization can optimize calls into jumps. See 
http://llvm.org/docs/CodeGenerator.html#tailcallopt for details.

-- 
Richard Osborne | XMOS
http://www.xmos.com




More information about the llvm-dev mailing list