This is the mail archive of the 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: Work around PR65873

On 05/12/2015 04:12 PM, Jan Hubicka wrote:

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


+	bellow and inline across optimization boundry.


+	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)
+	;


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