<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></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 Nov 6, 2015, at 5:32 AM, Russell Wallace via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I don't suppose there's any way to find out whether the second iteration did anything? That is, suppose you have a module and you run some passes over it - if something changed, further iterations might be fruitful, but if nothing changed then further iterations definitely won't do anything so you can stop. In principle one could make a copy of the module beforehand and then compare, but being a large complex data structure, it probably doesn't provide equality comparison by value?<br class=""></div></div></blockquote><div><br class=""></div><div>What you’re looking for is a dynamic pass pipeline, which the current pass manager can’t support. But I believe the new pass manager will be able to at least express this.</div><div><br class=""></div><div>— </div><div>Mehdi</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Nov 6, 2015 at 1:17 PM, serge guelton <span dir="ltr" class=""><<a href="mailto:sguelton@quarkslab.com" target="_blank" class="">sguelton@quarkslab.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 class="HOEnZb"><div class="h5">On Fri, Nov 06, 2015 at 11:58:22AM +0000, Russell Wallace via llvm-dev wrote:<br class="">
> Within the LLVM pass manager infrastructure, suppose we have two<br class="">
> transformation passes, pass A makes some improvements, then pass B does<br class="">
> likewise, but this creates opportunities for pass A to create further<br class="">
> improvements (e.g. suppose B was function inlining) so it's desirable to<br class="">
> run A again.<br class="">
><br class="">
> How does the LLVM pass manager currently deal with this?<br class="">
<br class="">
</div></div>Some passes are already applied repeatedly by the passmanager, just add<br class="">
them twice when relevant.<br class="">
<br class="">
for instance in lib/Transforms/IPO/PassManagerBuilder.cpp,<br class="">
PassManagerBuilder::populateModulePassManager<br class="">
<br class="">
MPM.add(createGVNPass(...)) is called twice (conditionnaly)<br class="">
<br class="">
Hope it helps,<br class="">
<br class="">
<br class="">
</blockquote></div><br class=""></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>