<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 16, 2016, at 7:48 PM, Teresa Johnson <<a href="mailto:tejohnson@google.com" class="">tejohnson@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Fri, Sep 16, 2016 at 7:40 PM, Mehdi Amini<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:mehdi.amini@apple.com" target="_blank" class="">mehdi.amini@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="auto" class=""><span class=""><div class=""><div style="direction: inherit;" class=""><br class=""></div></div><div class=""><br class="">On Sep 16, 2016, at 7:37 PM, Teresa Johnson <<a href="mailto:tejohnson@google.com" target="_blank" class="">tejohnson@google.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Sep 16, 2016 at 6:17 PM, Mehdi Amini<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:mehdi.amini@apple.com" target="_blank" class="">mehdi.amini@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class=""><br class="">> On Sep 16, 2016, at 6:13 PM, Carsten Mattner <<a href="mailto:carstenmattner@gmail.com" target="_blank" class="">carstenmattner@gmail.com</a>> wrote:<br class="">><br class="">> On Sat, Sep 17, 2016 at 2:07 AM, Teresa Johnson via llvm-dev<br class="">> <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class="">><br class="">>> Yes and to add on - the ThinLTO backend by default will<br class="">>> kick off  std::thread::hardware_concurre<wbr class="">ncy # of threads, which I'm finding is<br class="">><br class="">> Is it just me or does that sound not very intuitive or at least a<br class="">> little unexpected?<br class="">> It's good that it uses the resources eagerly, but in terms of build systems this<br class="">> is certainly surprising if there's no control of that parameter via<br class="">> make/ninja/xcode.<br class=""><br class=""></span>You can control the parallelism used by the linker, but the option is linker dependent<br class="">(On MacOS:   -Wl,-mllvm,-threads=1)<br class=""></blockquote><div class=""><br class=""></div><div class="">Wait - this is to control the ThinLTO backend parallelism, right? In which case you wouldn't want to use 1, but rather the number of physical cores.</div><div style="direction: inherit;" class=""><br class=""></div></div></div></div></div></blockquote><div style="direction: inherit;" class=""><br class=""></div></span><div style="direction: inherit;" class="">Well it depends what behavior you want :)</div><div style="direction: inherit;" class=""><br class=""></div><div style="direction: inherit;" class="">I should have used N to match ninja -jN.</div><span class=""><div style="direction: inherit;" class=""><br class=""></div><div style="direction: inherit;" class=""><br class=""></div><div style="direction: inherit;" class=""><br class=""></div><div style="direction: inherit;" class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">When using gold the option is -Wl,-plugin-opt,jobs=N, where N is the amount of backend parallel ThinLTO jobs that will be issued in parallel. So you could try with the default, but if you have HT on then you might want to try with the number of physical cores instead.</div></div></div></div></div></blockquote><div style="direction: inherit;" class=""><br class=""></div><div style="direction: inherit;" class=""><br class=""></div></span><div style="direction: inherit;" class="">How does it affects parallel LTO backends?</div><div style="direction: inherit;" class="">(I hope it doesn't)</div></div></blockquote><div class=""><br class=""></div><div class="">In regular LTO mode, the option will also affect parallel LTO codegen, which is off by default. Is that what you meant? </div></div></div></blockquote><div class=""><br class=""></div><div class="">Yes. I’m sad that it is the same option: the parallel LTO changes the final binary, which is really not great in my opinion. </div><div class="">In ThinLTO the parallel level has this important property that the codegen is unchanged!</div><div class=""><br class=""></div><div class="">— </div><div class="">Mehdi</div><div class=""><br class=""></div></div></div></div></div></body></html>