This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with your new SRA code


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]