[llvm-dev] New Pass Manager with flto[=thin] not enabled (??)
Davide Italiano via llvm-dev
llvm-dev at lists.llvm.org
Tue Oct 3 12:13:32 PDT 2017
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
More information about the llvm-dev
mailing list