This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Minor SSA cleanups
- To: Daniel Berlin <dan at cgsoftware dot com>
- Subject: Re: Minor SSA cleanups
- From: law at redhat dot com
- Date: Tue, 19 Jun 2001 20:46:06 -0700
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <871yof95z9.fsf@cgsoftware.com>you write:
> Jeffrey A Law <law@localhost.localdomain> writes:
>
> > We want remove_phi_alternative to have external scope so that SSA optimiz
> ers
> > which remove unexecutable edges can also remove phi alternatives.
> Weird.
> You seem to be doing exactly the same patches I did.
>
> I also global scoped phi_alternative.
>
> The other change to ssa.c I have is:
>
> *************** mark_phi_and_copy_regs (phi_set)
> *** 1959,1964 ****
> --- 1995,2002 ----
> if (insn == NULL)
> continue;
> pattern = PATTERN (insn);
> + if (!pattern)
> + continue;
> /* Sometimes we get PARALLEL insns. These aren't phi nodes or
> copies. */
> if (GET_CODE (pattern) != SET)
I don't think you want/need this. This should be caught further upstream.
> Since the SSA definition array isn't kept in sync after each pass, if
> you've removed a register, the insn in the ssa_defs isn't necessarily
> an INSN anymore. But it won't be NULL. It could be a deleted NOTE or
> something weird.
It should be a NOTE_INSN_DELETED. Anything else indicates a bug elsewhere.
> > We're
> > also going to be changing the PHI nodes to record block pointers rather
> > than block indices (but that'll be a separate patch).
>
> Why *do* we have block indices or pointers at all there?
> They seem unecessary, especially given that a register can only have
> one def. So to figure out what block it came from, ....
It's significantly simpler to just record where it came from when you
generate the PHI node.
jeff