<div dir="ltr"><div>> 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>pelineFromFile and/or the python scripts, have not been kept up-to-date. </div><div><br></div><div>It seems that the following format works for the time being:</div><div><br></div><div>[</div><div> [ "Pipeline1", [ "PassName1" ],</div><div> [ "Pipeline2", [ "PassName2" ],</div><div> [ "Pipeline3", [ "PassName3" ],</div><div> [ ...</div><div> ]</div><div> ]</div><div> ]</div><div> ]</div><div>]</div><div><br></div><div>However, it works only when LLVM's assertions are disabled. I'll try to come-up with a patch that will accept a saner format with multiple passes per pipeline entry. Against which branch should I perform a pull request?</div><div><br></div><div>- Vasileios</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:small"> </span></div><div><div class="gmail-yj6qo gmail-ajU"></div></div><div class="gmail-yj6qo gmail-ajU"></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 28, 2017 at 7:15 PM, Vasileios Kalintiris <span dir="ltr"><<a href="mailto:vkal@uber.com" target="_blank">vkal@uber.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"><span class="">> Have you seen `utils/pass-pipeline/scripts/p<wbr>ipelines_build_script.py`, it looks like it might give some hints?<br><div><br></div></span><div>I've tried generating a pass pipeline with utils/pass-pipeline/scripts/pi<wbr>pelines_generator.py and use it with the -external-pass-pipeline-filena<wbr>me. However, AFAICT the generated pipeline is not in the correct format that the compiler expects:</div><div><br></div><div><div>[</div><div> [</div><div> "HighLevel",</div><div> "run_n_times",</div><div> 2,</div><div> "SimplifyCFG",</div><div> ...</div><div> "GlobalARCOpts"</div><div> ],</div><div> [</div><div> "EarlyLoopOpt",</div><div> "run_n_times",</div><div> 1,</div><div> "LowerAggregateInstrs",</div><div> ...</div><div> "SwiftArrayOpts"<br></div><div> ],</div></div><div> ...</div><div>]</div><div><br></div><div>Each generated pass pipeline contains the "run_n_times"|"run_to_fixed_po<wbr>int" field, followed by the number of iterations, which is not what the compiler expects.</div><div><br></div><div>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>pelineFromFile():</div><div><br></div><div>[</div><div> [</div><div> "HihLevel",</div><div> "SimplifyCFG",</div><div> ...</div><div> "GlobalARCOpts"</div><div> ],</div><div> ...</div><div>]</div><div><br></div><div>or even:</div><div><br></div><div>[</div><div> [</div><div> "HighLevel",</div><div> [ "SimplifyCFG" ],</div><div> ...</div><div> [ "GlobalARCOpts" ]</div><div> ],</div><div> ...</div><div>]</div><div><br></div><div>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>pelineFromFile and/or the python scripts, have not been kept up-to-date. </div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 28, 2017 at 6:18 PM, Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel_dunbar@apple.com" target="_blank">daniel_dunbar@apple.com</a>></span> wrote:<br><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>ipelines_build_script.py`, it looks like it might give some hints?<br>
--<br>
$ sgit grep external-pass-pipeline-filenam<wbr>e<br>
include/swift/Option/FrontendO<wbr>ptions.td:def external_pass_pipeline_filenam<wbr>e : Separate<["-"], "external-pass-pipeline-filena<wbr>me">,<br>
utils/pass-pipeline/scripts/pi<wbr>pelines_build_script.py: '-external-pass-pipeline-filen<wbr>ame\;-Xfrontend\;%s' % data_file]<br>
--<br>
<br>
- Daniel<br>
<div><div class="m_-5422628699512365829h5"><br>
> On Jun 28, 2017, at 5:27 AM, Vasileios Kalintiris via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>> wrote:<br>
><br>
> Hi all,<br>
><br>
> Please, let me know if I should post this to another list.<br>
><br>
> I'm trying to figure out what is the expected YAML format of the -external-pass-pipeline-filena<wbr>me option.<br>
><br>
> 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>
><br>
> I thought to ask here because I'm not entirely sure that the relevant YAML parsing code from SILPassPipelinePlan::getPassPi<wbr>pelineFromFile() accepts valid YAML input.<br>
><br>
> Thanks,<br>
> Vasileios<br>
</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" rel="noreferrer" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-dev</a><br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>