<div dir="ltr"><div dir="ltr">On Mon, Feb 10, 2020 at 1:48 PM Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

  
  <div>
    <p><br>
    </p>
    <div>On 2/10/20 2:35 PM, Alina Sbirlea
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>Here's a tentative patch of the changes for this: <a href="https://reviews.llvm.org/D74353" target="_blank">D74353</a>.</div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>I suppose that, as expected, it's invalidated less often this
      way. Given that it's generally stateless, does this really
      represent a cost savings?</p>
    <p> -Hal</p></div></blockquote><div><br></div><div>I don't think there is a cost savings now, the current patch shouldn't have much or any impact. </div><div>But I think this can affect future infrastructure changes.</div><div>I got here by looking at MemCpyOpt, as part of a longer term goal of having the pass sequence [GVN, MemCpyOpt, DSE] use MemorySSA instead of MemDepAnalysis. Currently we're explicitly checking that, after MemCpyOpt, BasicAA is freed. This wouldn't make sense when using MemorySSA in all 3 passes, as we'd end up rebuilding MemorySSA due to invalidating BasicAA.</div><div>I kept the changes needed to MemCpyOpt to preserve passes separate from this discussion.</div><div>Does this clarify some of the motivation?</div><div><br></div><div>Alina</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>
    </p>
    <p><br>
    </p>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thank you,</div>
        <div>Alina</div>
        <div><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Feb 10, 2020 at 11:34
          AM Alina Sbirlea <<a href="mailto:alina.sbirlea@gmail.com" target="_blank">alina.sbirlea@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div>Hi,<br>
            </div>
            <div><br>
            </div>
            <div>I'd like to understand if it makes sense to keep
              BasicAA as a not CFG-only pass, or if it can be updated to
              CFG-only. The change was made in <a href="https://reviews.llvm.org/D44564" target="_blank">D44564</a>.</div>
            <div><br>
            </div>
            <div>From what I gathered the motivation was <span>PhiValuesAnalysis
                not being properly updated, and BasicAA having an
                instance of it. </span></div>
            <div><span>PhiValuesAnalysis
                now uses callback values to invalidate deleted values (</span><a href="https://reviews.llvm.org/rL340613" target="_blank">r340613</a>),<span> </span><span>PhiValuesAnalysis
                is also being updated in MemDepAnalysis (</span><a href="https://reviews.llvm.org/D48489" target="_blank">D48489</a>) <span>and BasicAA is
                invalidated if </span><span>PhiValuesAnalysis
                gets invalidated.</span></div>
            <div><span><br>
              </span></div>
            <div><span>I
                may not have the full context here, so I'd like some
                feedback: does it make sense to make BasicAA a CFG-only
                pass again?</span></div>
            <div><span><br>
              </span></div>
            <div><span>Thank
                you,</span></div>
            <div><span>Alina</span></div>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </div>

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