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

Graham Yiu via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 3 14:42:39 PDT 2017


Patch available on Phabricator (https://reviews.llvm.org/D38517).

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



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



Hi Graham,

This looks like an oversight. Agree that the way of passing options through
to the linkers is not great as it requires adding plumbing through the
driver. But I think that is the best option for now. It would entail adding
a gold-plugin option that would be set from the clang driver and using that
to set Conf.UseNewPM. Do you want to send this patch?

Thanks,
Teresa

On Tue, Oct 3, 2017 at 12:38 PM, Graham Yiu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
  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

  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 at Davide Italiano
  ---10/03/2017 03:14:18 PM---On Tue, Oct 3, 2017 at 12:08 PM, Davide
  Italiano <davide at freebsd.org> wrote: > On Tue, Oct 3, 2017 a

  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





  _______________________________________________
  LLVM Developers mailing list
  llvm-dev at lists.llvm.org
  http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev




--
 ----------------------------------------------------------- 
 Teresa       Software                                       
 Johnson |   Engineer |    tejohnson at google.com 408-460-2413 
                           |                                 
                                                             



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171003/efe81dbb/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/efe81dbb/attachment.gif>


More information about the llvm-dev mailing list