This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pr14627
On Wed, 2005-04-13 at 02:25, Steven Bosscher wrote:
> On Wednesday 13 April 2005 06:28, Jeffrey A Law wrote:
> > This patch implements an const/copy unpropagation pass.
>
> FYI this pass was discussed in a long conversation on IRC a couple
> of days ago. This came up because not only DOM, but also VRP can
> cause this problem. The fundamental problem appears to be that we
> allow constants as PHI arguments. When DOM was the only working
> SSA pass, perhaps doing this made a lot of sense. But now, we need
> this kind of passes to undo the damage later on. Perhaps it still
> is easier to just allow only SSA names as PHI arguments, and look
> at their SSA_NAME_VALUE if you want to know the value of the PHI
> argument. That would make your pass unnecessary.
>
The fundamental problem *appears* to be constants as phi arguments.
Now that we have various value propagators and stuff available that we
didn't have "back in the day", someone can revisit what happens if we
remove constants in PHI nodes. If the same information is now easily
available to optimizations that constants-in-PHI-nodes provides, then
that would be a preferable solution I would think.
Sounds like an excellent mini project for someone :-)
Andrew