<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 6/25/12 8:55 PM, Thomson wrote:<br>
    </div>
    <blockquote
cite="mid:CAPvC9U5WNjKuQ079WqTxX8HV5F6mK2QOZK_ExxALrUHbZj-+zQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <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>
    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 class="moz-txt-link-freetext" href="http://llvm.org/docs/WritingAnLLVMPass.html#AU::addRequired">http://llvm.org/docs/WritingAnLLVMPass.html#AU::addRequired</a>).<br>
    <br>
    <blockquote
cite="mid:CAPvC9U5WNjKuQ079WqTxX8HV5F6mK2QOZK_ExxALrUHbZj-+zQ@mail.gmail.com"
      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>
    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.<br>
    <br>
    <blockquote
cite="mid:CAPvC9U5WNjKuQ079WqTxX8HV5F6mK2QOZK_ExxALrUHbZj-+zQ@mail.gmail.com"
      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 moz-do-not-send="true"
              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/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 moz-do-not-send="true" href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a moz-do-not-send="true" href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a>
<a moz-do-not-send="true" 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>
  </body>
</html>