[PATCH] Check for all known bits on ret in InstCombine
Chandler Carruth
chandlerc at google.com
Tue Jul 22 12:41:56 PDT 2014
On Tue, Jul 22, 2014 at 12:18 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> > And I think
> > that we should clearly DCE *completely dead* sub-graphs that are
> > being kept alive solely due to the assumption.
>
> I suppose the real question is: what does completely dead mean? If I have:
>
> int a;
> void foo() {
> __builtin_assume(a == 5);
> }
>
> is this completely dead? I would say no so long as foo() could be inlined
> anywhere.
>
Only dead if 'a' has no other users.
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.
-Chandler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140722/119a6e95/attachment.html>
More information about the llvm-commits
mailing list