<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02/01/2016 12:48 PM, David Blaikie
wrote:<br>
</div>
<blockquote
cite="mid:CAENS6Evmx1XxoHpyWuQJkv3m5Q3gkBtWe++8JQpQ80ONN9pDqA@mail.gmail.com"
type="cite">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>
<div class="h5">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0
0 .8ex;border-left:1px #ccc
solid;padding-left:1ex"><br>
</blockquote>
<div><br>
</div>
<div>Why not just drop the Success variable
entirely and return from here:<br>
<br>
if (!collectUsesWithPtrTypes(...))<br>
return false<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
Return here is what I tried first, but this breaks some cases
due to the !isPointerTy check above. Call users without
pointer types would then fall through and incorrectly be
changed. </div>
</blockquote>
<div><br>
</div>
<div>Sorry, couldn't really follow... the original code would
return false if collectUsesWithPtrTypes ever returns false,
right? Were there side effects that were desired after that
point?</div>
</blockquote>
<br>
collectUsesWithPtrTypes should only be called with a pointer type
value. Assuming there is an intrinsic call that uses a pointer and
returns an integer for example, the
User->getType()->isPointerTy() check will cause the call user
to not be added to the worklist, because we do not want to have
non-pointers in the worklist. I should probably just add another
pointer check under the call handling so it stops falling through to
here.<br>
</body>
</html>