[llvm-dev] Correct Usage of Different Inlining Modes

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 20 20:36:44 PDT 2021


On Wed, Oct 20, 2021 at 2:42 PM via llvm-dev <llvm-dev at lists.llvm.org>
wrote:

> On 2021-10-20 16:47, Min-Yih Hsu wrote:
> > I think you’re invoking clang static analyzer
> > (https://clang-analyzer.llvm.org
> > <https://clang-analyzer.llvm.org/> ) — a tool that is used to find bugs
> and
> > I
> > don’t think it will affect the generated IR / machine code.
> >
> > I think a better way to test different inline configurations will be
> > generating IR files using clang and play around with different `opt`
> > (inlining) options.
> >
> > -Min
> >
> >> On Oct 20, 2021, at 10:15 AM, via llvm-dev <llvm-dev at lists.llvm.org>
> wrote:
> >>
> >>
> >>
> >> Hi,
> >>
> >>  I am trying to see the difference between different inlining options
> that
> >> llvm supports
> >> (https://clang.llvm.org/docs/analyzer/developer-docs/IPA.html). The
> way I
> >> invoked them was -
> >>
> >>   clang++ -Xclang -analyzer-config -Xclang -ipa=dynamic -std=c++11
> -Wall
> >> something.cc -o something (for dynamic mode)
> >>   clang++ -Xclang -analyzer-config -Xclang -ipa=basic -std=c++11 -Wall
> >> something.cc -o something (for basic mode)
> >>
> >>   and so on.
> >>
> >> However, I did't observe much difference in execution times for the
> runs
> >> with different inlining modes, which is making me wonder if I did this
> >> correctly? Is this the right way to use the different inlining modes?
> Can
> >> anyone tell me if I am missing something?
> >>
> >>
> >> Thanks,
> >> Bodhi
> >>
> >> _______________________________________________
> >> LLVM Developers mailing list
> >> llvm-dev at lists.llvm.org
> >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
> Let me re-iterate my question. Is there any way we can test out the
> inlining
> modes mentioned in clang documentation
> (https://clang.llvm.org/docs/analyzer/developer-docs/IPA.htm) -
> basic-inlining, dynamic, dynamic-bifurcate, etc? The instructions in the
> docs
> seem to be talking about clang in general, not the static analyzer.
>

Correcting the URL (adding a trailing 'l'):
https://clang.llvm.org/docs/analyzer/developer-docs/IPA.html

This documentation is specifically for Clang's static analyzer (note the
"analyzer" in the URL, the root page for this section is here:
https://clang.llvm.org/docs/ClangStaticAnalyzer.html )

This has no impact on the code Clang generates, only the static analysis
warnings it produces.


> Also, I'd appreciate if you point to an example usage of different
> inlining
> options with opt? I am only aware of the -always-inline flag that can be
> loaded with opt.
>
>
> Thanks,
> Bodhi
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://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/20211020/de746b92/attachment.html>


More information about the llvm-dev mailing list