<div dir="ltr">This is the nature of may-def which does not strongly kills the previous potential def of the same memory loc. That is why each may def also has an implicit may-use to form factored def-def chain. Without that, memory consumption will large for memory SSA -- N may-defs followed by M real may-uses will result in MxN def-use chains.<div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 25, 2015 at 11:05 AM, James Molloy <span dir="ltr"><<a href="mailto:james.molloy@arm.com" target="_blank">james.molloy@arm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Daniel,<br>
<br>
One inline comment about the design. Sorry for the naiveity.<br>
<br>
Cheers,<br>
<br>
James<br>
<br>
<br>
================<br>
Comment at: include/llvm/Transforms/Utils/MemorySSA.h:150<br>
@@ +149,3 @@<br>
+// All defs also have a use<br>
+class MemoryDef : public MemoryUse {<br>
+public:<br>
----------------<br>
I don't understand this: Firstly, why must all defs have a use? We can store without loading the resulting value back.<br>
<br>
Secondly, you've used inheritance which is an "is-a" relationship. Is there something fundamental I'm missing here?<br>
<span class="im HOEnZb"><br>
<a href="http://reviews.llvm.org/D7864" target="_blank">http://reviews.llvm.org/D7864</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
<br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>