<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 29, 2017, at 12:50 PM, Vasileios Kalintiris <<a href="mailto:vkal@uber.com" class="">vkal@uber.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I plan on writing a patch for this. Based on which branch should I create the pull request? Is the swift-3.1-branch frozen?</div></div></blockquote><div><br class=""></div><div>master.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Jun 29, 2017 at 7:27 PM, Michael Gottesman <span dir="ltr" class=""><<a href="mailto:mgottesman@apple.com" target="_blank" class="">mgottesman@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><div class=""><div class="h5"><blockquote type="cite" class=""><div class="">On Jun 28, 2017, at 10:15 AM, Vasileios Kalintiris via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a>> wrote:</div><br class="m_4227734653345823433Apple-interchange-newline"><div class=""><div dir="ltr" class="">> Have you seen `utils/pass-pipeline/scripts/p<wbr class="">ipelines_build_script.py`, it looks like it might give some hints?<br class=""><div class=""><br class=""></div><div class="">I've tried generating a pass pipeline with utils/pass-pipeline/scripts/pi<wbr class="">pelines_generator.py and use it with the -external-pass-pipeline-filena<wbr class="">me. However, AFAICT the generated pipeline is not in the correct format that the compiler expects:</div><div class=""><br class=""></div><div class=""><div class="">[</div><div class=""> [</div><div class=""> "HighLevel",</div><div class=""> "run_n_times",</div><div class=""> 2,</div><div class=""> "SimplifyCFG",</div><div class=""> ...</div><div class=""> "GlobalARCOpts"</div><div class=""> ],</div><div class=""> [</div><div class=""> "EarlyLoopOpt",</div><div class=""> "run_n_times",</div><div class=""> 1,</div><div class=""> "LowerAggregateInstrs",</div><div class=""> ...</div><div class=""> "SwiftArrayOpts"<br class=""></div><div class=""> ],</div></div><div class=""> ...</div><div class="">]</div><div class=""><br class=""></div><div class="">Each generated pass pipeline contains the "run_n_times"|"run_to_fixed_po<wbr class="">int" field, followed by the number of iterations, which is not what the compiler expects.</div><div class=""><br class=""></div><div class="">I had no luck even when I tried to re-format the file containing the pipelines to something that I believe the compiler would expect based on the source code of SILPassPipelinePlan::getPassPi<wbr class="">pelineFromFile():</div><div class=""><br class=""></div><div class="">[</div><div class=""> [</div><div class=""> "HihLevel",</div><div class=""> "SimplifyCFG",</div><div class=""> ...</div><div class=""> "GlobalARCOpts"</div><div class=""> ],</div><div class=""> ...</div><div class="">]</div><div class=""><br class=""></div><div class="">or even:</div><div class=""><br class=""></div><div class="">[</div><div class=""> [</div><div class=""> "HighLevel",</div><div class=""> [ "SimplifyCFG" ],</div><div class=""> ...</div><div class=""> [ "GlobalARCOpts" ]</div><div class=""> ],</div><div class=""> ...</div><div class="">]</div><div class=""><br class=""></div><div class="">I suspect that we don't use the pass pipeline python scripts in our buildbots anymore and the relevant bits, ie. the code in SILPassPipelinePlan::getPassPi<wbr class="">pelineFromFile and/or the python scripts, have not been kept up-to-date. </div></div></div></blockquote><div class=""><br class=""></div></div></div><div class="">Yes. I think that is true. Here is what I would suggest:</div><div class=""><br class=""></div><div class="">1. It would be really trivial to change this to use yamltraits.</div><div class="">2. If you make this change, make sure that a test is added (maybe to sil-opt) that makes sure that we can roundtrip from the dumper.</div><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">MIchael</div></font></span><span class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Jun 28, 2017 at 6:18 PM, Daniel Dunbar <span dir="ltr" class=""><<a href="mailto:daniel_dunbar@apple.com" target="_blank" class="">daniel_dunbar@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you seen `utils/pass-pipeline/scripts/p<wbr class="">ipelines_build_script.py`, it looks like it might give some hints?<br class="">
--<br class="">
$ sgit grep external-pass-pipeline-filenam<wbr class="">e<br class="">
include/swift/Option/FrontendO<wbr class="">ptions.td:def external_pass_pipeline_filenam<wbr class="">e : Separate<["-"], "external-pass-pipeline-filena<wbr class="">me">,<br class="">
utils/pass-pipeline/scripts/pi<wbr class="">pelines_build_script.py: '-external-pass-pipeline-filen<wbr class="">ame\;-Xfrontend\;%s' % data_file]<br class="">
--<br class="">
<br class="">
- Daniel<br class="">
<div class=""><div class="m_4227734653345823433h5"><br class="">
> On Jun 28, 2017, at 5:27 AM, Vasileios Kalintiris via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a>> wrote:<br class="">
><br class="">
> Hi all,<br class="">
><br class="">
> Please, let me know if I should post this to another list.<br class="">
><br class="">
> I'm trying to figure out what is the expected YAML format of the -external-pass-pipeline-filena<wbr class="">me option.<br class="">
><br class="">
> Dumping the pass pipeline under -O and feeding it back to the compiler with this option doesn't work (from swift-3.1-branch).<br class="">
><br class="">
> I thought to ask here because I'm not entirely sure that the relevant YAML parsing code from SILPassPipelinePlan::getPassPi<wbr class="">pelineFromFile() accepts valid YAML input.<br class="">
><br class="">
> Thanks,<br class="">
> Vasileios<br class="">
</div></div>> ______________________________<wbr class="">_________________<br class="">
> swift-dev mailing list<br class="">
> <a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a><br class="">
> <a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailma<wbr class="">n/listinfo/swift-dev</a><br class="">
<br class="">
</blockquote></div><br class=""></div>
______________________________<wbr class="">_________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" target="_blank" class="">swift-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-dev" target="_blank" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-dev</a><br class=""></div></blockquote></span></div><br class=""></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>