<div dir="ltr">I've also come up with a small repro case that shows the duplicated bridging header work: <a href="https://bugs.swift.org/browse/SR-3338">https://bugs.swift.org/browse/SR-3338</a>.<div><br></div><div>Thanks!</div><div><br></div><div>Ben</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 2, 2016 at 3:28 PM, Ben Asher <span dir="ltr"><<a href="mailto:benasher44@gmail.com" target="_blank">benasher44@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Filed the issues I ran into with repro cases here:<div><br></div><div><a href="https://bugs.swift.org/browse/SR-3319" target="_blank">https://bugs.swift.org/browse/<wbr>SR-3319</a><br></div><div><a href="https://bugs.swift.org/browse/SR-3321" target="_blank">https://bugs.swift.org/browse/<wbr>SR-3321</a></div><div><br></div><div>SR-3321 covers the SIL verification failure. The assertion failure was in the same file as the one that repro'd the SIL verification failure, but I'm not seeing it anymore. If/when SR-3321 gets fixed, I'll follow up again and see if it shows up.<br></div><div><br></div><div>Thanks!</div><div><br></div><div>Ben</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 7:10 PM, Ben Asher <span dir="ltr"><<a href="mailto:benasher44@gmail.com" target="_blank">benasher44@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sure thing! I’ll see if I can put small reproducers together tomorrow.<div><br></div><div>Ben</div></div><div class="gmail_extra"><div><div class="m_-3928251193344214239h5"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 7:08 PM, Mark Lacey <span dir="ltr"><<a href="mailto:mark_lacey@apple.com" target="_blank">mark_lacey@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On Dec 1, 2016, at 5:48 PM, Ben Asher via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>> wrote:</div><br class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612Apple-interchange-newline"><div><div dir="ltr">The build failed compiling 3 files in our project. Our app is crashing that snapshot; here is some output from the failures:</div></div></blockquote><div><br></div></span>It would be awesome if you could come up with small reproducers for these and open bugs for them. Alternately, opening a radar with the full project attached will give us an opportunity to get these fixed ASAP!</div><span class="m_-3928251193344214239m_2022659508253958321HOEnZb"><font color="#888888"><div><br></div><div>Mark</div></font></span><div><div class="m_-3928251193344214239m_2022659508253958321h5"><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div><div>- Assertion failed: (newType == type || (isa<TupleType>(newType) && cast<TupleType>(newType)->getN<wbr>umElements() == 1 && cast<TupleType>(newType).getEl<wbr>ementType(0) == type)), function rewriteType, file /Users/buildn</div><div>ode/jenkins/workspace/oss-swif<wbr>t-package-osx/swift/lib/SILGen<wbr>/RValue.h, line 207.</div></div><div><br></div><div>- SIL verification failed: method's Self parameter should be constrained by protocol: selfRequirement.getKind() == RequirementKind::Conformance && selfRequirement.getFirstType()<wbr>->isEqual(selfGenericParam) && selfR</div><div>equirement.getSecondType()->ge<wbr>tAs<ProtocolType>() ->getDecl() == protocol</div><div><br></div><div>We're not getting all the way to linking, but compiling everything for that snapshot took ~11min45s. Based on that, it appears that about a minute is saved with the new fixes since the Swift 3.0 that shipped with Xcode 8.1 (App Store).</div><div><br></div><div>With Xcode 8.2 Beta 2, the app builds fine, and it takes about 12m15s. If Xcode 8.2 Beta 2 also has those fixes that we expect to speed up the build, the extra time here (compared to the snapshot) could be explained by linking, signing, and a few other custom builds scripts that run after compiling.</div><div><br></div><div>Thanks everyone for your help!</div><div><br></div><div>Ben</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 4:16 PM, Ben Asher <span dir="ltr"><<a href="mailto:benasher44@gmail.com" target="_blank">benasher44@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm trying out DEVELOPMENT-SNAPSHOT-2016-<wbr>11-29-a now. It's still going, so I don't have any time results yet. But, I did notice something new (or maybe existed before but didn't have this warning to expose it). For every Swift file that's compiled (only using -Onone here), it outputs the same 2 warnings (easy to fix, but not related to any of this) from the same method in the same Obj-C header referring to the arguments and the return types in that method:<div><br></div><div>- "array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)"</div><div>- "inferring '_Nonnull' for pointer type within array is deprecated"</div><div><br></div><div>Here's an example of what this method looks like:</div><div><br></div><div>+ (NSSet<SomeObject *> *)setWithSELs:(SEL[])sels count:(NSUInteger)count;<br></div><div><br></div><div>Could this point to more duplicated work?</div><div><br></div><div>Ben</div></div><div class="gmail_extra"><div><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612h5"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 2:50 PM, Ben Asher <span dir="ltr"><<a href="mailto:benasher44@gmail.com" target="_blank">benasher44@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sure! Thanks for reminding me. I'll follow up on that, test, and get back to you.<div><br></div><div>Ben</div></div><div class="gmail_extra"><div><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507h5"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 2:48 PM, Mark Lacey <span dir="ltr"><<a href="mailto:mark_lacey@apple.com" target="_blank">mark_lacey@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On Dec 1, 2016, at 3:13 PM, Ben Asher via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>> wrote:</div><br class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765Apple-interchange-newline"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Just running a quick trial before and after I made this change in our project, we were previously seeing builds of our main target that took just under 13min. With this hack, a clean debug build takes about 4.5min.</div></div></blockquote><div><br></div></span>You may find that recent snapshot builds from <a href="http://swift.org/" target="_blank">swift.org</a> help with your build times even without enabling -Owholemodule. The redundant type checking of synthesized accessors which we talked about a month or two should now be fixed on master, and it would be great to verify that’s the case with your code and to get an idea of how much it improves your build times.</div><span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690HOEnZb"><font color="#888888"><div><br></div><div>Mark</div></font></span><div><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690h5"><div><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><br></div><div>Ben</div></div><div class="gmail_extra" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 1:33 PM, Ben Asher<span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:benasher44@gmail.com" target="_blank">benasher44@gmail.com</a>></span><span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765Apple-converted-space"> </span>w<wbr>rote:<br><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="ltr">Okay I think that worked! And just to clarify, you meant set SWIFT_OPTIMIZATION_LEVEL = -Owholemodule and OTHER_SWIFT_FLAGS = -Onone ?<div><br></div><div>I'll file a radar this afternoon with some details and DM you the number.</div><div><br></div><div>Thanks again!</div><div><br></div><div>Ben</div></div><div class="gmail_extra"><div><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765h5"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 1:10 PM, Jordan Rose<span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span><span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765Apple-converted-space"> </span>w<wbr>rote:<br><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">Xcode needs to know that you're building in WMO mode, so rather than putting -whole-module-optimization in your "Other Swift Flags", put -Onone there. It's an ugly hack but it should work in the near term.<br><br>We do want to work to make this drastic speed difference go away, so if you're able we (at Apple) would love to have a source drop of your Swift 3 project, for additional data on where the problems are. Mind filing a Radar?<br><br>Best,<br>Jordan<br><div><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765m_-7790787871724555883h5"><br><br>> On Dec 1, 2016, at 11:51, Ben Asher via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>> wrote:<br>><br>> Hello! Someone recently tipped me off to using -whole-module-optimization flag with -Onone for use during debug builds to speed up compile times. In our project, the speedup feels quite dramatic, but when it gets to the linking step (after compiling both Swift and Obj-C in the project) it fails because ld can't find the individual object files that normally get emitted during the debug-type build presumably because -whole-module-optimization only emits one (and this isn't a normal "-Owholemodule"-type build which works fine).<br>><br>> I can't seem to reproduce this outside of Xcode, but I was curious if anyone has tried this and knows of a workaround to get -whole-module-optimization to work with -Onone in Xcode?<br>><br>> I'm currently using Xcode 8.1 (App Store build) and Swift 3 on macOS Sierra.<br>><br>> Thanks!<br>><br>> Ben<br></div></div>> ______________________________<wbr>_________________<br>> swift-dev mailing list<br>><span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765Apple-converted-space"> </span><a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a><br>><span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765Apple-converted-space"> </span><a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank">https://lists.swift.org/mail<wbr>man/listinfo/swift-dev</a><br><br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765HOEnZb"><font color="#888888">--<span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765Apple-converted-space"> </span><br><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765m_-7790787871724555883gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Ben</div></div></div></div></font></span></div></blockquote></div><br><br clear="all"><div><br></div>--<span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765Apple-converted-space"> </span><br><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690m_-7405406413213661765gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Ben</div></div></div></div></div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">______________________________<wbr>_________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">swift-dev mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:swift-dev@swift.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">swift-dev@swift.org</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="https://lists.swift.org/mailman/listinfo/swift-dev" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-dev</a></div></blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507HOEnZb"><font color="#888888">-- <br><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507m_-4197306237743934690gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Ben</div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612HOEnZb"><font color="#888888">-- <br><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612m_1451675957100742507gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Ben</div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-3928251193344214239m_2022659508253958321m_8257372651503151612gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Ben</div></div></div></div>
</div>
______________________________<wbr>_________________<br>swift-dev mailing list<br><a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-dev" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-dev</a><br></div></blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_-3928251193344214239HOEnZb"><font color="#888888">-- <br><div class="m_-3928251193344214239m_2022659508253958321gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Ben</div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-3928251193344214239gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Ben</div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Ben</div></div></div></div>
</div>