should MEM tracking be able to optimize this?
Dan Nicolaescu
dann@ics.uci.edu
Mon Nov 5 11:34:00 GMT 2001
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?
More information about the Gcc
mailing list