From 7c41b799c2f728a56aa2ce4a23b4e7dc57e0cd4a Mon Sep 17 00:00:00 2001 From: rth Date: Thu, 10 Sep 2009 18:01:23 +0000 Subject: [PATCH] * gimple-iterator.c (gimple_find_edge_insert_loc): Use gimple_seq_empty_p to test for no PHI nodes. * tree-cfg.c (split_critical_edges): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151602 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/gimple-iterator.c | 4 ++-- gcc/tree-cfg.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c581edc406e..8cef08e48dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2009-09-10 Richard Henderson + * gimple-iterator.c (gimple_find_edge_insert_loc): Use + gimple_seq_empty_p to test for no PHI nodes. + * tree-cfg.c (split_critical_edges): Likewise. + +2009-09-10 Richard Henderson + * c-common.h (c_dialect_cxx, c_dialect_objc): Boolify. 2009-09-10 Hariharan Sandanagobalane diff --git a/gcc/gimple-iterator.c b/gcc/gimple-iterator.c index 666b47b47a8..47aed5ce4c9 100644 --- a/gcc/gimple-iterator.c +++ b/gcc/gimple-iterator.c @@ -623,9 +623,9 @@ gimple_find_edge_insert_loc (edge e, gimple_stmt_iterator *gsi, would have to examine the PHIs to prove that none of them used the value set by the statement we want to insert on E. That hardly seems worth the effort. */ -restart: + restart: if (single_pred_p (dest) - && ! phi_nodes (dest) + && gimple_seq_empty_p (phi_nodes (dest)) && dest != EXIT_BLOCK_PTR) { *gsi = gsi_start_bb (dest); diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 524422f1ec4..1357064e288 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -7250,7 +7250,7 @@ split_critical_edges (void) Go ahead and split them too. This matches the logic in gimple_find_edge_insert_loc. */ else if ((!single_pred_p (e->dest) - || phi_nodes (e->dest) + || !gimple_seq_empty_p (phi_nodes (e->dest)) || e->dest == EXIT_BLOCK_PTR) && e->src != ENTRY_BLOCK_PTR && !(e->flags & EDGE_ABNORMAL)) -- 2.11.0