Commit 0ff4ddeb by Ilya Enkovich Committed by Ilya Enkovich

tree-chkp.c (chkp_maybe_copy_and_register_bounds): Remove useless gimple_build_nop calls.

	* tree-chkp.c (chkp_maybe_copy_and_register_bounds): Remove useless
	gimple_build_nop calls.
	(chkp_find_bounds_for_elem): Likewise.
	(chkp_get_zero_bounds): Likewise.
	(chkp_get_none_bounds): Likewise.
	(chkp_get_bounds_by_definition): Likewise.
	(chkp_generate_extern_var_bounds): Likewise.
	(chkp_get_bounds_for_decl_addr): Likewise.
	(chkp_get_bounds_for_string_cst): Likewise.

From-SVN: r223434
parent a7e43c57
2015-05-20 Ilya Enkovich <enkovich.gnu@gmail.com>
* tree-chkp.c (chkp_maybe_copy_and_register_bounds): Remove useless
gimple_build_nop calls.
(chkp_find_bounds_for_elem): Likewise.
(chkp_get_zero_bounds): Likewise.
(chkp_get_none_bounds): Likewise.
(chkp_get_bounds_by_definition): Likewise.
(chkp_generate_extern_var_bounds): Likewise.
(chkp_get_bounds_for_decl_addr): Likewise.
(chkp_get_bounds_for_string_cst): Likewise.
2015-05-20 Bin Cheng <bin.cheng@arm.com> 2015-05-20 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/65447 PR tree-optimization/65447
......
...@@ -1181,10 +1181,10 @@ chkp_maybe_copy_and_register_bounds (tree ptr, tree bnd) ...@@ -1181,10 +1181,10 @@ chkp_maybe_copy_and_register_bounds (tree ptr, tree bnd)
gimple_stmt_iterator gsi; gimple_stmt_iterator gsi;
if (bnd_var) if (bnd_var)
copy = make_ssa_name (bnd_var, gimple_build_nop ()); copy = make_ssa_name (bnd_var);
else else
copy = make_temp_ssa_name (pointer_bounds_type_node, copy = make_temp_ssa_name (pointer_bounds_type_node,
gimple_build_nop (), NULL,
CHKP_BOUND_TMP_NAME); CHKP_BOUND_TMP_NAME);
bnd = chkp_get_orginal_bounds_for_abnormal_copy (bnd); bnd = chkp_get_orginal_bounds_for_abnormal_copy (bnd);
assign = gimple_build_assign (copy, bnd); assign = gimple_build_assign (copy, bnd);
...@@ -1544,7 +1544,7 @@ chkp_find_bounds_for_elem (tree elem, tree *all_bounds, ...@@ -1544,7 +1544,7 @@ chkp_find_bounds_for_elem (tree elem, tree *all_bounds,
{ {
if (!all_bounds[offs / POINTER_SIZE]) if (!all_bounds[offs / POINTER_SIZE])
{ {
tree temp = make_temp_ssa_name (type, gimple_build_nop (), ""); tree temp = make_temp_ssa_name (type, NULL, "");
gimple assign = gimple_build_assign (temp, elem); gimple assign = gimple_build_assign (temp, elem);
gimple_stmt_iterator gsi; gimple_stmt_iterator gsi;
...@@ -2053,7 +2053,7 @@ chkp_get_zero_bounds (void) ...@@ -2053,7 +2053,7 @@ chkp_get_zero_bounds (void)
gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ()); gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ());
gimple stmt; gimple stmt;
zero_bounds = chkp_get_tmp_reg (gimple_build_nop ()); zero_bounds = chkp_get_tmp_reg (NULL);
stmt = gimple_build_assign (zero_bounds, chkp_get_zero_bounds_var ()); stmt = gimple_build_assign (zero_bounds, chkp_get_zero_bounds_var ());
gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); gsi_insert_before (&gsi, stmt, GSI_SAME_STMT);
} }
...@@ -2083,7 +2083,7 @@ chkp_get_none_bounds (void) ...@@ -2083,7 +2083,7 @@ chkp_get_none_bounds (void)
gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ()); gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ());
gimple stmt; gimple stmt;
none_bounds = chkp_get_tmp_reg (gimple_build_nop ()); none_bounds = chkp_get_tmp_reg (NULL);
stmt = gimple_build_assign (none_bounds, chkp_get_none_bounds_var ()); stmt = gimple_build_assign (none_bounds, chkp_get_none_bounds_var ());
gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); gsi_insert_before (&gsi, stmt, GSI_SAME_STMT);
} }
...@@ -2738,7 +2738,7 @@ chkp_get_bounds_by_definition (tree node, gimple def_stmt, ...@@ -2738,7 +2738,7 @@ chkp_get_bounds_by_definition (tree node, gimple def_stmt,
var = chkp_get_bounds_var (SSA_NAME_VAR (node)); var = chkp_get_bounds_var (SSA_NAME_VAR (node));
else else
var = make_temp_ssa_name (pointer_bounds_type_node, var = make_temp_ssa_name (pointer_bounds_type_node,
gimple_build_nop (), NULL,
CHKP_BOUND_TMP_NAME); CHKP_BOUND_TMP_NAME);
else else
var = chkp_get_tmp_var (); var = chkp_get_tmp_var ();
...@@ -2918,7 +2918,7 @@ chkp_generate_extern_var_bounds (tree var) ...@@ -2918,7 +2918,7 @@ chkp_generate_extern_var_bounds (tree var)
gimple_seq_add_stmt (&seq, stmt); gimple_seq_add_stmt (&seq, stmt);
lb = chkp_build_addr_expr (var); lb = chkp_build_addr_expr (var);
size = make_ssa_name (chkp_get_size_tmp_var (), gimple_build_nop ()); size = make_ssa_name (chkp_get_size_tmp_var ());
if (flag_chkp_zero_dynamic_size_as_infinite) if (flag_chkp_zero_dynamic_size_as_infinite)
{ {
...@@ -3015,7 +3015,7 @@ chkp_get_bounds_for_decl_addr (tree decl) ...@@ -3015,7 +3015,7 @@ chkp_get_bounds_for_decl_addr (tree decl)
gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ()); gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ());
gimple stmt; gimple stmt;
bounds = chkp_get_tmp_reg (gimple_build_nop ()); bounds = chkp_get_tmp_reg (NULL);
stmt = gimple_build_assign (bounds, bnd_var); stmt = gimple_build_assign (bounds, bnd_var);
gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); gsi_insert_before (&gsi, stmt, GSI_SAME_STMT);
} }
...@@ -3059,7 +3059,7 @@ chkp_get_bounds_for_string_cst (tree cst) ...@@ -3059,7 +3059,7 @@ chkp_get_bounds_for_string_cst (tree cst)
gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ()); gimple_stmt_iterator gsi = gsi_start_bb (chkp_get_entry_block ());
gimple stmt; gimple stmt;
bounds = chkp_get_tmp_reg (gimple_build_nop ()); bounds = chkp_get_tmp_reg (NULL);
stmt = gimple_build_assign (bounds, bnd_var); stmt = gimple_build_assign (bounds, bnd_var);
gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); gsi_insert_before (&gsi, stmt, GSI_SAME_STMT);
} }
......
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