From: Nathan Chancellor <nathan@kernel.org>
To: Sedat Dilek <sedat.dilek@gmail.com>
Cc: llvm@lists.linux.dev, Sylvestre Ledru <sylvestre@debian.org>
Subject: Re: How to check my LLVM toolchain is optimized for PGO and/or ThinLTO?
Date: Tue, 5 Oct 2021 19:59:28 -0700 [thread overview]
Message-ID: <YV0REIpkY6TkuGA+@archlinux-ax161> (raw)
In-Reply-To: <CA+icZUWf5OgQGOKG8jK+mEmSnT9wUGo4WV9wCSmDGwdDAX15TQ@mail.gmail.com>
Hi Sedat,
On Tue, Oct 05, 2021 at 11:33:33PM +0200, Sedat Dilek wrote:
> Hi,
>
> does anyone have a hint how to check a selfmade or distribution LLVM
> toolchain for optimizations like PGO and/or ThinLTO?
I am not really sure of a way to see that information from the binary
itself unless there is a way to dump the cmake options that were used
after the fact? I know the optimizations are applied properly via
tc-build as I have measured the difference via hyperfine.
> Personally, I use tc-build to generate a selfmade PGO-ThinLTO LLVM
> toolchain which optimizes for my specific hardware (CPU Intel
> SandyBridge) and a Linux x86 64-Bit kernel-config.
>
> In case of PGO...
> Can I use or better benefit from a distro PGO profile file?
If you only care about using LLVM to build a Linux kernel (in other
words, you are not using it for other projects), in theory, tc-build
should provide you with more benefits/speed over a generic C/C++ profile
that a distribution might build. HOWEVER, if building an optimized
toolchain takes a significant amount of time and you are not building
kernels often enough to make it back up, it might be more useful to use
the optimized distribution variant so that you are only net positive on
time.
> Can I use/benefit from my selfmade (generated) PGO profile file when I
> use an optimized distro LLVM toolchain?
Given that the distribution LLVM is going to be pre-compiled, your own
profile is not going to be useful since it is only used at compile time.
Cheers,
Nathan
prev parent reply other threads:[~2021-10-06 2:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 21:33 How to check my LLVM toolchain is optimized for PGO and/or ThinLTO? Sedat Dilek
2021-10-06 2:59 ` Nathan Chancellor [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YV0REIpkY6TkuGA+@archlinux-ax161 \
--to=nathan@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=sedat.dilek@gmail.com \
--cc=sylvestre@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox