This is the mail archive of the gcc-patches@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: [PATCH] Merge adjacent stores of constants (PR middle-end/22141)


On Thu, Nov 27, 2008 at 07:45:33AM -0800, Andrew Pinski wrote:
> On Thu, Nov 27, 2008 at 7:38 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> > This patch merges adjacent stores of constants into larger size
> > stores (up to wordsize, larger isn't IMNSHO beneficial).
> > The optimization is done as part of DSE1, eventhough it is just
> > related to DSE (in order to eliminate some stores, it first
> > appends a new larger store after them and then eliminates
> > 2 or more as dead stores), because DSE has all the infrastructure
> > and information needed for this optimization.
> 
> I think this fixes PR 23684 also ...

Yes, it does.

> Also I think there needs to be a check on STRICT_ALIGN, not just
> SLOW_UNALIGNED_ACCESS, I think.  Just in case SLOW_UNALIGNED_ACCESS is
> not defined to take into account STRICT_ALIGN.

#ifndef SLOW_UNALIGNED_ACCESS
#define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) STRICT_ALIGNMENT
#endif

was added to the top of dse.c.  This is the same approach that is
used in other parts of the compiler.  Defining SLOW_UNALIGNED_ACCESS
to non-1 on STRICT_ALIGNMENT is just a target bug.  Note that
only alpha, arm and rs6000 define SLOW_UNALIGNED_ACCESS, the former
to always 1 and rs6000 always returns 1 if STRICT_ALIGNMENT,
so no target is buggy that way.

	Jakub


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