[PATCH] Fix PR36262 somewhat
Richard Guenther
rguenther@suse.de
Wed May 21 14:29:00 GMT 2008
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))
More information about the Gcc-patches
mailing list