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: should MEM tracking be able to optimize this?


Richard Kenner <kenner@vlsi1.ultra.nyu.edu> writes:

        Or it's not considered to be worth the effort? 
    
    It's a hard problem because there's a limit to what you can keep track of.
    It's not clear it's common enough to be worth the effort.

I think this type of code might be used in the image processing
world. They pass around pointers to structures containing arrays. 

Code like this also exhibits the problem:

struct mystruct{
  float f[2048];
  float p[2048];
  float q[2048];
  float d[2048];
};

void
calc4 (struct mystruct *C)
{
  int i;
  for (i = 0; i < 1024; ++i) {
    C->f[i]  = C->p[i] + C->q[i];
    C->d[i]  = C->p[i] + C->q[i]; 
    C->f[i]  = C->f[i] + C->p[i] + C->q[i];
  }
}


Would it be possible to put the fields in different alias sets at
tree->rtl conversion time (or whenever the alias sets are first
computed), as we should know they don't overlap?


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