diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2011-05-25 02:15:58 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2011-05-25 02:15:58 +0000 |
commit | 30a435d83ab076958e210c724f090d0c6a27781a (patch) | |
tree | f1d213918c085cd76f339c47f6e7075674d74817 /gcc/ira-build.c | |
parent | 82625907a67dd38b3a55d7f4d506c10b4268b297 (diff) | |
download | gcc-30a435d83ab076958e210c724f090d0c6a27781a.zip gcc-30a435d83ab076958e210c724f090d0c6a27781a.tar.gz gcc-30a435d83ab076958e210c724f090d0c6a27781a.tar.bz2 |
re PR rtl-optimization/48757 (internal compiler error: in compensate_edge, at reg-stack.c:2788)
2011-05-24 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/48757
* ira-build.c (loop_with_eh_edge_p): Rename to
loop_with_complex_edge_p, check edges on complexity, make function
conditional.
(mark_loops_for_removal): Make call of loop_with_complex_edge_p
conditional.
2011-05-24 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/48757
* gfortran.dg/pr48757.f: New test case.
From-SVN: r174165
Diffstat (limited to 'gcc/ira-build.c')
-rw-r--r-- | gcc/ira-build.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ira-build.c b/gcc/ira-build.c index 31d0199..95d6c16 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -1806,9 +1806,12 @@ low_pressure_loop_node_p (ira_loop_tree_node_t node) return true; } -/* Return TRUE if LOOP has a EH enter or exit edge. */ +#ifdef STACK_REGS +/* Return TRUE if LOOP has a complex enter or exit edge. We don't + form a region from such loop if the target use stack register + because reg-stack.c can not deal with such edges. */ static bool -loop_with_eh_edge_p (struct loop *loop) +loop_with_complex_edge_p (struct loop *loop) { int i; edge_iterator ei; @@ -1820,10 +1823,11 @@ loop_with_eh_edge_p (struct loop *loop) return true; edges = get_loop_exit_edges (loop); FOR_EACH_VEC_ELT (edge, edges, i, e) - if (e->flags & EDGE_EH) + if (e->flags & EDGE_COMPLEX) return true; return false; } +#endif /* Sort loops for marking them for removal. We put already marked loops first, then less frequent loops next, and then outer loops @@ -1884,7 +1888,10 @@ mark_loops_for_removal (void) ira_loop_nodes[i].to_remove_p = ((low_pressure_loop_node_p (ira_loop_nodes[i].parent) && low_pressure_loop_node_p (&ira_loop_nodes[i])) - || loop_with_eh_edge_p (ira_loop_nodes[i].loop)); +#ifdef STACK_REGS + || loop_with_complex_edge_p (ira_loop_nodes[i].loop) +#endif + ); } qsort (sorted_loops, n, sizeof (ira_loop_tree_node_t), loop_compare_func); for (i = 0; n - i + 1 > IRA_MAX_LOOPS_NUM; i++) |