[LLVMdev] Is it possible to inline Functions without using LLVM JIT Framework?

geovanisouza92 at gmail.com geovanisouza92 at gmail.com
Thu Sep 1 09:59:16 PDT 2011

Hi Mian!

You have tried do it in semantical phase?

I'm in prototype of my programming language, and in it, will be possible
write something like:

    method Sum(a, b: Integer): Integer; inline;
      Result := a + b;

And some like:

    method UsesSum;
      // do something
      var sum := Sum(1, 2); // Or 'var sum := Sum 1, 2', like Ruby ;)
      // do more things

In this case, in the analysis, the Sum method, will be placed in the caller
(or callers).

I hope this help you. :)

2011/9/1 Mian M. Hamayun <mian-muhammad.hamayun at imag.fr>

> Hi Everyone,
> Hopefully this question is not too absurd.
> Actually I created an example in LLVM, where I generate two modules, one
> containing the function definition and the other module calling this
> function.
> (Question related to this was posted on this mailing list recently)
> Now I want to know, whether it is possible to "inline" the definition of
> this function in the caller module, using some optimization pass etc?
> I have previously experimented with LLVM's JIT Framework, and we can do
> something similar over there. But now I am interested in doing this without
> JIT Framework.
> Any ideas/suggestions/comments on how could we accomplish this?
> Thanks in advance,
> Mian M. Hamayun
> Grenoble, France.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

@geovanisouza92 - Geovani de Souza
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110901/de5c043f/attachment.html>

More information about the llvm-dev mailing list