<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Right, we were debating the alternative approach. Our conclusion is it will also require changes to out-of-tree projects. doInit / doFini approach has the benefit of keeping the api consistent for different types of passes.<div><br></div><div>Pedro, when the change is accepted please send an email to llvmdev to make people aware of the API change. Not everyone is reading llvm-commits closely.<br><div><br></div><div>Evan</div><div><br><div><div>On Nov 14, 2012, at 2:52 PM, Pedro Artigas <<a href="mailto:partigas@apple.com">partigas@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello All,<div><br></div><div>reset was considered but doInitialization/doFinalization is closer to the model used for FunctionPasses Today so it should cause less confusion.</div><div><br></div><div>Pedro</div><div><br><div><div>On Nov 14, 2012, at 2:49 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thought Evan was saying something about a resetPass call maybe instead of the doInit/run/doFini scheme? I'm not sure if there have been offline talks in addition.<div><br></div><div>-eric</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Nov 14, 2012 at 2:40 PM, Pedro Artigas <span dir="ltr"><<a href="mailto:partigas@apple.com" target="_blank">partigas@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello All,<br>
<br>
Yesterday's e-mail caused some concerns, therefore we improved the patch to re-write all in-tree projects to use the doInitialization/run/doFinalization scheme for module passes just like it is done for function passes.<br>

<br>
Right now no passes follow this model but the skeleton should make it clear how the model operates and how to adapt module passes to follow the model, the idea is that a pass would do basic immutable allocation and variable set up in the constructor, would do minimal variable set up on the doInitialization and doFinalization would free all the extra memory allocated to store the state of the prior module, bringing the module pass to the state right after construction so it can be reused for a future module.<br>

<br>
Hope this is clear now,<br>
<br>
Thanks<br>
<span class="HOEnZb"><font color="#888888"><br>
Pedro<br>
<br>
</font></span><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></blockquote></div><br></div></div></body></html>