This is the mail archive of the
mailing list for the GCC project.
Re: Early inlining and function references from static const struct (bug?)
- From: Carlos Pita <carlosjosepita at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Martin Jambor <mjambor at suse dot cz>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 5 Feb 2016 11:27:17 -0300
- Subject: Re: Early inlining and function references from static const struct (bug?)
- Authentication-results: sourceware.org; auth=none
- References: <CAELgYhepY2Vnjt8-ExmY-9jtw=4Q6E6=SrFYgX85QmT5Aqnc=g at mail dot gmail dot com> <CAELgYhceHGkmBKa=Xez28ne3utPMwvgscbDiKdKcJsaDtVV3=g at mail dot gmail dot com> <CAELgYhcVGZ=JQQa+Qao2i1ofu9-_-WT4MxVrRNLC9rCCrcbrXw at mail dot gmail dot com> <CAFiYyc2Ny5=mftu1QVEJrsPyMxq_0OiX8w3uMcjy6V4sYX24Yg at mail dot gmail dot com> <CAELgYhdBPa2ryWC86GD-YzWMM2U_AJbYNcnY=3zginu96DE8Xw at mail dot gmail dot com> <CAFiYyc3J+fiSovw7E7Bv_9R-Vq5BZ8Lfr8FttQC-j6kMnXoX2A at mail dot gmail dot com>
> I was saying that early inlining is not supposed to catch this case
> but IPA inlining.
> it shouldn't need to inline g early to end up inlining the calls to sq. IPA CP
> should clone g for the case of it calling sq and then inlining should
> just do its job.
Ok, I fully agree with that, forcing early inlining to trigger late
inlining is just a workaround. But there is still the fact that ipa
inlining is indeed inlining the compound literal case (despite ipa cp
failing there) while it's unable to inline the static const case that,
as I understand it, you don't seem to consider a missed oportunity for
ipa cp. So say you fix the "aggregate D.1772" scenario, I guess it
won't change anything regarding ipa inlining.