diff options
author | Richard Biener <rguenther@suse.de> | 2017-11-22 09:05:53 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-11-22 09:05:53 +0000 |
commit | 608c0f631803f888363bccff43a57027538ff03e (patch) | |
tree | 28545debd89aa0dd6f1953fb4d48e97f80f783d6 /gcc/gimple-iterator.c | |
parent | 9cf7bfd919f394595c0ac561ed67b333a39ae51e (diff) | |
download | gcc-608c0f631803f888363bccff43a57027538ff03e.zip gcc-608c0f631803f888363bccff43a57027538ff03e.tar.gz gcc-608c0f631803f888363bccff43a57027538ff03e.tar.bz2 |
gimple-iterator.c (gimple_find_edge_insert_loc): Ignore fake edges to exit when looking for a place to insert.
2017-11-22 Richard Biener <rguenther@suse.de>
* gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
fake edges to exit when looking for a place to insert.
* tree-ssa-pre.c (clear_expression_ids): Inline into callers
and remove.
(insert_into_preds_of_block): Commit edge insertion immediately,
assert that doesn't require new BBs.
(fini_pre): Release expressions.
(pass_pre::execute): Shuffle things around a bit, if the fn
is too large do not compute AVAIL either as this is really the
quadratic bit.
From-SVN: r255047
Diffstat (limited to 'gcc/gimple-iterator.c')
-rw-r--r-- | gcc/gimple-iterator.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/gimple-iterator.c b/gcc/gimple-iterator.c index d9d02d3..9841eb1 100644 --- a/gcc/gimple-iterator.c +++ b/gcc/gimple-iterator.c @@ -763,7 +763,12 @@ gimple_find_edge_insert_loc (edge e, gimple_stmt_iterator *gsi, Except for the entry block. */ src = e->src; if ((e->flags & EDGE_ABNORMAL) == 0 - && single_succ_p (src) + && (single_succ_p (src) + /* Do not count a fake edge as successor as added to infinite + loops by connect_infinite_loops_to_exit. */ + || (EDGE_COUNT (src->succs) == 2 + && (EDGE_SUCC (src, 0)->flags & EDGE_FAKE + || EDGE_SUCC (src, 1)->flags & EDGE_FAKE))) && src != ENTRY_BLOCK_PTR_FOR_FN (cfun)) { *gsi = gsi_last_bb (src); |