This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Early inlining and function references from static const struct (bug?)


I've reported this at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69708.

Just to summarize:

1) If early inlining is forced then fre replaces the many references
to sq and ipa inlining is able to do its job.

2) If early inlining is disabled then ipa inlining only works for the
compound literal case. The cp pass (happening immediately before the
ipa inline one) results in:

```
h (int x)
{
  ...
  _4 = g (f, x_2(D));
  dosomething (_4);
  D.1847.call = sq;
  _8 = g (D.1847, x_2(D));
  dosomething (_8);
  ....
}
```

Nevertheless ipa inline seems clever enough to expand the second call to g.

3) The proper solution seems to be that cp were able to propagate sq
to both call sites in order to make things easy to ipa inline.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]