This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Work around PR65873
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 13 May 2015 14:02:59 -0600
- Subject: Re: Work around PR65873
- Authentication-results: sourceware.org; auth=none
- References: <20150512221234 dot GA54352 at kam dot mff dot cuni dot cz>
On 05/12/2015 04:12 PM, Jan Hubicka wrote:
Hi,
this patch works around PR where we refuse to inline always_inline memcpy
into function with explicit Ofast optimization attribute. This is because
we think we can not promote -fno-fast-math code to -fast-math code.
This is of course safe for memcpy because it contains to fast-math code,
but we don't really do the analysis for each of the flags we check.
Earlier compilers was happily producing wrong code here and it seems practical
to do that on GCC 5 to deal with common falout. I will implement the more
fine grained check incrementally.
Bootstrapped/regtested x86_64-linux. Will commit it to mainline shortly and
to release branch later this week.
PR ipa/65873
* ipa-inline.c (can_inline_edge_p): Allow early inlining of always
inlines across optimization boundary.
* testsuite/gcc.c-torture/compile/pr65873.c: New testcase.
Index: ipa-inline.c
===================================================================
--- ipa-inline.c (revision 223093)
+++ ipa-inline.c (working copy)
@@ -427,46 +427,55 @@ can_inline_edge_p (struct cgraph_edge *e
&& lookup_attribute ("always_inline",
DECL_ATTRIBUTES (callee->decl)));
I'm having problems parsing the following comment block:
+ /* Until GCC 4.9 we did not check the semantics alterning flags
"alterning"?
+ bellow and inline across optimization boundry.
s/bellow/below/g
s/boundry/boundary/
+ Enabling checks bellow breaks several packages by refusing
+ to inline library always_inline functions. See PR65873.
+ Disable the check for early inlining for now until better solution
+ is found. */
+ if (always_inline && early)
+ ;
-Sandra