[PATCH] D22305: [BasicAA] Strip phi nodes, when all incoming values are the same.

Ehsan A Amiri via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 13:34:00 PDT 2016


So I will first experiment with (3). If we don't like the outcome, then we
can experiment with (2) to see how feasible is that.

Daniel: Thanks for the response to my question.  But now I need to ask two
more question to understand things:

As mentioned, in your testcase, there is another bug here.  Remember  that
GVN iterates until things stop changing. So *the first gvn pass* should
have never left the IR with that redundant PHI node in the first place.

1- IIUC, we are saying that at the end of one GVN iteration, the IR should
satisfy some properties. Is it possible to describe this properties?
2- I suspect that the "other bug" that you are talking about is a GVN bug.
Could you elaborate on that if this is correct? IIRC from my debugging, the
redundant phi node was created and deleted in iteration 0 of GVN. It was
just that cache issue that happened between the creation and deletion of
redundant phi node that caused this....

Thanks
Ehsan





From:	Daniel Berlin <dberlin at dberlin.org>
To:	Hal Finkel <hfinkel at anl.gov>
Cc:	llvm-commits <llvm-commits at lists.llvm.org>, reviews+D22305
            +public+92ca108e50bc4651 at reviews.llvm.org, Ehsan A
            Amiri/Toronto/IBM at IBMCA
Date:	07/15/2016 04:08 PM
Subject:	Re: [PATCH] D22305: [BasicAA] Strip phi nodes, when all
            incoming values are the same.





    Or do we need (2) because in general this kind of phi node is seen in
    many programs? Or something else that I do not see....



  That is hal's view.
  My view was that we should measure the impact of the change and then
  decide; but that if we have a use case for it, I'd rather it be inside
  the generic utility than a specific work-around in BasicAA.

Yes, sorry, was writing quickly, did not mean to imply anything else ;)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160715/07b06b26/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160715/07b06b26/attachment.gif>


More information about the llvm-commits mailing list