<div dir="ltr">Hi Hal,<div><br></div><div>Thanks for your reply. I thought that Verifier does not modify the IR, that's why I said that printing the IR after the Verifier was not worth it. However, this is a problem for DebugifyEach. In a nutshell, DebugifyEach has 2 parts: it first inserts synthetic debug info to the IR, so it creates a DICompileUnit, DILocations, DIVariables, and so on.... Then the pass to be debugified gets executed, and finally comes the second part of DebugifyEach, which verifies the inserted debug info, dumps the statistics, and removes these debug info. The problem is, Verifier registers the DICompileUnit in run(), then checks if the DICompileUnit is still there in doFinalization(). Unfortunately, the second part of DebugifyEach already removed that DICompileUnit...</div><div><br></div><div>If this is only a problem for DebugifyEach, I can handle Verifier specially. But as Matt points out, it is quite annoying to print the IR out after Verifier, which most of the time do not modify the IR at all.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Son Tuan Vu</div></div></div>
<br><div class="gmail_quote">On Thu, Jul 12, 2018 at 5:25 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span class="">
    <br>
    <div class="m_-743581501542688445moz-cite-prefix">On 07/12/2018 10:19 AM, Son Tuan VU via
      llvm-dev wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hello all,
        <div><br>
        </div>
        <div>I came across the code of Verifier, and see that it doesn't
          modify the IR at all. Why it is not considered as an analysis
          pass?</div>
      </div>
    </blockquote>
    <br></span>
    It does not analyze the IR for the use of other transformations or
    analysis passes. It does, in a sense, transform the IR: Either it
    does nothing, or, it deletes it all.<span class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Actually, this will have impact on debugify-each and
          print-before/after-all: we are not supposed to print/debugify
          Verifier pass, but since Verifier is declared as a
          transformation (well, a non-analysis) pass, we actually do
          print/debugify it.</div>
      </div>
    </blockquote>
    <br></span>
    Why is printing the IR before the verifier undesirable? It seems
    desirable to me.<br>
    <br>
     -Hal<br>
    <br>
    <blockquote type="cite"><span class="">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thanks for your help!</div>
        <div><br clear="all">
          <div>
            <div class="m_-743581501542688445gmail_signature" data-smartmail="gmail_signature">
              <div dir="ltr">Son Tuan Vu</div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="m_-743581501542688445mimeAttachmentHeader"></fieldset>
      <br>
      </span><pre>______________________________<wbr>_________________
LLVM Developers mailing list
<a class="m_-743581501542688445moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="m_-743581501542688445moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre class="m_-743581501542688445moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </font></span></div>

</blockquote></div><br></div>