<div dir="ltr"><div class="gmail_extra"><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"><br>
================<br>
Comment at: lib/Transforms/Scalar/LICM.<wbr>cpp:1650<br>
+ // if the Source is a combination of liveOnEntry and<br>
+ // volatile loads (treated as Defs), it's not invalidated.<br>
+ SmallPtrSet<MemoryAccess *, 4> Processed;<br>
----------------<br>
This seems fishy -- if `volatile` loads do not invalidate pointers then why are they treated as defs by MSSA?<br>
<br></blockquote><div>We've gone back and forth on this as to whether volatile loads should be defs or not.</div><div><br></div><div>We don't represent ordering chains separately from memory chains.</div><div><br></div><div>" // The isOrdered check is used to ensure that volatiles end up as defs</div><div> // (atomics end up as ModRef right now anyway). Until we separate the</div><div> // ordering chain from the memory chain, this enables people to see at least</div><div> // some relative ordering to volatiles. Note that getClobberingMemoryAccess</div><div> // will still give an answer that bypasses other volatile loads. TODO:</div><div> // Separate memory aliasing and ordering into two different chains so that we</div><div> // can precisely represent both "what memory will this read/write/is clobbered</div><div> // by" and "what instructions can I move this past". "</div><div><div>bool Def = bool(ModRef & MRI_Mod) || isOrdered(I);</div><div> bool Use = bool(ModRef & MRI_Ref);</div><br></div></div></div></div>