This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] for PR 18040
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: jason at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Oct 04 19:05:29 EDT
- Subject: Re: [patch] for PR 18040
I don't think anybody is suggesting that we break up reference chains
in a way that would introduce aggregate temporaries. Only things that
can be expressed like
t = &a.b;
a.b.c => t->c
"t" here is a scalar temporary, so the optimizers should be able to do
useful things with it.
But that has it's own set of problems:
(1) We're taking an address of something that didn't used to have its
address taken.
(2) Suppose a.b is not addressable? Then you *do* have to make a copy
and hence an aggregate temporary.
If a.b.c is not valid GIMPLE, then even if we had a tree combiner (and
ignoring the nonaddressable issue), we couldn't undo this pessimization.
For example, suppose A were small enough to go into a register. Taking
the address of a.b would preclude that.