<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 5, 2017 at 9:25 PM, Adam Nemet <span dir="ltr"><<a href="mailto:anemet@apple.com" target="_blank">anemet@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class="gmail-"><blockquote type="cite"><div>On May 5, 2017, at 8:49 AM, Hal Finkel <<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>> wrote:</div><br class="gmail-m_6777112034182856035Apple-interchange-newline"><div>
  
    
  
  <div bgcolor="#FFFFFF"><p><br>
    </p>
    <br>
    <div class="gmail-m_6777112034182856035moz-cite-prefix">On 05/05/2017 10:44 AM, vivek pandya
      via llvm-dev wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hello LLVM Devs,
        <div><br>
        </div>
        <div>I have an idea to improve effectiveness of IR dump with
          -emit-after-all based on Adam Nemet's 2016 LLVM Dev
          presentation.</div>
        <div>I think we can track changes in each function, basic block
          and instructions by dumping it to YAML files (initially) then
          track changes done by each pass incrementally as it is done in
          optimization remark emitter. Once we have required information
          in YAML files we can present it in much readable way (similar
          to diff ) through HTML technologies.</div>
      </div>
    </blockquote>
    <br>
    I think this sounds useful.<br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>I think we can track chances in each entities by giving
          them a unique number and that will also map to HTML
          presentation layer.</div>
        <div>However I have not thought if existing ORE framework can be
          used or not for this purpose.</div>
      </div>
    </blockquote>
    <br>
    I think that we can use ORE for this; I think you'll need some
    infrastructure improvement so that we can emit the remarks from the
    pass managers but not pay the cost of serializing the IR unless
    something is going to use the information.<br></div></div></blockquote><div><br></div></span><div>That is a general feature we just have to have for other remarks too that are expensive to construct.  See <a href="https://bugs.llvm.org/show_bug.cgi?id=32352" target="_blank">https://bugs.llvm.org/<wbr>show_bug.cgi?id=32352</a>.</div><div><br></div><div>Vivek, feel free to grab this if you want to work on it.  I can describe the current situation and we can discuss the design in the PR.</div><div><br></div></div></div></blockquote><div>Hi Adam,</div><div><br></div><div>I looked into code related to above feature request and perhaps I am not yet clear about this. </div><div>I have tried out following things:</div><div><br></div><div>1) allowExtraAnalysis function will have a string parameter which is pass name.</div><div><br></div><div>2) Find an appropriate entry point in Clang where we can make a shared_ptr for </div><div>OptimizationRemarkPattern, OptimizationRemarkAnalysisPattern in LLVMContext class.</div><div><br></div><div>3) Use above changes so that allowExtraAnalysis can be used to check if specific</div><div>remark is on or not.</div><div><br></div><div>However I am confused because there is one more class DiagnosticInfo in LLVM which handles same thing for opt's flags, but why those informations are not used in allowExtraAnalysis() ? Have I understood the purpose of allowExtraAnalysis or not ?</div><div><br></div><div>Please guide here.</div><div><br></div><div>Sincerely,</div><div>Vivek</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div></div><div>Thanks,</div><div>Adam</div><span class="gmail-"><br><blockquote type="cite"><div><div bgcolor="#FFFFFF">
    <br>
     -Hal<br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div> But if community thinks this is useful then I would like
          to work on this.</div>
        <div>Also suggest if you can find any problem with this
          approach.</div>
        <div><br>
        </div>
        <div>Sincerely,</div>
        <div>Vivek</div>
      </div>
      <br>
      <fieldset class="gmail-m_6777112034182856035mimeAttachmentHeader"></fieldset>
      <br>
      <pre>______________________________<wbr>_________________
LLVM Developers mailing list
<a class="gmail-m_6777112034182856035moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="gmail-m_6777112034182856035moz-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>
</pre>
    </blockquote>
    <br>
    <pre class="gmail-m_6777112034182856035moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </div>

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