<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 22, 2014 at 12:18 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">> And I think<br>
> that we should clearly DCE *completely dead* sub-graphs that are<br>
> being kept alive solely due to the assumption.<br>
<br>
</div>I suppose the real question is: what does completely dead mean? If I have:<br>
<br>
int a;<br>
void foo() {<br>
  __builtin_assume(a == 5);<br>
}<br>
<br>
is this completely dead? I would say no so long as foo() could be inlined anywhere.<br></blockquote></div><br></div><div class="gmail_extra">Only dead if 'a' has no other users.</div><div class="gmail_extra"><br>
</div><div class="gmail_extra">I'm defining dead as an SSA subgraph where the only sinks (uses which have "side-effects" or otherwise can't be removed) are the assumptions. I think this is sufficiently conservative to remove assumptions from true dead code regions and prevent them from keeping control flow alive without sacrificing optimization opportunities.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">-Chandler</div></div>