Removing unnecessary ADDR_EXPRs

Andrew Pinski pinskia@physics.uc.edu
Tue May 17 21:58:00 GMT 2005


On May 17, 2005, at 4:46 PM, Andrew Pinski wrote:

> The next problem is that the forward propagation assumes that 
> propagating of
> ADDR_EXPR should not cause us to get rid of a way to throw which is 
> wrong,
> though I cannot prove it without honza's patch in.

Actually it was not honza's patch which causes the missed optimization 
right away.
CCP is not propagating of the second ADDR_EXPR after it became 
invariant.

New testcase without inlining enabled:
struct f
{
   int i;
};
int g()throw()
{
   f a;
   f *a1 = &a;
   int *i = &a1->i;
   return *i;
}


Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list