This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Minor SSA cleanups
- To: law at redhat dot com
- Subject: Re: Minor SSA cleanups
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: 19 Jun 2001 23:37:30 -0400
- Cc: gcc-patches at gcc dot gnu dot org
- References: <7969.992969276@localhost.localdomain>
Jeffrey A Law <law@localhost.localdomain> writes:
> We want remove_phi_alternative to have external scope so that SSA optimizers
> 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)
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.
So we crash when we attempt to GET_CODE the pattern, which is NULL.
> 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, ....
--
"Everywhere is walking distance if you have the time.
"-Steven Wright