[cfe-dev] inline functions

VanDung To vandungto at gmail.com
Mon Feb 2 14:50:12 PST 2009


Hi,

We're looking at using clang as an OpenCL frontend.  I can't find
--inline-threshold in the list of options for the clang executable.  I
looked through the source code as well and cannot find any mentioning of the
option inline-threshold.

Thanks,

On Tue, Jan 27, 2009 at 10:40 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Tue, Jan 27, 2009 at 5:34 PM, VanDung To <vandungto at gmail.com> wrote:
> > Does clang have any feature for automatic inlining of functions?  If I
> have
> > functions that are not declared with static inline, is there any way I
> could
> > get the front end to inline some of the functions (based on size) using
> > command line options?
>
> If you're using the clang executable, it does automatic inlining as
> long as you turn on the optimizers.  You can tweak how aggressive the
> inliner is with the -inline-threshold command-line parameter; the
> default value is 200.
>
> If you're writing your own program using the clang libraries, you'll
> have to invoke the inliner yourself; http://llvm.org/docs/ would be
> helpful for that.
>
> That said, what are you planning to do with clang?  We're always
> interested in hearing about new users.
>
> -Eli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090202/6bfa12d8/attachment.html>


More information about the cfe-dev mailing list