diff mbox

Do not stop inlining when seen_errors ()

Message ID alpine.LNX.2.00.1112081336020.4527@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Dec. 8, 2011, 12:38 p.m. UTC
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.
diff mbox

Patch

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