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: fix c/6344


On Mon, Apr 22, 2002 at 01:21:37PM -0700, Richard Henderson wrote:
> On Mon, Apr 22, 2002 at 04:05:01PM -0400, David Edelsohn wrote:
> > To implement something similar, I think we need to avoid creating
> > the TOC reference too early in rs6000_emit_move(), if I understand
> > your advice correctly.
> 
> Yes yes.  You wouldn't create the TOC reference until after reload.

David,
  Don't limit your changes to just sym refs.  Putting _anything_ into
the toc as early as we do loses optimisations.  I know you've seen
this one before, but others on the list haven't:

struct bitf {
  unsigned int a:1;
  unsigned int b:1;
  unsigned int c:1;
  unsigned int d:1;
};

void foo (struct bitf *x)
{
  x->a = 0;
  x->b = 0;
  x->c = 0;
  c->d = 0;
}

On powerpc64, the 64 bit masks used to clear the bit fields currently
go into the toc.  That results in cse not combining the single bit masks
into one mask covering four bits.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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