Proposed resolution to aliasing issue.
Mike Stump
mrs@apple.com
Tue May 17 22:41:00 GMT 2005
On May 17, 2005, at 2:21 PM, Mark Mitchell wrote:
> It wouldn't look like escape to (at least some compilers')
> optimizers if, say, the front end folded it to a constant. So, I'm
> not sure how to express what constitutes escape.
Well, we're going to need to ensure the optimizer can see various
things.
We need to teach it about the meaning of constants.
One can:
#include "foo.h"
main() {
printf ("%d\n", offsetof (s, m));
}
and then in another file, read and use that on an address. One can
also transform it into a #define S_M_OFFSET 8, and #include it. So,
I'd claim the optimizer has to know about constants already.
More information about the Gcc
mailing list