On Mon, 2020-01-27 at 04:53 +0000, Feng Xue OS wrote: > Current IPA does not propagate aggregate constant for by-ref argument > if it is simple pass-through of caller parameter. Here is an example, > > f1 (int *p) > { > ... = *p; > ... > } > > f2 (int *p) > { > *p = 2; > f1 (p); > } > > It is easy to know that in f1(), *p should be 2 after a simple propagation > from f2() to f1(). But this is missed due to some bug, which is targeted > by this patch. > > Bootstrapped/regtested on x86_64-linux and aarch64-linux. > > Feng > --- > 2020-01-27 Feng Xue <f...@os.amperecomputing.com> > > PR ipa/93429 > * ipa-cp.c (propagate_aggs_across_jump_function): Further > check aggregate jump functions if by-ref argument is simple > pass through. > (intersect_aggregates_with_edge): Likewise. I'm deferring this to gcc-11 as it's a missed-optimization and we're in stage4.
jeff