On Sat, Oct 14, 2017 at 10:58:17PM -0500, Kavon Farvardin via llvm-dev wrote:> > something simpler will do, IMHO. Happy to discuss this further if > > folks are in California next week :) > > Yes, I'll be in California next week, let's chat! > > We could make use of the autotuner I'm currently building: > > https://github.com/kavon/autotune > > It tries to find an optimal sequence of IR passes, and I've run into a bunch of different bugs with it so far (e.g., it seems structurizecfg interacts poorly with 'invoke'). I'll start submitting bug reports for them soon.As part of the stress-suite of the LLVM obfuscator we're going to present next Thursday, we ran into similar problems. Well, when you s/optimization/obfuscation/ many things go wrong anyway. I'm quite interested in the pass scheduling problem, because interaction between optimization and obfuscation are complex, let's chat!
Hi Kavon, JFYI, while in general any sequence of optimization passes should compose to produce a valid optimization pipeline, there are some tradeoffs LLVM makes in practice for backend passes. I think the current structure is more on the lines of: - Passes that are part of "opt -O(3|2|1|0)" should compose in any order to form a correct compilation pipeline that can handle any IR. - IR passes that are only run by backends: * Should never silently miscompile IR * May fail asserts on IR they can't handle I'd suggest restricting your autotuner on passes that are part of "opt -O(3|2|1|0)" as a starting point. -- Sanjoy
Madhur Amilkanthwar via llvm-dev
2017-Oct-16 04:03 UTC
[llvm-dev] IR Pass Ordering Sensitivity
One may want to read an interesting paper around this https://www.eecis.udel.edu/~cavazos/oopsla-2006.pdf On Mon, Oct 16, 2017 at 2:42 AM, Sanjoy Das via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi Kavon, > > JFYI, while in general any sequence of optimization passes should compose > to > produce a valid optimization pipeline, there are some tradeoffs LLVM makes > in > practice for backend passes. I think the current structure is more on the > lines > of: > > - Passes that are part of "opt -O(3|2|1|0)" should compose in any order > to form > a correct compilation pipeline that can handle any IR. > > - IR passes that are only run by backends: > * Should never silently miscompile IR > * May fail asserts on IR they can't handle > > I'd suggest restricting your autotuner on passes that are part of "opt > -O(3|2|1|0)" as a starting point. > > -- Sanjoy > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- *Disclaimer: Views, concerns, thoughts, questions, ideas expressed in this mail are of my own and my employer has no take in it. * Thank You. Madhur D. Amilkanthwar -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171016/c676f9aa/attachment.html>