aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-06-02 21:52:46 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-06-02 21:52:46 +0000
commit76015c34a97c58e6e6fb058f8d34a5be56d3a713 (patch)
treec51807484f6834435dd02de83e9b094a6ed92fe2 /gcc
parentcde3a7a96908f651a844fd43905a64651d42c5af (diff)
downloadgcc-76015c34a97c58e6e6fb058f8d34a5be56d3a713.zip
gcc-76015c34a97c58e6e6fb058f8d34a5be56d3a713.tar.gz
gcc-76015c34a97c58e6e6fb058f8d34a5be56d3a713.tar.bz2
cse.c (cse_find_path): Refine change to exclude EDGE_ABNORMAL_CALL edges only...
2011-06-02  Eric Botcazou  <ebotcazou@adacore.com> * cse.c (cse_find_path): Refine change to exclude EDGE_ABNORMAL_CALL edges only, when there is a non-local label in the function. * postreload-gcse.c (bb_has_well_behaved_predecessors): Likewise. From-SVN: r174585
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cse.c2
-rw-r--r--gcc/postreload-gcse.c7
3 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ceb5350..4533f58 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-06-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * cse.c (cse_find_path): Refine change to exclude EDGE_ABNORMAL_CALL
+ edges only, when there is a non-local label in the function.
+ * postreload-gcse.c (bb_has_well_behaved_predecessors): Likewise.
+
2011-06-02 Uros Bizjak <ubizjak@gmail.com>
* config/i386/constraints.md (Y3): New register constraint.
diff --git a/gcc/cse.c b/gcc/cse.c
index 5e2b4d8..cfa2b00 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -6193,7 +6193,7 @@ cse_find_path (basic_block first_bb, struct cse_basic_block_data *data,
e = NULL;
if (e
- && (e->flags & EDGE_ABNORMAL) == 0
+ && !((e->flags & EDGE_ABNORMAL_CALL) && cfun->has_nonlocal_label)
&& e->dest != EXIT_BLOCK_PTR
&& single_pred_p (e->dest)
/* Avoid visiting basic blocks twice. The large comment
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c
index 0ee50d8..bc55ead 100644
--- a/gcc/postreload-gcse.c
+++ b/gcc/postreload-gcse.c
@@ -912,12 +912,10 @@ get_avail_load_store_reg (rtx insn)
static bool
bb_has_well_behaved_predecessors (basic_block bb)
{
- unsigned int edge_count = EDGE_COUNT (bb->preds);
edge pred;
edge_iterator ei;
- if (edge_count == 0
- || (edge_count == 1 && (single_pred_edge (bb)->flags & EDGE_ABNORMAL)))
+ if (EDGE_COUNT (bb->preds) == 0)
return false;
FOR_EACH_EDGE (pred, ei, bb->preds)
@@ -925,6 +923,9 @@ bb_has_well_behaved_predecessors (basic_block bb)
if ((pred->flags & EDGE_ABNORMAL) && EDGE_CRITICAL_P (pred))
return false;
+ if ((pred->flags & EDGE_ABNORMAL_CALL) && cfun->has_nonlocal_label)
+ return false;
+
if (JUMP_TABLE_DATA_P (BB_END (pred->src)))
return false;
}