Does anaysis group only contain passes?

I found that ProfileInfo is contained in an analysis group, but ProfileInfo class itself is not derived from any base classes of passes, so it appears not to be a pass. Anything I missed here?

Thanks,
-Thomson

This is just a guess, but I suspect that the ProfileInfo class defines the interface which all passes in that analysis group are expected to implement. I think I’ve seen other analysis groups use this approach. – John T.

Thanks, John.

This sounds reasonable that the analysis group just provides an interface to its implementors (pass). Then I have another question, is it allowed to specify multiple pass in the same analysis group in the command line for opt? If yes, which pass will be used for the call of getAnaysis()?

-Thomson

Yes, you can do that. Using multiple analysis passes that belong to the same group may be useful when using chained analyses (like points-to analysis) in which one analysis tries to get a result and, if it can’t get as good a result as it likes, asks the next analysis in the chain (see ). I believe the chain is in reverse order. So if you specify opt -pass1 -pass2 -pass3 -transform, and transform queries the analysis group to which pass1, pass2, and pass3 belong, then pass3 is queried first. If pass3 then queries another pass in the analysis group, the query will be sent to pass2. Likewise, if pass2 queries another analysis in the group, it will be sent to pass1. – John T.

Thanks for your detail explanation. Just one more question, the chain of passes in an analysis group is implemented in PassManager and not in the specific pass, so any specific pass doesn’t assume there is any other passes in the same analysis group, is this right?

-Thomson