diff options
author | Richard Biener <rguenther@suse.de> | 2021-11-29 15:20:38 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-11-30 08:23:26 +0100 |
commit | 2acbc4eba33574a5e655c01d1be8b17fad0be535 (patch) | |
tree | e5ed1acaf3d7f9ea3efeef6958dcf97acd35c702 /gcc/sched-deps.c | |
parent | 6c7d489a1e6592bc73db03678c1231748fd7a126 (diff) | |
download | gcc-2acbc4eba33574a5e655c01d1be8b17fad0be535.zip gcc-2acbc4eba33574a5e655c01d1be8b17fad0be535.tar.gz gcc-2acbc4eba33574a5e655c01d1be8b17fad0be535.tar.bz2 |
Avoid some -Wunreachable-code-ctrl
This cleans up unreachable code diagnosed by -Wunreachable-code-ctrl.
It largely follows the previous series but discovers a few extra
cases, namely dead code after break or continue or loops without
exits.
2021-11-29 Richard Biener <rguenther@suse.de>
gcc/c/
* gimple-parser.c (c_parser_gimple_postfix_expression):
avoid unreachable code after break.
gcc/
* cfgrtl.c (skip_insns_after_block): Refactor code to
be more easily readable.
* expr.c (op_by_pieces_d::run): Remove unreachable
assert.
* sched-deps.c (sched_analyze): Remove unreachable
gcc_unreachable.
* sel-sched-ir.c (in_same_ebb_p): Likewise.
* tree-ssa-alias.c (nonoverlapping_refs_since_match_p):
Remove unreachable code.
* tree-vect-slp.c (vectorize_slp_instance_root_stmt):
Refactor to avoid unreachable loop iteration.
* tree.c (walk_tree_1): Remove unreachable break.
* vec-perm-indices.c (vec_perm_indices::series_p): Remove
unreachable return.
gcc/cp/
* parser.c (cp_parser_postfix_expression): Remove
unreachable code.
* pt.c (tsubst_expr): Remove unreachable breaks.
gcc/fortran/
* frontend-passes.c (gfc_expr_walker): Remove unreachable
break.
* scanner.c (skip_fixed_comments): Remove unreachable
gcc_unreachable.
* trans-expr.c (gfc_expr_is_variable): Refactor to make
control flow more obvious.
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r-- | gcc/sched-deps.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 5814204c..62aa47a 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -3816,7 +3816,6 @@ sched_analyze (class deps_desc *deps, rtx_insn *head, rtx_insn *tail) for (insn = head;; insn = NEXT_INSN (insn)) { - if (INSN_P (insn)) { /* And initialize deps_lists. */ @@ -3836,7 +3835,6 @@ sched_analyze (class deps_desc *deps, rtx_insn *head, rtx_insn *tail) return; } } - gcc_unreachable (); } /* Helper for sched_free_deps (). |