This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] moving phi nodes?
- From: law at redhat dot com
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 17 Nov 2003 09:35:44 -0700
- Subject: Re: [tree-ssa] moving phi nodes?
- Reply-to: law at redhat dot com
In message <20031116062517.GA2111@redhat.com>, Richard Henderson writes:
>One jump threading case that we're currently missing, sorely,
>is of the form:
>
>int foo(int p, int q)
>{
> int i = 0;
> if (p)
> i = q;
> if (i != 0)
> bar ();
> return i;
>}
[ ... ]
>Moving the PHI node is non-trivial. Anyone know of a way to do it that
>doesn't require just dropping all the SSA names and starting over? Do
>we have any other gimple pass planned or desired that would take care
>of this as a side effect?
>
>Incidentally, this optimization is performed by the rtl .14.bypass
>gcse pass.
I would expect this to be caught by the jump threading improvements I'm
working on. Maybe not the first couple iterations, but it's the kind of
thing I do expect to handle.
Jeff