This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix inlining checks wrt optimize attribute
- From: Christian Bruel <christian dot bruel at st dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 17 Apr 2015 08:51:00 +0200
- Subject: Re: [PATCH] Fix inlining checks wrt optimize attribute
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1501221023100 dot 12482 at zhemvz dot fhfr dot qr> <54C0CF92 dot 6080001 at st dot com> <alpine dot LSU dot 2 dot 11 dot 1501221131110 dot 12482 at zhemvz dot fhfr dot qr>
On 01/22/2015 11:33 AM, Richard Biener wrote:
> On Thu, 22 Jan 2015, Christian Bruel wrote:
>
>> Hi Richard,
>>
>> I thought one of my current issue would be solved by this patch, but it is not
>> : I have some inlining failures with the attribute target on ARM. (e.g
>> inline-3.c) where obvious early inline fails with because we fail into the
>> last can_inline_edge_p case:
>>
>> opt_for_fn (callee->decl, optimize)
>> >= opt_for_fn (caller->decl, optimize)))
>>
>> when callee and caller are both -O2 and targetm.target_option.can_inline_p was
>> true, they should be inlined as in the general case (no
>> DECL_FUNCTION_SPECIFIC_OPTIMIZATION)
>>
>> I'm currently testing this additional change:
>>
>> Index: ipa-inline.c
>> ===================================================================
>> --- ipa-inline.c (revision 219989)
>> +++ ipa-inline.c (working copy)
>> @@ -489,7 +489,7 @@
>> else if (opt_for_fn (callee->decl, optimize_size)
>> < opt_for_fn (caller->decl, optimize_size)
>> || (opt_for_fn (callee->decl, optimize)
>> - >= opt_for_fn (caller->decl, optimize)))
>> + > opt_for_fn (caller->decl, optimize)))
>> {
>> if (estimate_edge_time (e)
>> >= 20 + inline_edge_summary (e)->call_stmt_time)
>>
>> Since this is a hot topic for you, I though you would have useful comments on
>> this before I ask for a commit (when stage 4 close) ?
>
> Yeah - the above looks like an obvious change to me. Thus,
> approved if it passes bootstrap/regtest.
>
> Thanks,
> Richard.
>
thanks, sorry for the delay (stage1 blocked)
committed with the Changelog:
* ipa-inline.c (can_inline_edge_p): Allow inlining of functions with
same attributes.
This frees the road for
- [PATCH, x86] [PR target/64835] Add
TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE hook
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg00594.html
and
- [PATCH, ARM] attribute target (thumb,arm) [0-6]
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg00706.html
with new regressions tests.