<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 24, 2017, at 11:59 AM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" class="">chandlerc@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Jan 24, 2017 at 8:19 AM Mehdi Amini via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">Another view of it is that there should be another handle that triggers the invalidation of the analysis when this IR is changed: i.e. keeping the analysis cached while it holds a reference to the IR can be seen as the problem.</div></div></div></blockquote><div class=""><br class=""></div><div class="">The issue is only with Asserting VH, not with other kinds of value handles though. So with those, we would have different invalidation in NDEBUG from !NDEBUG? Or would you always do this invalidation?</div></div></div></div></blockquote><div><br class=""></div><div>Not sure why would the invalidation be different? If you have an AssertingVH in your analysis, you need a mechanism to invalidate it before the assertion fires. But that invalidation needs to happens both in NDEBUG and !NDEBUG consistently (even if there wouldn’t be an assertion in NDEBUG mode if this is violated) .</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class="">I guess I'm not too clear what the concrete approach here would be.</div></div></div>
</div></blockquote></div><br class=""><div class=""><div>I should have mentioned that I didn’t give much thought about a concrete plan, it was more an abstract view on the semantic of holding AssertingVH. </div></div><div>Deciding that AssertingVH is the wrong semantic for a given analysis can be OK (I believe this is what you did right?), and there might not be any practical alternative (to provide invalidation on the fly when IR is deleted).</div><div><br class=""></div><div>— </div><div>Mehdi</div><div><br class=""></div></body></html>