From 2df8ab3dbaa4f63708f3c53f1ac42a6f0e1f4a75 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 22 Aug 2017 09:04:28 +0000 Subject: [PATCH] tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes. 2017-08-22 Richard Biener * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes. From-SVN: r251264 --- gcc/ChangeLog | 5 +++++ gcc/tree-cfg.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e24f5119334..a32a5d6498b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-08-22 Richard Biener + + * tree-cfg.c (gimple_split_edge): Avoid reallocating target + PHI nodes. + 2017-08-22 Richard Biener * common.opt (feliminate-dwarf2-dups): Ignore. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index f26b12ff30d..6c355f1ed70 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2844,10 +2844,11 @@ gimple_split_edge (edge edge_in) new_bb = create_empty_bb (after_bb); new_bb->frequency = EDGE_FREQUENCY (edge_in); new_bb->count = edge_in->count; - new_edge = make_single_succ_edge (new_bb, dest, EDGE_FALLTHRU); e = redirect_edge_and_branch (edge_in, new_bb); gcc_assert (e == edge_in); + + new_edge = make_single_succ_edge (new_bb, dest, EDGE_FALLTHRU); reinstall_phi_args (new_edge, e); return new_bb; -- 2.30.2