This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Constant propagation and strength reduction
- From: Dale Johannesen <dalej at apple dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, Roger Sayle <roger at www dot eyesopen dot com>, Neil Booth <neil at daikokuya dot co dot uk>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 21 Jan 2003 10:27:23 -0800
- Subject: Re: Constant propagation and strength reduction
On Tuesday, January 21, 2003, at 10:22 AM, David Edelsohn wrote:
Roger Sayle writes:
Roger> The problem is that currently GCC doesn't perform any form of
Roger> constant propagation at the tree-level. The only
transformations
Roger> performed by fold work on a single statement at a time.
Roger> The good news is that this should be fixed by the new SSA passes
Roger> once they come online.
Roger> I'll also look into fixing this at the simplify-rtx level. If
Roger> enough of the expand_divmod code is generic enough, we should be
Roger> re-use it, should CSE/GCSE or similar propagate a constant into
Roger> the division.
There already was a proposal to retry the divmod case later that
was rejected, mentioning that this will be fixed by Tree-SSA. I tend
to
agree that duplicating the code is the wrong design.
That was mine I think; basically cprop_insn calls back into
expand_divmod.
I can resubmit this patch if anyone's interested.