[llvm-dev] New Pass Manager with flto[=thin] not enabled (??)

Graham Yiu via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 3 12:38:52 PDT 2017


Hi David,

Hi David,

So I should note that we're only interested in the gold linker with
LTO/thinLTO.  It didn't occur to me at the time that we also need to
account for lld.

I noticed the current way of passing options to gold plugin is slightly
hacky, in that there are handful of options we define and pass to gold
specifically like -O<#> or -mcpu=[arch].  This seems like it'll be a
maintenance nightmare in the future.

Also, are there ways to embed options into bitcode files from the compile
step?

Graham Yiu
LLVM Compiler Development
IBM Toronto Software Lab
Office: (905) 413-4077      C2-707/8200/Markham
Email: gyiu at ca.ibm.com



From:	Davide Italiano <davide at freebsd.org>
To:	Graham Yiu <gyiu at ca.ibm.com>
Cc:	llvm-dev <llvm-dev at lists.llvm.org>
Date:	10/03/2017 03:14 PM
Subject:	Re: [llvm-dev] New Pass Manager with flto[=thin] not enabled
            (??)
Sent by:	davide.italiano at gmail.com



On Tue, Oct 3, 2017 at 12:08 PM, Davide Italiano <davide at freebsd.org>
wrote:
> On Tue, Oct 3, 2017 at 11:57 AM, Graham Yiu via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> Hello,
>>
>> I recently noticed that the new pass manager was not enabled at
regular/thin
>> LTO link step even if '-fexperimental-new-pass-manager' was specified in
the
>> compile step and link step commands. Upon closer inspection, it seems
>> there's so real way to invoke the new pass manager path
('runNewPMPasses' in
>> lib/LTO/LTOBackend.cpp) during link step.
>>
>
> `-fexperimental-new-pass-manager` is a compile time flag and has no
> effect on the link step IIRC.
> You may want to teach the driver to pass the correct flag to the LTO
> plugin in gold or to lld.
>
> --
> Davide

For lld in particular, currently there's only the ability to specifiy
a custom pass pipeline when passing `--lto-newpm-passes` to the
linker. This is because, historically, when I added this flag, the
pass manager work was still in progress and the `-O2/LTO` pipeline
wasn't fleshed entirely (missing passes & functionality).
You can probably add the option to lld now, if you can't/don't know
how to do it, I may take a look this weekend.

Thanks,

--
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171003/90ef8501/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171003/90ef8501/attachment.gif>


More information about the llvm-dev mailing list