<font face="verdana,sans-serif">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?</font><div>
<font face="verdana,sans-serif"><br></font></div><div><font face="verdana,sans-serif">-Thomson<br></font><br><div class="gmail_quote">On Tue, Jun 26, 2012 at 10:33 PM, John Criswell <span dir="ltr"><<a href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
<div>On 6/25/12 8:55 PM, Thomson wrote:<br>
</div>
<blockquote type="cite">
<font face="verdana,sans-serif">Thanks, John.</font>
<div><font face="verdana,sans-serif"><br>
</font></div>
<div><font face="verdana,sans-serif">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?</font></div>
</blockquote>
<br></div>
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
<a href="http://llvm.org/docs/WritingAnLLVMPass.html#AU::addRequired" target="_blank">http://llvm.org/docs/WritingAnLLVMPass.html#AU::addRequired</a>).<div class="im"><br>
<br>
<blockquote type="cite">
<div><font face="verdana,sans-serif"> If yes, which pass will be
used for the call of getAnaysis<AnalysisGroup>()?</font></div>
</blockquote>
<br></div>
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.<br>
<br>
-- John T.<div class="im"><br>
<br>
<blockquote type="cite">
<div><font face="verdana,sans-serif"><br>
</font></div>
<div><font face="verdana,sans-serif">-Thomson<br>
</font><br>
<div class="gmail_quote">On Mon, Jun 25, 2012 at 10:34 PM, John
Criswell <span dir="ltr"><<a href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>
<div>On 6/24/12 10:37 AM, Thomson wrote:<br>
</div>
<blockquote type="cite"> <font face="verdana,sans-serif">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?</font></blockquote>
<br>
</div>
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.<br>
<br>
-- John T.<br>
<br>
<blockquote type="cite">
<div> <font face="verdana,sans-serif"><br>
</font></div>
<div><font face="verdana,sans-serif">Thanks,</font></div>
<div><font face="verdana,sans-serif">-Thomson</font></div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<br>
</div></div>
</blockquote></div><br></div>