[LLVMdev] Inlining in LLVM
Chuck Zhao
czhao at eecg.toronto.edu
Sun Oct 24 10:50:06 PDT 2010
Nelson,
As far as I know, there are only 2 inliners available in LLVM (2.7 and
2.8 releases):
InlineSimple: inline callsites according to simple analysis heuristics
InlneAlways: inline callsites whose callee definitions have the
__attribute__((alwayeinline)) attribute on.
For an early inliner, if doesn't exist, it should be relatively straight
forward to write one.
Chuck
On 10/24/2010 1:23 PM, J Nelson Amaral wrote:
> Duncan:
>
> I am only superficially familiar with LLVM structure.
>
> What I am trying to find out is if functions that have a single
> invocation are still found in the code during the compilation.
>
> In Open64 and other compilers, there is an early inlining pass that
> inlines all procedures that have a single invocation site. The
> reasoning is that if there is a single call to a procedure, then there
> is not downside to inlining it.
>
> Does LLVM usually does that? Or would that be left to whatever
> front-end is being used?
>
> --
> Cheers,
>
> Nelson
>
> /
> \ / / Jose Nelson Amaral - amaral at cs.ualberta.ca
> <mailto:amaral at cs.ualberta.ca>
> ) / ( Professor
> / / \ Dept. of Computing Science - University of Alberta
> ( / ) Edmonton, Alberta, Canada, T6G 2E8
> \ O / Phone: (780)492-5411 Fax: (780)492-1071
> \ / http://www.cs.ualberta.ca/~amaral
> <http://www.cs.ualberta.ca/%7Eamaral>
> `----'
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101024/5bdf9b26/attachment.html>
More information about the llvm-dev
mailing list