<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Chandler,<div><br></div><div>I have a quick question for you. Are any of the remaining issues related to the C API?</div><div>If not, I would like to lock down the C API rather sooner than later. We can fix the</div><div>implementation details of the stuff that happens behind the curtains in followup commits.</div><div><br></div><div>Thanks</div><div><br></div><div>Cheers,</div><div>Juergen</div><div><br></div><div><br><div><div>On May 7, 2014, at 1:30 PM, Juergen Ributzka <<a href="mailto:juergen@apple.com">juergen@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">ping :-)<div><br><div><div>On May 1, 2014, at 5:17 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">(just FYI, i'd like to bikeshed the names and details some, but i think this is close. will write more details as soon as i have time)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 1, 2014 at 4:42 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On 2014-May-01, at 15:07, Juergen Ributzka <<a href="mailto:juergen@apple.com">juergen@apple.com</a>> wrote:<br>
<br>
> Hi @ll,<br>
><br>
> I incorporated your suggestions into this patch. It extends the pass listener to also work with the new pass manager. There is some additional glue that can be removed<br>
> once we get rid of the legacy pass manager. The C API has been reworked to accommodate future changes and additions to the pass listener.<br>
><br>
> The callback function signature has changed to incorporate an opaque user defined value and abstracts the current pass and IR behind a pass invocation reference.<br>
> The invocation type specifies when this callback has been called. Currently this supports pre- and post-pass notification callbacks.<br>
><br>
> void (*LLVMPassListenerCallback)(void *Opaque, LLVMContextRef C, LLVMPassInvocationType T, LLVMPassInvocationRef P);<br>
><br>
> The pass invocation reference currently only supports one API - the pass name. This could be extended in the future to obtain the pass related IR, more pass related<br>
> information, etc.<br>
><br>
> Cheers,<br>
> Juergen<br>
><br>
</div></div>> <0001-PM-Extend-pass-listener-to-also-work-with-the-new-pa.patch><br>
<br>
I like the PassInvocation design.  I wasn't quite sure what you were<br>
planning here, but I think it solves the "what to pass back" problem<br>
quite neatly, giving us flexibility in the future to expand the API.<br>
<br>
This LGTM, with the following whitespace nitpick.<br>
<br>
> @@ -1618,12 +1618,15 @@ MPPassManager::runOnModule(Module &M) {<br>
><br>
>      initializeAnalysisImpl(MP);<br>
><br>
> +    M.getContext().notifyPassPreRunListeners(MP, &M);<br>
>      {<br>
>        PassManagerPrettyStackEntry X(MP, M);<br>
>        TimeRegion PassTimer(getPassTimer(MP));<br>
><br>
>        LocalChanged |= MP->runOnModule(M);<br>
>      }<br>
> +    M.getContext().notifyPassPostRunListeners(MP, &M);<br>
> +<br>
<br>
You inserted an extra newline here.<br>
<br>
><br>
>      Changed |= LocalChanged;<br>
>      if (LocalChanged)<br>
><br>
<br>
</blockquote></div><br></div>
</blockquote></div><br></div></div>
_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></div></body></html>