This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH for CSE
- To: mark at markmitchell dot com
- Subject: Re: PATCH for CSE
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 03 Jul 1998 00:07:58 -0600
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199807012334.QAA25625@smtp.earthlink.net>you write:
>
> Here's a patch that improves execution time by a factor of three, for
> one loop I've been looking at. It reduces instruction count by a
> similar factor, partly by enabling other optimizations.
>
> When we had something like:
>
> (SET (REG 1) (ADDRESSOF (REG 2)))
>
> (SET (MEM (REG 1)) (REG 3))
>
> CSE's find_best_addr decided that REG1 was a great address because it
> was already in a register, and (ADDRESSOF (REG 2))) was lousy because
> it had a higer ADDRESS_COST. This patch introduces a new macro, for
> use only in CSE because after that point ADDRESSOFs are purged, which
> favors (ADDRESSOF (REG)). That allows other mechanisms in CSE to
> simplify (MEM (ADDRESSOF (REG 2))) to just plain REG 2.
>
> Jeff, OK?
I think this patch is basically OK once your CSE ADDRESSOF bugfix patch is
applied.
I believe I mentioned eariler, you need to provide a definition of
CSE_ADDRESS_COST when ADDRESS_COST is not defined.
Jeff