public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR36262 somewhat
@ 2008-05-21 14:29 Richard Guenther
  0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2008-05-21 14:29 UTC (permalink / raw)
  To: gcc-patches


This adjusts vrp_visit_assignment to not defer to SCEV if the stmt
is in the outermost (root) loop.  This brings down compile-time for
the testcase in the PR from 76s to 60s (but memory usage is only
minimally improved).

I'll bootstrap and regtest and apply this.

Richard.

2008-05-21  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/36262
	* tree-vrp.c (vrp_visit_assignment): Do not use SCEV for
	stmts in the root loop.

Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 135606)
+++ tree-vrp.c	(working copy)
@@ -4697,7 +4701,10 @@ vrp_visit_assignment (tree stmt, tree *o
       /* If STMT is inside a loop, we may be able to know something
 	 else about the range of LHS by examining scalar evolution
 	 information.  */
-      if (current_loops && (l = loop_containing_stmt (stmt)))
+      if (current_loops
+	  && (l = loop_containing_stmt (stmt))
+	  /* The outermost loop is not a real loop.  */
+	  && loop_outer (l))
 	adjust_range_with_scev (&new_vr, l, stmt, lhs);
 
       if (update_value_range (lhs, &new_vr))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-21 13:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-21 14:29 [PATCH] Fix PR36262 somewhat Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).