Re: [swift-dev] Tips for debugging interactions between optimization passes

2017-03-03 Thread Ben Ng via swift-dev
Arnold, Thanks for the explanation of what’s going on here. Has the “optimizing a semantic function called from a semantic function” issue happened before, and is there a standard workaround? I feel like adding an earlier optimization pipeline, and adding a new InlineSelection to the performan

Re: [swift-dev] Tips for debugging interactions between optimization passes

2017-03-03 Thread Arnold Schwaighofer via swift-dev
Some documentation about debugging the swift compiler: https://github.com/apple/swift/blob/master/docs/DebuggingTheCompiler.rst Possibly, not all flags are documented: https://github.com/apple/swift/blob/master/lib/SILOp

[swift-dev] Tips for debugging interactions between optimization passes

2017-03-03 Thread Ben Ng via swift-dev
I noticed that adding any semantic attribute to the two Array.append functions causes performance regressions in the Array benchmark. I think that it’s because the delayed inlining is blocking some array optimizations from happening. What are some tips for debugging this sort of issue? There ar