OK?
PR tree-optimization/126906
gcc/ChangeLog:
* tree-ssa-threadupdate.cc (bb_in_bbs): Remove.
(back_jt_path_registry::duplicate_thread_path): Remove the
now-dead last-block assert.
---
gcc/tree-ssa-threadupdate.cc | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/gcc/tree-ssa-threadupdate.cc b/gcc/tree-ssa-threadupdate.cc
index 106d906548c..49e45d97189 100644
--- a/gcc/tree-ssa-threadupdate.cc
+++ b/gcc/tree-ssa-threadupdate.cc
@@ -2203,18 +2203,6 @@ verify_jump_thread (basic_block *region, unsigned
n_region)
gcc_assert (EDGE_COUNT (region[i]->preds) <= 1);
}
-/* Return true when BB is one of the first N items in BBS. */
-
-static inline bool
-bb_in_bbs (basic_block bb, basic_block *bbs, int n)
-{
- for (int i = 0; i < n; i++)
- if (bb == bbs[i])
- return true;
-
- return false;
-}
-
void
jt_path_registry::debug_path (FILE *dump_file, int pathno)
{
@@ -2537,15 +2525,9 @@ back_jt_path_registry::duplicate_thread_path (edge entry,
}
/* There's nothing to redirect here, since the last block on the path was
- copied by hand and its edges point at the original destinations. A
- follow-up patch will remove this assert. */
+ copied by hand and its edges point at the original destinations. */
if (i + 1 == n_region)
- {
- if (flag_checking)
- FOR_EACH_EDGE (e, ei, bb->succs)
- gcc_assert (!bb_in_bbs (e->dest, region_copy, n_region));
- continue;
- }
+ continue;
/* Redirect all other edges jumping to non-adjacent blocks back to the
original code. */
--
2.47.3