<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Dec 15, 2007, at 1:23 AM, Christopher Lamb wrote:</div><blockquote type="cite"><div><div>On Dec 14, 2007, at 10:40 AM, Bill Wendling wrote:</div><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">My understanding of a side effect is when an instruction has</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">un-modeled effects. For instance, "emms" on X86 has side effects that</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">aren't modeled in the instruction pattern<span class="Apple-converted-space">  </span>-- it resets the FP</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">registers after MMX use. Other instructions have no un-modeled side</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">effects -- e.g., "xor" on X86 or "li" on PPC. Others may have</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">un-modeled side effects in some situations, but not in others -- e.g.,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">loads, in general, have side effects (accessing memory), but loads</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">from a constant pool don't.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">This is the working definition, anyway. In the beginning, it'll be</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">closely tied to what the "isRematerializable" flag means. I don't know</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">what GCC considers side effects. Could you give a summary? It would be</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">good to contrast/compare with it.</div></blockquote></div><div><br></div>In processor design discussions all load instructions were termed "side affecting", as they could cause a page fault. Perhaps the key here is whether the un-modeled effects of the instruction affect correct program behavior?<div><br></div><div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div></div></span></span></div></div></blockquote>That is the key, yes. :-) We'll leave it up to the individual back ends to tell us if moving instructions marked as "may having side effects" affects correct program behavior.</div><br><div>-bw</div></body></html>