[PATCH][PM] Add pass run listeners to the pass manager.

Andrew Trick atrick at apple.com
Tue Apr 29 11:55:41 PDT 2014


On Apr 29, 2014, at 11:39 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:

> 
> On 2014-Apr-28, at 16:08, Chandler Carruth <chandlerc at google.com> wrote:
> 
>> First and foremost, I'm extremely concerned about baking the Pass type into the C API. The on-going work to change how the pass manager works at a fundamental level is going to run completely afoul of this.
> 
> This is clearly important.

I don’t understand the issue at all.

>> I would really like to keep this out of the C API which we have to be backwards compatible with until the pass manager work settles down. If we don't, the entire thing is going to be really challenging to make progress on.
> 
> If I understand correctly, all that's been exposed in the C API here is
> that there is a type for a Pass, and that there's a way to get a name
> from a Pass.
> 
> In the new API, are we not going to have a Pass base class?  Or am I
> missing something else?  (Sorry if this is obvious; I haven't spent the
> time to grok the new design yet.)

Exactly. The C API should be totally independent of PassManager implementation. If we need to to hold up a useful C API because of PassManager changes, then something is wrong with the API—but I’m not sure what that is.

>> Third, don't you want to pass the unit of IR which the pass manager just ran to the callback? I don't actually see how to do anything useful with real passes here if you don't know *which* function the pass just ran over... But maybe I missed something in speed reading the patch.
> 
> I think Juergen's updated patch (after Andy's review) addressed this
> point.

Yep. I think Juergen’s patch is doing what Chandler wants.

-Andy



More information about the llvm-commits mailing list