Commit 9edb6bb8 by Jeff Law Committed by Jeff Law

[PATCH] Avoid unnecessary block copying in path splitting

	* gimple-ssa-split-paths.c (split_paths): Avoid unnecessary block
	copying.

From-SVN: r231915
parent 56343945
2015-12-22 Jeff Law <law@redhat.com>
* gimple-ssa-split-paths.c (split_paths): Avoid unnecessary block
copying.
2015-12-22 Jakub Jelinek <jakub@redhat.com> 2015-12-22 Jakub Jelinek <jakub@redhat.com>
PR c++/67376 PR c++/67376
...@@ -192,9 +192,10 @@ split_paths () ...@@ -192,9 +192,10 @@ split_paths ()
/* BB is the merge point for an IF-THEN-ELSE we want to transform. /* BB is the merge point for an IF-THEN-ELSE we want to transform.
Essentially we want to create two duplicates of BB and append Essentially we want to create a duplicate of bb and redirect the
a duplicate to the THEN and ELSE clauses. This will split the first predecessor of BB to the duplicate (leaving the second
path leading to the latch. BB will be unreachable and removed. */ predecessor as is. This will split the path leading to the latch
re-using BB to avoid useless copying. */
if (bb && is_feasible_trace (bb)) if (bb && is_feasible_trace (bb))
{ {
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
...@@ -202,9 +203,7 @@ split_paths () ...@@ -202,9 +203,7 @@ split_paths ()
"Duplicating join block %d into predecessor paths\n", "Duplicating join block %d into predecessor paths\n",
bb->index); bb->index);
basic_block pred0 = EDGE_PRED (bb, 0)->src; basic_block pred0 = EDGE_PRED (bb, 0)->src;
basic_block pred1 = EDGE_PRED (bb, 1)->src;
transform_duplicate (pred0, bb); transform_duplicate (pred0, bb);
transform_duplicate (pred1, bb);
changed = true; changed = true;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment