<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 28, 2017, at 10:15 AM, Vasileios Kalintiris via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-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-<wbr class="">filename. 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_<wbr class="">point" 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::<wbr class="">getPassPipelineFromFile():</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::<wbr class="">getPassPipelineFromFile and/or the python scripts, have not been kept up-to-date. </div></div></div></blockquote><div><br class=""></div><div>Yes. I think that is true. Here is what I would suggest:</div><div><br class=""></div><div>1. It would be really trivial to change this to use yamltraits.</div><div>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><div><br class=""></div><div>MIchael</div><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/<wbr class="">pipelines_build_script.py`, it looks like it might give some hints?<br class="">
--<br class="">
$ sgit grep external-pass-pipeline-<wbr class="">filename<br class="">
include/swift/Option/<wbr class="">FrontendOptions.td:def external_pass_pipeline_<wbr class="">filename : Separate<["-"], "external-pass-pipeline-<wbr class="">filename">,<br class="">
utils/pass-pipeline/scripts/<wbr class="">pipelines_build_script.py: '-external-pass-pipeline-<wbr class="">filename\;-Xfrontend\;%s' % data_file]<br class="">
--<br class="">
<br class="">
- Daniel<br class="">
<div class=""><div class="h5"><br class="">
> On Jun 28, 2017, at 5:27 AM, Vasileios Kalintiris via swift-dev <<a href="mailto:swift-dev@swift.org" 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-<wbr class="">filename 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::<wbr class="">getPassPipelineFromFile() 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" 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/<wbr class="">mailman/listinfo/swift-dev</a><br class="">
<br class="">
</blockquote></div><br class=""></div>
_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></blockquote></div><br class=""></body></html>