<html><body><p><font size="2">Hi David,</font><br><br><font size="2">Hi David,</font><br><br><font size="2">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.</font><br><br><font size="2">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.</font><br><br><font size="2">Also, are there ways to embed options into bitcode files from the compile step?</font><br><br><font size="2">Graham Yiu<br>LLVM Compiler Development<br>IBM Toronto Software Lab<br>Office: (905) 413-4077 C2-707/8200/Markham<br>Email: gyiu@ca.ibm.com</font><br><br><img width="16" height="16" src="cid:1__=8FBB0B3DDFF8AE9D8f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Davide Italiano ---10/03/2017 03:14:18 PM---On Tue, Oct 3, 2017 at 12:08 PM, Davide Italiano <davide@"><font size="2" color="#424282">Davide Italiano ---10/03/2017 03:14:18 PM---On Tue, Oct 3, 2017 at 12:08 PM, Davide Italiano <davide@freebsd.org> wrote: > On Tue, Oct 3, 2017 a</font><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">Davide Italiano <davide@freebsd.org></font><br><font size="2" color="#5F5F5F">To: </font><font size="2">Graham Yiu <gyiu@ca.ibm.com></font><br><font size="2" color="#5F5F5F">Cc: </font><font size="2">llvm-dev <llvm-dev@lists.llvm.org></font><br><font size="2" color="#5F5F5F">Date: </font><font size="2">10/03/2017 03:14 PM</font><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">Re: [llvm-dev] New Pass Manager with flto[=thin] not enabled (??)</font><br><font size="2" color="#5F5F5F">Sent by: </font><font size="2">davide.italiano@gmail.com</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt><font size="2">On Tue, Oct 3, 2017 at 12:08 PM, Davide Italiano <davide@freebsd.org> wrote:<br>> On Tue, Oct 3, 2017 at 11:57 AM, Graham Yiu via llvm-dev<br>> <llvm-dev@lists.llvm.org> wrote:<br>>> Hello,<br>>><br>>> I recently noticed that the new pass manager was not enabled at regular/thin<br>>> LTO link step even if '-fexperimental-new-pass-manager' was specified in the<br>>> compile step and link step commands. Upon closer inspection, it seems<br>>> there's so real way to invoke the new pass manager path ('runNewPMPasses' in<br>>> lib/LTO/LTOBackend.cpp) during link step.<br>>><br>><br>> `-fexperimental-new-pass-manager` is a compile time flag and has no<br>> effect on the link step IIRC.<br>> You may want to teach the driver to pass the correct flag to the LTO<br>> plugin in gold or to lld.<br>><br>> --<br>> Davide<br><br>For lld in particular, currently there's only the ability to specifiy<br>a custom pass pipeline when passing `--lto-newpm-passes` to the<br>linker. This is because, historically, when I added this flag, the<br>pass manager work was still in progress and the `-O2/LTO` pipeline<br>wasn't fleshed entirely (missing passes & functionality).<br>You can probably add the option to lld now, if you can't/don't know<br>how to do it, I may take a look this weekend.<br><br>Thanks,<br><br>-- <br>Davide<br><br>"There are no solved problems; there are only problems that are more<br>or less solved" -- Henri Poincare<br><br></font></tt><br><br><BR>
</body></html>