<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 15, 2017 at 12:02 PM, Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
On Sun, Jan 15, 2017 at 11:46 AM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org">dberlin@dberlin.org</a>> wrote:<br>
> FWIW: I agree.<br>
> But i'd go farther.<br>
> I think at this point, ->hasSideEffects (or ->sideEffects) may just want to<br>
> return a mask, so that the above just becomes<br>
><br>
> ->sideEffects & (MayWrite | MayRead | MayThrow)<br>
><br>
> or whatever nice version we want.<br>
<br>
</span>Yes, that's a good idea.  I suspect we'll still want to keep things<br>
like mayRead() and mayThrow(), since it would be tedious to have to<br>
write<br>
<br>
 -> sideEffects() & Instruction::MayThrow<br></blockquote><div><br></div><div>Sure. I'm mainly concerned with the places we are starting to test like 30 things :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
when we care about just one single thing, but I like the idea.<br></blockquote><div>Yup.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I'm not sure about the name though -- generally, most people would not<br>
say MayRead is a side-effect.  I was thinking of something like<br>
"implicitBehavior()", since this really is an enum of things that an<br>
instruction can do that are not explicitly specified in SSA / CFG.<br></blockquote><div><br></div><div> </div><div>Yes. I think "side effects" is already way too overloaded :)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
One thing though: let's not stall this set of patches on solving that<br>
other problem. :)<br></blockquote><div><br></div><div>Sure</div><div><br></div></div></div></div>