This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 32919 - value numbering versus computed goto
On Wed, Aug 01, 2007 at 12:33:35PM -0400, Daniel Berlin wrote:
> This is fine.
>
> It may actually be easier to simply initialize them all to their own
> values in init_sccvn (where we init them to VN_TOP), and mark them
> visited (IE VN_INFO (name)->visited = true).
>
> This would prevent them from ever being visited in the first place,
> and will also stop it from needing to iterate for abnormal phis (IE
> because the value will have been vn_top, and is now not, it will
> consider it changed)
>
> However, from a correctness perspective, what you have done below will
> work fine as well, so if you don't want to do the above, just throw a
> todo comment and i'll get to it in a week or so.
Thanks! I added this:
/* TODO: We could check for this in init_sccvn, and replace this
with a gcc_assert. */
--
Daniel Jacobowitz
CodeSourcery