This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with your new SRA code
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 1 Jul 2004 15:39:25 -0700
- Subject: Re: Problem with your new SRA code
- References: <10407012234.AA29114@vlsi1.ultra.nyu.edu>
On Thu, Jul 01, 2004 at 06:34:29PM -0400, Richard Kenner wrote:
> Hoever, does this disable scalarization any time a non-constant index
> is found?
Yes.
> If so, I think that's overly pessimistic.
[...]
> I can't tell if that's what this code does or not.
/* Non-constant index means any member may be accessed. Prevent the
expression from being scalarized. If we were to treat this as a
reference to the whole array, we can wind up with a single dynamic
index reference inside a loop being overridden by several constant
index references during loop setup. It's possible that this could
be avoided by using dynamic usage counts based on BB trip counts
(based on loop analysis or profiling), but that hardly seems worth
the effort. */
Basically, I don't think there's enough win to be had worrying about it,
and it's *much* easier to lose with arrays.
r~