summaryrefslogtreecommitdiff
path: root/gcc/ira-build.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-25 02:15:58 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-25 02:15:58 +0000
commita977d63f5ca29e8dc13221f30822f2065b94aadc (patch)
treef1d213918c085cd76f339c47f6e7075674d74817 /gcc/ira-build.c
parent0c051f505f79cdb899f489b9ae6b1fe4b8790de5 (diff)
downloadgcc-a977d63f5ca29e8dc13221f30822f2065b94aadc.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174165 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-build.c')
-rw-r--r--gcc/ira-build.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index 31d0199791a..95d6c169a27 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++)