aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-06-27 12:25:21 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-06-27 10:25:21 +0000
commit45309d286c80ecad8b7a4efba0e9aba35d847af6 (patch)
tree528d9923fdd0aac57cb59c10dd7c7b84be1713b8 /gcc
parent57e088f5ed204ebc3cc43a432320ef85e69d4657 (diff)
downloadgcc-45309d286c80ecad8b7a4efba0e9aba35d847af6.zip
gcc-45309d286c80ecad8b7a4efba0e9aba35d847af6.tar.gz
gcc-45309d286c80ecad8b7a4efba0e9aba35d847af6.tar.bz2
Remove quite obvious dead assignments.
2019-06-27 Martin Liska <mliska@suse.cz> * asan.c (asan_emit_allocas_unpoison): Remove obviously dead assignments. * bt-load.c (move_btr_def): Likewise. * builtins.c (expand_builtin_apply_args_1): Likewise. (expand_builtin_apply): Likewise. * cfgexpand.c (expand_asm_stmt): Likewise. (construct_init_block): Likewise. * cfghooks.c (verify_flow_info): Likewise. * cfgloopmanip.c (remove_path): Likewise. * cfgrtl.c (rtl_verify_bb_layout): Likewise. * cgraph.c (cgraph_node::set_pure_flag): Likewise. * combine.c (simplify_if_then_else): Likewise. * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise. (choose_basereg): Likewise. (ix86_expand_prologue): Likewise. (ix86_preferred_output_reload_class): Likewise. * cselib.c (cselib_record_sets): Likewise. * df-scan.c (df_scan_alloc): Likewise. * dojump.c (do_jump_by_parts_greater_rtx): Likewise. * early-remat.c (early_remat::record_equiv_candidates): Likewise. * emit-rtl.c (try_split): Likewise. * graphite-scop-detection.c (assign_parameter_index_in_region): Likewise. * ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Likewise. * ira-color.c (setup_profitable_hard_regs): Likewise. * ira.c (rtx_moveable_p): Likewise. * lra-eliminations.c (eliminate_regs_in_insn): Likewise. * read-rtl.c (read_subst_mapping): Likewise. * regrename.c (scan_rtx): Likewise. * reorg.c (fill_slots_from_thread): Likewise. * tree-inline.c (tree_function_versioning): Likewise. * tree-ssa-reassoc.c (optimize_ops_list): Likewise. * tree-ssa-sink.c (statement_sink_location): Likewise. * tree-ssa-threadedge.c (thread_across_edge): Likewise. * tree-vect-loop.c (vect_get_loop_niters): Likewise. (vect_create_epilog_for_reduction): Likewise. * tree.c (build_nonstandard_integer_type): Likewise. 2019-06-27 Martin Liska <mliska@suse.cz> * class.c (adjust_clone_args): Remove obviously dead assignments. (dump_class_hierarchy_r): Likewise. * decl.c (check_initializer): Likewise. * parser.c (cp_parser_lambda_expression): Likewise. * pt.c (unify_bound_ttp_args): Likewise. (convert_template_argument): Likewise. * rtti.c (build_headof): Likewise. * typeck.c (convert_for_initialization): Likewise. 2019-06-27 Martin Liska <mliska@suse.cz> * libgcov-driver-system.c (gcov_exit_open_gcda_file): Remove obviously dead assignments. * libgcov-util.c: Likewise. From-SVN: r272744
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog39
-rw-r--r--gcc/asan.c4
-rw-r--r--gcc/bt-load.c1
-rw-r--r--gcc/builtins.c8
-rw-r--r--gcc/cfgexpand.c9
-rw-r--r--gcc/cfghooks.c2
-rw-r--r--gcc/cfgloopmanip.c1
-rw-r--r--gcc/cfgrtl.c1
-rw-r--r--gcc/cgraph.c2
-rw-r--r--gcc/combine.c1
-rw-r--r--gcc/config/i386/i386.c13
-rw-r--r--gcc/cp/ChangeLog12
-rw-r--r--gcc/cp/class.c4
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/parser.c2
-rw-r--r--gcc/cp/pt.c4
-rw-r--r--gcc/cp/rtti.c4
-rw-r--r--gcc/cp/typeck.c2
-rw-r--r--gcc/cselib.c3
-rw-r--r--gcc/df-scan.c2
-rw-r--r--gcc/dojump.c2
-rw-r--r--gcc/early-remat.c1
-rw-r--r--gcc/emit-rtl.c2
-rw-r--r--gcc/graphite-scop-detection.c2
-rw-r--r--gcc/ipa-cp.c3
-rw-r--r--gcc/ira-color.c1
-rw-r--r--gcc/ira.c3
-rw-r--r--gcc/lra-eliminations.c1
-rw-r--r--gcc/read-rtl.c4
-rw-r--r--gcc/regrename.c3
-rw-r--r--gcc/reorg.c3
-rw-r--r--gcc/tree-inline.c4
-rw-r--r--gcc/tree-ssa-reassoc.c3
-rw-r--r--gcc/tree-ssa-sink.c1
-rw-r--r--gcc/tree-ssa-threadedge.c1
-rw-r--r--gcc/tree-vect-loop.c8
-rw-r--r--gcc/tree.c2
37 files changed, 77 insertions, 83 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0561f10..a366de9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,42 @@
+2019-06-27 Martin Liska <mliska@suse.cz>
+
+ * asan.c (asan_emit_allocas_unpoison): Remove obviously
+ dead assignments.
+ * bt-load.c (move_btr_def): Likewise.
+ * builtins.c (expand_builtin_apply_args_1): Likewise.
+ (expand_builtin_apply): Likewise.
+ * cfgexpand.c (expand_asm_stmt): Likewise.
+ (construct_init_block): Likewise.
+ * cfghooks.c (verify_flow_info): Likewise.
+ * cfgloopmanip.c (remove_path): Likewise.
+ * cfgrtl.c (rtl_verify_bb_layout): Likewise.
+ * cgraph.c (cgraph_node::set_pure_flag): Likewise.
+ * combine.c (simplify_if_then_else): Likewise.
+ * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
+ (choose_basereg): Likewise.
+ (ix86_expand_prologue): Likewise.
+ (ix86_preferred_output_reload_class): Likewise.
+ * cselib.c (cselib_record_sets): Likewise.
+ * df-scan.c (df_scan_alloc): Likewise.
+ * dojump.c (do_jump_by_parts_greater_rtx): Likewise.
+ * early-remat.c (early_remat::record_equiv_candidates): Likewise.
+ * emit-rtl.c (try_split): Likewise.
+ * graphite-scop-detection.c (assign_parameter_index_in_region): Likewise.
+ * ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Likewise.
+ * ira-color.c (setup_profitable_hard_regs): Likewise.
+ * ira.c (rtx_moveable_p): Likewise.
+ * lra-eliminations.c (eliminate_regs_in_insn): Likewise.
+ * read-rtl.c (read_subst_mapping): Likewise.
+ * regrename.c (scan_rtx): Likewise.
+ * reorg.c (fill_slots_from_thread): Likewise.
+ * tree-inline.c (tree_function_versioning): Likewise.
+ * tree-ssa-reassoc.c (optimize_ops_list): Likewise.
+ * tree-ssa-sink.c (statement_sink_location): Likewise.
+ * tree-ssa-threadedge.c (thread_across_edge): Likewise.
+ * tree-vect-loop.c (vect_get_loop_niters): Likewise.
+ (vect_create_epilog_for_reduction): Likewise.
+ * tree.c (build_nonstandard_integer_type): Likewise.
+
2019-06-27 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_lookup_3): Encode valueized RHS.
diff --git a/gcc/asan.c b/gcc/asan.c
index 3b800b2..605d04f 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1713,8 +1713,8 @@ asan_emit_allocas_unpoison (rtx top, rtx bot, rtx_insn *before)
rtx ret = init_one_libfunc ("__asan_allocas_unpoison");
top = convert_memory_address (ptr_mode, top);
bot = convert_memory_address (ptr_mode, bot);
- ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode,
- top, ptr_mode, bot, ptr_mode);
+ emit_library_call (ret, LCT_NORMAL, ptr_mode,
+ top, ptr_mode, bot, ptr_mode);
do_pending_stack_adjust ();
rtx_insn *insns = get_insns ();
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index a7d9d53..f68879ca 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -1169,7 +1169,6 @@ move_btr_def (basic_block new_def_bb, int btr, btr_def *def, bitmap live_range,
if (def->other_btr_uses_before_def)
{
- insp = BB_END (b);
for (insp = BB_END (b); ! INSN_P (insp); insp = PREV_INSN (insp))
gcc_assert (insp != BB_HEAD (b));
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 4ecfd49..c53afe8 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1638,11 +1638,8 @@ expand_builtin_apply_args_1 (void)
/* Save the structure value address unless this is passed as an
"invisible" first argument. */
if (struct_incoming_value)
- {
- emit_move_insn (adjust_address (registers, Pmode, size),
- copy_to_reg (struct_incoming_value));
- size += GET_MODE_SIZE (Pmode);
- }
+ emit_move_insn (adjust_address (registers, Pmode, size),
+ copy_to_reg (struct_incoming_value));
/* Return the address of the block. */
return copy_addr_to_reg (XEXP (registers, 0));
@@ -1791,7 +1788,6 @@ expand_builtin_apply (rtx function, rtx arguments, rtx argsize)
emit_move_insn (struct_value, value);
if (REG_P (struct_value))
use_reg (&call_fusage, struct_value);
- size += GET_MODE_SIZE (Pmode);
}
/* All arguments and registers used for the call are set up by now! */
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index cc8eed6..4e1ee70 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -3044,7 +3044,6 @@ expand_asm_stmt (gasm *stmt)
}
}
}
- unsigned nclobbers = clobber_rvec.length();
/* First pass over inputs and outputs checks validity and sets
mark_addressable if needed. */
@@ -3317,7 +3316,7 @@ expand_asm_stmt (gasm *stmt)
gcc_assert (constraints.length() == noutputs + ninputs);
/* But it certainly can adjust the clobbers. */
- nclobbers = clobber_rvec.length();
+ unsigned nclobbers = clobber_rvec.length ();
/* Third pass checks for easy conflicts. */
/* ??? Why are we doing this on trees instead of rtx. */
@@ -5997,11 +5996,11 @@ construct_init_block (void)
{
first_block = e->dest;
redirect_edge_succ (e, init_block);
- e = make_single_succ_edge (init_block, first_block, flags);
+ make_single_succ_edge (init_block, first_block, flags);
}
else
- e = make_single_succ_edge (init_block, EXIT_BLOCK_PTR_FOR_FN (cfun),
- EDGE_FALLTHRU);
+ make_single_succ_edge (init_block, EXIT_BLOCK_PTR_FOR_FN (cfun),
+ EDGE_FALLTHRU);
update_bb_for_insn (init_block);
return init_block;
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index a25441b..76183ec 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -259,8 +259,6 @@ verify_flow_info (void)
err = 1;
}
- last_bb_seen = ENTRY_BLOCK_PTR_FOR_FN (cfun);
-
/* Clean up. */
free (last_visited);
free (edge_checksum);
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index 50250ec..b5f6a47 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -364,7 +364,6 @@ remove_path (edge e, bool *irred_invalidated,
for (i = 0; i < nrem; i++)
{
- bb = rem_bbs[i];
FOR_EACH_EDGE (ae, ei, rem_bbs[i]->succs)
if (ae->dest != EXIT_BLOCK_PTR_FOR_FN (cfun)
&& !bitmap_bit_p (seen, ae->dest->index))
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index a1ca599..a6e4c1b 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -2968,7 +2968,6 @@ rtl_verify_bb_layout (void)
basic_block last_bb_seen = ENTRY_BLOCK_PTR_FOR_FN (cfun), curr_bb = NULL;
num_bb_notes = 0;
- last_bb_seen = ENTRY_BLOCK_PTR_FOR_FN (cfun);
for (x = rtx_first; x; x = NEXT_INSN (x))
{
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 28019ab..d161db9 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -2714,8 +2714,6 @@ bool
cgraph_node::set_pure_flag (bool pure, bool looping)
{
struct set_pure_flag_info info = {pure, looping, false};
- if (!pure)
- looping = false;
call_for_symbol_thunks_and_aliases (set_pure_flag_1, &info, !pure, true);
return info.changed;
}
diff --git a/gcc/combine.c b/gcc/combine.c
index ce7aeec..1be922d 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -6592,7 +6592,6 @@ simplify_if_then_else (rtx x)
|| reg_mentioned_p (true_rtx, false_rtx)
|| rtx_equal_p (false_rtx, XEXP (cond, 0))))
{
- true_code = reversed_comparison_code (cond, NULL);
SUBST (XEXP (x, 0), reversed_comparison (cond, GET_MODE (cond)));
SUBST (XEXP (x, 1), false_rtx);
SUBST (XEXP (x, 2), true_rtx);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7d6280b..49f49c5 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4136,7 +4136,6 @@ ix86_setup_incoming_vararg_bounds (cumulative_args_t cum_v,
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
CUMULATIVE_ARGS next_cum;
tree fntype;
- int max;
gcc_assert (!no_rtl);
@@ -4152,10 +4151,6 @@ ix86_setup_incoming_vararg_bounds (cumulative_args_t cum_v,
if (stdarg_p (fntype))
ix86_function_arg_advance (pack_cumulative_args (&next_cum), mode, type,
true);
-
- max = cum->regno + cfun->va_list_gpr_size / UNITS_PER_WORD;
- if (max > X86_64_REGPARM_MAX)
- max = X86_64_REGPARM_MAX;
}
@@ -6291,7 +6286,6 @@ choose_basereg (HOST_WIDE_INT cfa_offset, rtx &base_reg,
{
base_reg = hard_frame_pointer_rtx;
base_offset = toffset;
- len = tlen;
}
}
}
@@ -8003,8 +7997,7 @@ ix86_expand_prologue (void)
GEN_INT (-allocate), -1, false);
/* Align the stack. */
- insn = emit_insn (gen_and2_insn (stack_pointer_rtx,
- GEN_INT (-align_bytes)));
+ emit_insn (gen_and2_insn (stack_pointer_rtx, GEN_INT (-align_bytes)));
m->fs.sp_offset = ROUND_UP (m->fs.sp_offset, align_bytes);
m->fs.sp_realigned_offset = m->fs.sp_offset
- frame.stack_realign_allocate;
@@ -18176,12 +18169,10 @@ ix86_preferred_reload_class (rtx x, reg_class_t regclass)
static reg_class_t
ix86_preferred_output_reload_class (rtx x, reg_class_t regclass)
{
- machine_mode mode = GET_MODE (x);
-
/* Restrict the output reload class to the register bank that we are doing
math on. If we would like not to return a subset of CLASS, reject this
alternative: if reload cannot do this, it will still use its choice. */
- mode = GET_MODE (x);
+ machine_mode mode = GET_MODE (x);
if (SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH)
return MAYBE_SSE_CLASS_P (regclass) ? ALL_SSE_REGS : NO_REGS;
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9d89ccb..8314b97 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,15 @@
+2019-06-27 Martin Liska <mliska@suse.cz>
+
+ * class.c (adjust_clone_args): Remove obviously
+ dead assignments.
+ (dump_class_hierarchy_r): Likewise.
+ * decl.c (check_initializer): Likewise.
+ * parser.c (cp_parser_lambda_expression): Likewise.
+ * pt.c (unify_bound_ttp_args): Likewise.
+ (convert_template_argument): Likewise.
+ * rtti.c (build_headof): Likewise.
+ * typeck.c (convert_for_initialization): Likewise.
+
2019-06-25 Jason Merrill <jason@redhat.com>
PR c++/70462 - unnecessary base ctor variant with final.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index a679e65..18e7db0 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -4718,8 +4718,6 @@ adjust_clone_args (tree decl)
tree orig_decl_parms = TYPE_ARG_TYPES (TREE_TYPE (decl));
tree decl_parms, clone_parms;
- clone_parms = orig_clone_parms;
-
/* Skip the 'this' parameter. */
orig_clone_parms = TREE_CHAIN (orig_clone_parms);
orig_decl_parms = TREE_CHAIN (orig_decl_parms);
@@ -8549,7 +8547,6 @@ dump_class_hierarchy_r (FILE *stream,
tree base_binfo;
int i;
- indented = maybe_indent_hierarchy (stream, indent, 0);
fprintf (stream, "%s (0x" HOST_WIDE_INT_PRINT_HEX ") ",
type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER),
(HOST_WIDE_INT) (uintptr_t) binfo);
@@ -8570,7 +8567,6 @@ dump_class_hierarchy_r (FILE *stream,
fprintf (stream, " virtual");
fprintf (stream, "\n");
- indented = 0;
if (BINFO_PRIMARY_P (binfo))
{
indented = maybe_indent_hierarchy (stream, indent + 3, indented);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 96cd484..bb9d19a 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6401,7 +6401,7 @@ build_aggr_init_full_exprs (tree decl, tree init, int flags)
static tree
check_initializer (tree decl, tree init, int flags, vec<tree, va_gc> **cleanups)
{
- tree type = TREE_TYPE (decl);
+ tree type;
tree init_code = NULL;
tree core_type;
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 4d46cb3..0a3edb3 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -10478,7 +10478,7 @@ cp_parser_lambda_expression (cp_parser* parser)
if (ok)
maybe_add_lambda_conv_op (type);
- type = finish_struct (type, /*attributes=*/NULL_TREE);
+ finish_struct (type, /*attributes=*/NULL_TREE);
parser->num_template_parameter_lists = saved_num_template_parameter_lists;
parser->in_statement = in_statement;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 00e4364..cc306fc 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7457,8 +7457,7 @@ unify_bound_ttp_args (tree tparms, tree targs, tree parm, tree& arg,
{
/* In keeping with P0522R0, adjust P's template arguments
to apply to A's template; then flatten it again. */
- tree nparmvec = parmvec;
- nparmvec = coerce_ttp_args_for_tta (arg, parmvec, tf_none);
+ tree nparmvec = coerce_ttp_args_for_tta (arg, parmvec, tf_none);
nparmvec = expand_template_argument_pack (nparmvec);
if (unify (tparms, targs, nparmvec, argvec,
@@ -7885,7 +7884,6 @@ convert_template_argument (tree parm,
invalid, but static members are OK. In any
case, grab the underlying fields/functions
and issue an error later if required. */
- orig_arg = TREE_VALUE (arg);
TREE_TYPE (arg) = unknown_type_node;
}
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index ef78564..eb1b062 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -209,8 +209,8 @@ build_headof (tree exp)
offset = build_vtbl_ref (cp_build_fold_indirect_ref (exp),
index);
- type = cp_build_qualified_type (ptr_type_node,
- cp_type_quals (TREE_TYPE (exp)));
+ cp_build_qualified_type (ptr_type_node,
+ cp_type_quals (TREE_TYPE (exp)));
return fold_build_pointer_plus (exp, offset);
}
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 550064c..dd76ebe 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -9189,8 +9189,6 @@ convert_for_initialization (tree exp, tree type, tree rhs, int flags,
if (exp == error_mark_node)
return error_mark_node;
- rhstype = non_reference (rhstype);
-
type = complete_type (type);
if (DIRECT_INIT_EXPR_P (type, rhs))
diff --git a/gcc/cselib.c b/gcc/cselib.c
index a1cbdec..7b0545e 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -2518,13 +2518,12 @@ cselib_record_sets (rtx_insn *insn)
int n_sets = 0;
int i;
struct cselib_set sets[MAX_SETS];
- rtx body = PATTERN (insn);
rtx cond = 0;
int n_sets_before_autoinc;
int n_strict_low_parts = 0;
struct cselib_record_autoinc_data data;
- body = PATTERN (insn);
+ rtx body = PATTERN (insn);
if (GET_CODE (body) == COND_EXEC)
{
cond = COND_EXEC_TEST (body);
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 2eea149..81e221e 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -229,7 +229,6 @@ void
df_scan_alloc (bitmap all_blocks ATTRIBUTE_UNUSED)
{
struct df_scan_problem_data *problem_data;
- unsigned int insn_num = get_max_uid () + 1;
basic_block bb;
/* Given the number of pools, this is really faster than tearing
@@ -257,7 +256,6 @@ df_scan_alloc (bitmap all_blocks ATTRIBUTE_UNUSED)
bitmap_obstack_initialize (&problem_data->reg_bitmaps);
bitmap_obstack_initialize (&problem_data->insn_bitmaps);
- insn_num += insn_num / 4;
df_grow_reg_info ();
df_grow_insn_info ();
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 8626689..bac37a3 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -668,8 +668,6 @@ do_jump_by_parts_greater_rtx (scalar_int_mode mode, int unsignedp, rtx op0,
code = LE;
if_true_label = if_false_label;
if_false_label = drop_through_label;
- drop_through_if_true = false;
- drop_through_if_false = true;
prob = prob.invert ();
}
diff --git a/gcc/early-remat.c b/gcc/early-remat.c
index 122891c..0396f16 100644
--- a/gcc/early-remat.c
+++ b/gcc/early-remat.c
@@ -1123,7 +1123,6 @@ early_remat::record_equiv_candidates (unsigned int cand1_index,
ec->representative = cand1_index;
cand1->equiv_class = ec;
}
- cand1 = &m_candidates[ec->representative];
cand2->equiv_class = ec;
bitmap_set_bit (ec->members, cand2_index);
if (cand2_index > ec->representative)
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 58286f7..e265fa6 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -4017,7 +4017,7 @@ try_split (rtx pat, rtx_insn *trial, int last)
before = PREV_INSN (trial);
after = NEXT_INSN (trial);
- tem = emit_insn_after_setloc (seq, trial, INSN_LOCATION (trial));
+ emit_insn_after_setloc (seq, trial, INSN_LOCATION (trial));
delete_insn (trial);
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 4534d43..489d0b9 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -1105,14 +1105,12 @@ assign_parameter_index_in_region (tree name, sese_info_p region)
gcc_assert (TREE_CODE (name) == SSA_NAME
&& INTEGRAL_TYPE_P (TREE_TYPE (name))
&& ! defined_in_sese_p (name, region->region));
-
int i;
tree p;
FOR_EACH_VEC_ELT (region->params, i, p)
if (p == name)
return;
- i = region->params.length ();
region->params.safe_push (name);
}
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 69c00a9..b6e781f 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -4445,7 +4445,6 @@ static bool
cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs,
struct cgraph_node *node)
{
- struct ipa_node_params *orig_caller_info = IPA_NODE_REF (cs->caller);
struct ipa_node_params *orig_node_info;
struct ipa_agg_replacement_value *aggval;
int i, ec, count;
@@ -4462,8 +4461,6 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs,
return false;
orig_node_info = IPA_NODE_REF (IPA_NODE_REF (node)->ipcp_orig_node);
- if (orig_caller_info->ipcp_orig_node)
- orig_caller_info = IPA_NODE_REF (orig_caller_info->ipcp_orig_node);
for (i = 0; i < count; i++)
{
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index aa91b56..8a90ae1 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -1108,7 +1108,6 @@ setup_profitable_hard_regs (void)
|| empty_profitable_hard_regs (a))
continue;
data = ALLOCNO_COLOR_DATA (a);
- mode = ALLOCNO_MODE (a);
if ((costs = ALLOCNO_UPDATED_HARD_REG_COSTS (a)) != NULL
|| (costs = ALLOCNO_HARD_REG_COSTS (a)) != NULL)
{
diff --git a/gcc/ira.c b/gcc/ira.c
index 725636d..d4ea68f 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -4414,10 +4414,9 @@ rtx_moveable_p (rtx *loc, enum op_type type)
{
const char *fmt;
rtx x = *loc;
- enum rtx_code code = GET_CODE (x);
int i, j;
- code = GET_CODE (x);
+ enum rtx_code code = GET_CODE (x);
switch (code)
{
case CONST:
diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c
index fa0ebcd..f344e12 100644
--- a/gcc/lra-eliminations.c
+++ b/gcc/lra-eliminations.c
@@ -1054,7 +1054,6 @@ eliminate_regs_in_insn (rtx_insn *insn, bool replace_p, bool first_p,
single_set without having put new body into the insn and the
re-recognition won't hurt in this rare case. */
id = lra_update_insn_recog_data (insn);
- static_id = id->insn_static_data;
}
/* Spill pseudos which are assigned to hard registers in SET. Add
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c
index f37708f..6b1b811 100644
--- a/gcc/read-rtl.c
+++ b/gcc/read-rtl.c
@@ -1295,7 +1295,7 @@ read_subst_mapping (htab_t subst_iters_table, htab_t subst_attrs_table,
m = add_mapping (&substs, subst_iters_table, attr_operands[1]);
end_ptr = &m->values;
end_ptr = add_map_value (end_ptr, 1, "");
- end_ptr = add_map_value (end_ptr, 2, "");
+ add_map_value (end_ptr, 2, "");
add_define_attr_for_define_subst (attr_operands[1], queue);
}
@@ -1303,7 +1303,7 @@ read_subst_mapping (htab_t subst_iters_table, htab_t subst_attrs_table,
m = add_mapping (&substs, subst_attrs_table, attr_operands[0]);
end_ptr = &m->values;
end_ptr = add_map_value (end_ptr, 1, attr_operands[2]);
- end_ptr = add_map_value (end_ptr, 2, attr_operands[3]);
+ add_map_value (end_ptr, 2, attr_operands[3]);
}
/* Check newly-created code iterator ITERATOR to see whether every code has the
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 637b3cb..5259d56 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1426,10 +1426,9 @@ scan_rtx (rtx_insn *insn, rtx *loc, enum reg_class cl, enum scan_actions action,
{
const char *fmt;
rtx x = *loc;
- enum rtx_code code = GET_CODE (x);
int i, j;
- code = GET_CODE (x);
+ enum rtx_code code = GET_CODE (x);
switch (code)
{
case CONST:
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 8134938..bdfcf88 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -2708,14 +2708,13 @@ fill_slots_from_thread (rtx_jump_insn *insn, rtx condition,
&& GET_CODE (PATTERN (new_thread)) != ASM_INPUT
&& asm_noperands (PATTERN (new_thread)) < 0)
{
- rtx pat = PATTERN (new_thread);
rtx dest;
rtx src;
/* We know "new_thread" is an insn due to NONJUMP_INSN_P (new_thread)
above. */
trial = as_a <rtx_insn *> (new_thread);
- pat = PATTERN (trial);
+ rtx pat = PATTERN (trial);
if (!NONJUMP_INSN_P (trial)
|| GET_CODE (pat) != SET
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 48619fb..450af46 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -6241,11 +6241,11 @@ tree_function_versioning (tree old_decl, tree new_decl,
in the debug info that var (whole DECL_ORIGIN is the parm
PARM_DECL) is optimized away, but could be looked up at the
call site as value of D#X there. */
- tree var = vars, vexpr;
+ tree vexpr;
gimple_stmt_iterator cgsi
= gsi_after_labels (single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
gimple *def_temp;
- var = vars;
+ tree var = vars;
i = vec_safe_length (*debug_args);
do
{
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 6794fbd..9c1a9a6 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -2039,9 +2039,6 @@ optimize_ops_list (enum tree_code opcode,
i++;
}
- length = ops->length ();
- oelast = ops->last ();
-
if (iterate)
optimize_ops_list (opcode, ops);
}
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c
index 67dc127..3bfad0f 100644
--- a/gcc/tree-ssa-sink.c
+++ b/gcc/tree-ssa-sink.c
@@ -433,7 +433,6 @@ statement_sink_location (gimple *stmt, basic_block frombb,
if (gimple_code (use) != GIMPLE_PHI)
{
- sinkbb = gimple_bb (use);
sinkbb = select_best_block (frombb, gimple_bb (use), stmt);
if (sinkbb == frombb)
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 785227d..39ea22f 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -1361,7 +1361,6 @@ thread_across_edge (gcond *dummy_cond,
x = new jump_thread_edge (taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
path->safe_push (x);
- found = false;
found = thread_around_empty_blocks (taken_edge,
dummy_cond,
avail_exprs_stack,
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index b37bf6f..95c2d82 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -730,9 +730,7 @@ vect_get_loop_niters (struct loop *loop, tree *assumptions,
if (!exit)
return cond;
- niter = chrec_dont_know;
may_be_zero = NULL_TREE;
- niter_assumptions = boolean_true_node;
if (!number_of_iterations_exit_assumptions (loop, exit, &niter_desc, NULL)
|| chrec_contains_undetermined (niter_desc.niter))
return cond;
@@ -5113,7 +5111,6 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs,
if (off != 0)
{
tree new_idx_val = idx_val;
- tree new_val = val;
if (off != v_size - el_size)
{
new_idx_val = make_ssa_name (idx_eltype);
@@ -5122,7 +5119,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs,
old_idx_val);
gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
}
- new_val = make_ssa_name (data_eltype);
+ tree new_val = make_ssa_name (data_eltype);
epilog_stmt = gimple_build_assign (new_val,
COND_EXPR,
build2 (GT_EXPR,
@@ -5303,14 +5300,13 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs,
in a vector mode of smaller size and first reduce upper/lower
halves against each other. */
enum machine_mode mode1 = mode;
- tree vectype1 = vectype;
unsigned sz = tree_to_uhwi (TYPE_SIZE_UNIT (vectype));
unsigned sz1 = sz;
if (!slp_reduc
&& (mode1 = targetm.vectorize.split_reduction (mode)) != mode)
sz1 = GET_MODE_SIZE (mode1).to_constant ();
- vectype1 = get_vectype_for_scalar_type_and_size (scalar_type, sz1);
+ tree vectype1 = get_vectype_for_scalar_type_and_size (scalar_type, sz1);
reduce_with_shift = have_whole_vector_shift (mode1);
if (!VECTOR_MODE_P (mode1))
reduce_with_shift = false;
diff --git a/gcc/tree.c b/gcc/tree.c
index c97facd..2032a93 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -8212,8 +8212,6 @@ build_nonstandard_integer_type (unsigned HOST_WIDE_INT precision,
else
fixup_signed_type (itype);
- ret = itype;
-
inchash::hash hstate;
inchash::add_expr (TYPE_MAX_VALUE (itype), hstate);
ret = type_hash_canon (hstate.end (), itype);