This is the mail archive of the gcc-patches@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]

[PATCH] Do not stop inlining when seen_errors ()


When we stop inlining in the middle of applying inline transform
we can end up with a bogus callgraph (some inline clones not
inlined) which confuses later simple IPA passes.  Don't to that - IPA
passes should only guard themselves against errors at the IPA level
(so either apply to all or to no functions).  We do that already
when deciding whether to run IPA passes at all, so this particular
check is no longer needed.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Richard.

2011-12-08  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/49772
	* tree-inline.c (optimize_inline_calls): Remove bail out
	on errors.

Index: gcc/tree-inline.c
===================================================================
--- gcc/tree-inline.c	(revision 182107)
+++ gcc/tree-inline.c	(working copy)
@@ -4216,12 +4216,6 @@ optimize_inline_calls (tree fn)
   struct gimplify_ctx gctx;
   bool inlined_p = false;
 
-  /* There is no point in performing inlining if errors have already
-     occurred -- and we might crash if we try to inline invalid
-     code.  */
-  if (seen_error ())
-    return 0;
-
   /* Clear out ID.  */
   memset (&id, 0, sizeof (id));
 


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