<div dir="ltr">To control the size of the cache, why not just LRU it instead?<br>Limiting recursion depth seems like a really big hammer to use here.<div>Is there really no better way?</div><div><br><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 16, 2017 at 5:02 AM, Max Kazantsev via Phabricator via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mkazantsev created this revision.<br>
Herald added a subscriber: mzolotukhin.<br>
<br>
In <a href="https://reviews.llvm.org/rL300494" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>rL300494</a> there was an attempt to deal with excessive compile time on<br>
invocations of getSign/ZeroExtExpr using local caching. This approach only<br>
helps if we request the same SCEV multiple times throughout recursion. But<br>
in the bug PR33431 we see a case where we request different values all the time,<br>
so caching does not help and the size of the cache grows enormously.<br>
<br>
In this patch we remove the local cache for this methods and add the recursion<br>
depth limit instead, as we do for arithmetics. This gives us a guarantee that the<br>
invocation sequence is limited and reasonably short.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D34273" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D34273</a><br>
<br>
Files:<br>
  include/llvm/Analysis/<wbr>ScalarEvolution.h<br>
  lib/Analysis/ScalarEvolution.<wbr>cpp<br>
  lib/Transforms/Utils/<wbr>SimplifyIndVar.cpp<br>
  test/Analysis/ScalarEvolution/<wbr>limit-depth.ll<br>
<br>
<br>______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div></div></div>