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: GCC Status Report (2004-03-09)


On Thu, Mar 11, 2004 at 10:52:44AM +0100, Eric Botcazou wrote:
> So we may end up with a record that contains some read-only fields, has been 
> wholly cleared and is indirectly assigned.  In this case again, we have a 
> memory write without the /u flag followed by a memory write with the /u 
> flag.  Richard Kenner fixed that on the 3.4 branch *before* Jakub's patch by 
> putting the /u flag during the clearing optimization in store_constructor:

But I've reverted my patch on 3.4 branch and the trunk (after changing
i386 backend to honor /u in stringops).

BTW, there is one optimization which we perhaps could do.  People often
write:
void foo (void)
{
  const char bar[16] = { 0x80 };
  baz (bar);
}
which could be optimized into:
void foo (void)
{
  static const char bar[16] = { 0x80 };
  baz (bar);
}

Then we can get rid of the runtime initialization altogether.
This could be done either if the whole aggregate is const, or if all fields
are const.

	Jakub


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