[llvm-dev] With -flto, is manual inline unnecessary?

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 18 22:51:46 PST 2019

The inline keyword is a hint. The inliner calculates the cost of inlining a
function using various heuristics. If the cost is too high it won't be
inlined. The inline keyword increases the threshold that is considered too


On Fri, Jan 18, 2019 at 10:42 PM Peng Yu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi,
> With LTO, it seems that compilers should have the information to
> decide whether to inline a function or not. In this case, is it
> unnecessary to specify functions as inline in C/C++ code?
> --
> Regards,
> Peng
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190118/25a72080/attachment.html>

More information about the llvm-dev mailing list