<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 Jun 12, 2015, at 1:51 PM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org" class="">dberlin@dberlin.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">So, you can't have disjoint sets, and have one of set that says "i<br class="">access everything". Because it would contain everything :)<br class=""><br class="">Thus, I assume by your description you meant "we want to maintain<br class="">multiple disjoint partitions of the same set of accesses" (which is<br class="">not quite the same as just having one special partition).<br class=""><br class="">When one partition is a refinement of the other (as should be the case<br class="">here), this is known as the nested set union problem, and in fact,<br class="">some very recent research was done into it:<br class=""><br class=""><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cs.princeton.edu_-7Edhlarkin_papers_esa14-2Dnested-2Dset-2Dunion.pdf&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=Bz9BparW2HtHpIjDyCaGs7eY0ccoAIwB2aiaxD2GT1o&s=SWX6suRG3pp2KKiOXocHU1NJIdNQ1QrZ9rtrcEkBxZU&e=" class="">http://www.cs.princeton.edu/~dhlarkin/papers/esa14-nested-set-union.pdf</a><br class=""></div></div></blockquote><div><br class=""></div><div>I’m suggesting that the tracker have a special set that is not included in the partition and assumed to alias with everything in the partition. So we would have a partition over the subset of memory accesses that are actually interesting. All the sets in that partition are disjoint. The set outside of the partition is not. Every time you query for aliasing, you need to check if one of the accesses is in the special set.</div><div><br class=""></div><div>Andy</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">On Fri, Jun 12, 2015 at 1:00 PM, Andrew Trick <<a href="mailto:atrick@apple.com" class="">atrick@apple.com</a>> wrote:<br class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class="">On Apr 27, 2015, at 3:44 PM, Sanjoy Das <<a href="mailto:sanjoy@playingwithpointers.com" class="">sanjoy@playingwithpointers.com</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">Can you explain why the alias sets are collapsed into one here?<br class=""></blockquote><br class="">If I'm reading the code correctly, it is because the readonly call<br class="">aliases all of %a, %b and %c. Since two pointers can be in two<br class="">different alias sets only if they do not alias, %a has to be in the<br class="">same alias set as the read only call and so does %b and %c.<br class="">Therefore, all of them have to be in the same alias set.<br class=""><br class=""><blockquote type="cite" class="">Can that collapsing simply be avoided for read-only calls without creating a second alias set?<br class=""></blockquote><br class="">I have not yet come up with a simple scheme to solve that problem<br class="">within AliasSetTracker. Obviously, that does not mean that there<br class="">isn't one.<br class=""></blockquote><br class="">I never saw a good conclusion to this thread. Clearly, collapsing all of the alias sets whenever the loop contains a call with “AnyWhere” ModRef behavior is not an effective design. AliasSet partitions need to remain disjoint, but that doesn’t mean all memory access needs to be partitioned. There should be one special set of accesses that simply alias with everything without causing the partitions to collapse. I haven’t thought through how to make this change with our AliasSetTracker API though.<br class=""><br class="">Andy<br class=""></blockquote></div></div></blockquote></div><br class=""></body></html>