* [PATCH] Remove duplicated code block in gimple-ssa-split-paths.c
@ 2018-12-14 9:25 Richard Biener
2018-12-14 21:21 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Richard Biener @ 2018-12-14 9:25 UTC (permalink / raw)
To: gcc-patches
Jeffs last commit added the fix twice.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2018-12-14 Richard Biener <rguenther@suse.de>
* gimple-ssa-split-paths.c (is_feasible_trace): Remove
duplicated code block.
Index: gcc/gimple-ssa-split-paths.c
===================================================================
--- gcc/gimple-ssa-split-paths.c (revision 267125)
+++ gcc/gimple-ssa-split-paths.c (working copy)
@@ -249,52 +249,6 @@ is_feasible_trace (basic_block bb)
}
}
- /* Canonicalize the form. */
- if (num_stmts_in_pred1 == 0 && num_stmts_in_pred2 == 1)
- {
- std::swap (pred1, pred2);
- std::swap (num_stmts_in_pred1, num_stmts_in_pred2);
- }
-
- /* Another variant. This one is half-diamond. */
- if (num_stmts_in_pred1 == 1 && num_stmts_in_pred2 == 0
- && dominated_by_p (CDI_DOMINATORS, pred1, pred2))
- {
- gimple *stmt1 = last_and_only_stmt (pred1);
-
- /* The only statement in PRED1 must be an assignment that is
- not a good candidate for if-conversion. This may need some
- generalization. */
- if (stmt1 && gimple_code (stmt1) == GIMPLE_ASSIGN)
- {
- enum tree_code code1 = gimple_assign_rhs_code (stmt1);
-
- if (!poor_ifcvt_candidate_code (code1))
- {
- tree lhs1 = gimple_assign_lhs (stmt1);
- tree rhs1 = gimple_assign_rhs1 (stmt1);
-
- gimple_stmt_iterator gsi;
- for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
- {
- gimple *phi = gsi_stmt (gsi);
- if ((gimple_phi_arg_def (phi, 0) == lhs1
- && gimple_phi_arg_def (phi, 1) == rhs1)
- || (gimple_phi_arg_def (phi, 1) == lhs1
- && gimple_phi_arg_def (phi, 0) == rhs1))
- {
- if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file,
- "Block %d appears to be a join point for "
- "if-convertable half-diamond.\n",
- bb->index);
- return false;
- }
- }
- }
- }
- }
-
/* If the joiner has no PHIs with useful uses there is zero chance
of CSE/DCE/jump-threading possibilities exposed by duplicating it. */
bool found_useful_phi = false;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove duplicated code block in gimple-ssa-split-paths.c
2018-12-14 9:25 [PATCH] Remove duplicated code block in gimple-ssa-split-paths.c Richard Biener
@ 2018-12-14 21:21 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2018-12-14 21:21 UTC (permalink / raw)
To: Richard Biener, gcc-patches
On 12/14/18 2:25 AM, Richard Biener wrote:
>
> Jeffs last commit added the fix twice.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
>
> Richard.
>
> 2018-12-14 Richard Biener <rguenther@suse.de>
>
> * gimple-ssa-split-paths.c (is_feasible_trace): Remove
> duplicated code block.
I've made that same mistake twice in the last week. I'm in the middle
of changing some of my workflows and clearly I'm mucking it up.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-14 21:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 9:25 [PATCH] Remove duplicated code block in gimple-ssa-split-paths.c Richard Biener
2018-12-14 21:21 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).