aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-18 09:17:27 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-18 09:17:27 +0000
commit446e85ebcae7373d636d095bf7a2b217a5d57295 (patch)
treef0f26ed65c436f49ceac348ef7b52caed61b31c0
parent08a2d161b947412f9124c2a77af79775ed132205 (diff)
2012-09-18 Richard Guenther <rguenther@suse.de>
* statistics.h (CXX_MEM_STAT_INFO): New define. * gimple.h (gimple_build_assign_with_ops_stat, gimple_build_assign_with_ops, gimple_build_assign_with_ops3): Turn into an overload of the function gimple_build_assign_with_ops. * gimple.c (gimple_build_assign_with_ops_stat): Rename to ... (gimple_build_assign_with_ops): ... this. * tree-ssa-loop-im.c (move_computations_stmt): Adjust. * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise. * tree-vect-data-refs.c (vect_permute_store_chain): Likewise. (vect_permute_load_chain): Likewise. * tree-vect-generic.c (expand_vector_divmod): Likewise. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise. (vect_recog_divmod_pattern): Likewise. (vect_recog_mixed_size_cond_pattern): Likewise. (adjust_bool_pattern): Likewise. * tree-vect-slp.c (vect_create_mask_and_perm): Likewise. * tree-vect-stmts.c (vectorizable_operation): Likewise. (permute_vec_elements): Likewise. (vectorizable_load): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191415 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog22
-rw-r--r--gcc/gimple.c16
-rw-r--r--gcc/gimple.h12
-rw-r--r--gcc/statistics.h6
-rw-r--r--gcc/tree-ssa-loop-im.c6
-rw-r--r--gcc/tree-ssa-math-opts.c8
-rw-r--r--gcc/tree-vect-data-refs.c20
-rw-r--r--gcc/tree-vect-generic.c4
-rw-r--r--gcc/tree-vect-patterns.c46
-rw-r--r--gcc/tree-vect-slp.c4
-rw-r--r--gcc/tree-vect-stmts.c14
11 files changed, 97 insertions, 61 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3298a9f5436..de3e9c1c826 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,25 @@
+2012-09-18 Richard Guenther <rguenther@suse.de>
+
+ * statistics.h (CXX_MEM_STAT_INFO): New define.
+ * gimple.h (gimple_build_assign_with_ops_stat,
+ gimple_build_assign_with_ops, gimple_build_assign_with_ops3):
+ Turn into an overload of the function gimple_build_assign_with_ops.
+ * gimple.c (gimple_build_assign_with_ops_stat): Rename to ...
+ (gimple_build_assign_with_ops): ... this.
+ * tree-ssa-loop-im.c (move_computations_stmt): Adjust.
+ * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
+ * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
+ (vect_permute_load_chain): Likewise.
+ * tree-vect-generic.c (expand_vector_divmod): Likewise.
+ * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
+ (vect_recog_divmod_pattern): Likewise.
+ (vect_recog_mixed_size_cond_pattern): Likewise.
+ (adjust_bool_pattern): Likewise.
+ * tree-vect-slp.c (vect_create_mask_and_perm): Likewise.
+ * tree-vect-stmts.c (vectorizable_operation): Likewise.
+ (permute_vec_elements): Likewise.
+ (vectorizable_load): Likewise.
+
2012-09-17 Paul Koning <ni1d@arrl.net>
* doc/invoke.text (-feliminate-unused-debug-types): Update to
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 7c702cad71a..2bb4b67ab54 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -424,8 +424,8 @@ gimple_build_assign_stat (tree lhs, tree rhs MEM_STAT_DECL)
tree op1, op2, op3;
extract_ops_from_tree_1 (rhs, &subcode, &op1, &op2, &op3);
- return gimple_build_assign_with_ops_stat (subcode, lhs, op1, op2, op3
- PASS_MEM_STAT);
+ return gimple_build_assign_with_ops (subcode, lhs, op1, op2, op3
+ PASS_MEM_STAT);
}
@@ -434,8 +434,8 @@ gimple_build_assign_stat (tree lhs, tree rhs MEM_STAT_DECL)
GIMPLE_UNARY_RHS or GIMPLE_SINGLE_RHS. */
gimple
-gimple_build_assign_with_ops_stat (enum tree_code subcode, tree lhs, tree op1,
- tree op2, tree op3 MEM_STAT_DECL)
+gimple_build_assign_with_ops (enum tree_code subcode, tree lhs, tree op1,
+ tree op2, tree op3 MEM_STAT_DECL)
{
unsigned num_ops;
gimple p;
@@ -463,6 +463,14 @@ gimple_build_assign_with_ops_stat (enum tree_code subcode, tree lhs, tree op1,
return p;
}
+gimple
+gimple_build_assign_with_ops (enum tree_code subcode, tree lhs, tree op1,
+ tree op2 MEM_STAT_DECL)
+{
+ return gimple_build_assign_with_ops (subcode, lhs, op1, op2, NULL_TREE
+ PASS_MEM_STAT);
+}
+
/* Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 797cd944450..58696896050 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -744,12 +744,12 @@ gimple gimple_build_assign_stat (tree, tree MEM_STAT_DECL);
void extract_ops_from_tree_1 (tree, enum tree_code *, tree *, tree *, tree *);
-gimple gimple_build_assign_with_ops_stat (enum tree_code, tree, tree,
- tree, tree MEM_STAT_DECL);
-#define gimple_build_assign_with_ops(c,o1,o2,o3) \
- gimple_build_assign_with_ops_stat (c, o1, o2, o3, NULL_TREE MEM_STAT_INFO)
-#define gimple_build_assign_with_ops3(c,o1,o2,o3,o4) \
- gimple_build_assign_with_ops_stat (c, o1, o2, o3, o4 MEM_STAT_INFO)
+gimple
+gimple_build_assign_with_ops (enum tree_code, tree,
+ tree, tree CXX_MEM_STAT_INFO);
+gimple
+gimple_build_assign_with_ops (enum tree_code, tree,
+ tree, tree, tree CXX_MEM_STAT_INFO);
gimple gimple_build_debug_bind_stat (tree, tree, gimple MEM_STAT_DECL);
#define gimple_build_debug_bind(var,val,stmt) \
diff --git a/gcc/statistics.h b/gcc/statistics.h
index 8ec0a990003..6bb8166165c 100644
--- a/gcc/statistics.h
+++ b/gcc/statistics.h
@@ -38,6 +38,11 @@
#define PASS_MEM_STAT , ALONE_PASS_MEM_STAT
#define FINAL_PASS_MEM_STAT , ALONE_FINAL_PASS_MEM_STAT
#define MEM_STAT_INFO , ALONE_MEM_STAT_INFO
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
+#define CXX_MEM_STAT_INFO , const char * _loc_name = __builtin_FILE (), int _loc_line = __builtin_LINE (), const char * _loc_function = __builtin_FUNCTION ()
+#else
+#define CXX_MEM_STAT_INFO , const char * _loc_name = __FILE__, int _loc_line = __LINE__, const char * _loc_function = NULL
+#endif
#else
#define ALONE_MEM_STAT_DECL void
#define ALONE_FINAL_MEM_STAT_DECL GCC_MEM_STAT_ARGUMENTS
@@ -49,6 +54,7 @@
#define PASS_MEM_STAT
#define FINAL_PASS_MEM_STAT , ALONE_FINAL_PASS_MEM_STAT
#define MEM_STAT_INFO ALONE_MEM_STAT_INFO
+#define CXX_MEM_STAT_INFO
#endif
struct function;
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 67cab3a31ae..e76e64398ea 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -1273,9 +1273,9 @@ move_computations_stmt (struct dom_walk_data *dw_data,
gcc_assert (arg0 && arg1);
t = build2 (gimple_cond_code (cond), boolean_type_node,
gimple_cond_lhs (cond), gimple_cond_rhs (cond));
- new_stmt = gimple_build_assign_with_ops3 (COND_EXPR,
- gimple_phi_result (stmt),
- t, arg0, arg1);
+ new_stmt = gimple_build_assign_with_ops (COND_EXPR,
+ gimple_phi_result (stmt),
+ t, arg0, arg1);
SSA_NAME_DEF_STMT (gimple_phi_result (stmt)) = new_stmt;
*((unsigned int *)(dw_data->global_data)) |= TODO_cleanup_cfg;
}
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index 2020bb138cc..16ff397d47d 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -2604,10 +2604,10 @@ convert_mult_to_fma (gimple mul_stmt, tree op1, tree op2)
true, NULL_TREE, true,
GSI_SAME_STMT);
- fma_stmt = gimple_build_assign_with_ops3 (FMA_EXPR,
- gimple_assign_lhs (use_stmt),
- mulop1, op2,
- addop);
+ fma_stmt = gimple_build_assign_with_ops (FMA_EXPR,
+ gimple_assign_lhs (use_stmt),
+ mulop1, op2,
+ addop);
gsi_replace (&gsi, fma_stmt, true);
widen_mul_stats.fmas_inserted++;
}
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 4a5624e1092..09704694dea 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -4170,8 +4170,8 @@ vect_permute_store_chain (VEC(tree,heap) *dr_chain,
high = VEC_PERM_EXPR <vect1, vect2, {0, nelt, 1, nelt+1, ...}> */
high = make_temp_ssa_name (vectype, NULL, "vect_inter_high");
perm_stmt
- = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, high,
- vect1, vect2, perm_mask_high);
+ = gimple_build_assign_with_ops (VEC_PERM_EXPR, high,
+ vect1, vect2, perm_mask_high);
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
VEC_replace (tree, *result_chain, 2*j, high);
@@ -4180,8 +4180,8 @@ vect_permute_store_chain (VEC(tree,heap) *dr_chain,
nelt*3/2+1, ...}> */
low = make_temp_ssa_name (vectype, NULL, "vect_inter_low");
perm_stmt
- = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, low,
- vect1, vect2, perm_mask_low);
+ = gimple_build_assign_with_ops (VEC_PERM_EXPR, low,
+ vect1, vect2, perm_mask_low);
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
VEC_replace (tree, *result_chain, 2*j+1, low);
}
@@ -4618,17 +4618,17 @@ vect_permute_load_chain (VEC(tree,heap) *dr_chain,
/* data_ref = permute_even (first_data_ref, second_data_ref); */
data_ref = make_temp_ssa_name (vectype, NULL, "vect_perm_even");
- perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, data_ref,
- first_vect, second_vect,
- perm_mask_even);
+ perm_stmt = gimple_build_assign_with_ops (VEC_PERM_EXPR, data_ref,
+ first_vect, second_vect,
+ perm_mask_even);
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
VEC_replace (tree, *result_chain, j/2, data_ref);
/* data_ref = permute_odd (first_data_ref, second_data_ref); */
data_ref = make_temp_ssa_name (vectype, NULL, "vect_perm_odd");
- perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, data_ref,
- first_vect, second_vect,
- perm_mask_odd);
+ perm_stmt = gimple_build_assign_with_ops (VEC_PERM_EXPR, data_ref,
+ first_vect, second_vect,
+ perm_mask_odd);
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
VEC_replace (tree, *result_chain, j/2+length/2, data_ref);
}
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index b217b1123e9..85fb3a29bca 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -667,8 +667,8 @@ expand_vector_divmod (gimple_stmt_iterator *gsi, tree type, tree op0,
<< shifts[i]) - 1);
cst = build_vector (type, vec);
addend = make_ssa_name (type, NULL);
- stmt = gimple_build_assign_with_ops3 (VEC_COND_EXPR, addend,
- cond, cst, zero);
+ stmt = gimple_build_assign_with_ops (VEC_COND_EXPR, addend,
+ cond, cst, zero);
gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
}
}
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 1b78a54c42e..ef65c3f8858 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -413,8 +413,8 @@ vect_recog_dot_prod_pattern (VEC (gimple, heap) **stmts, tree *type_in,
/* Pattern detected. Create a stmt to be used to replace the pattern: */
var = vect_recog_temp_ssa_var (type, NULL);
- pattern_stmt = gimple_build_assign_with_ops3 (DOT_PROD_EXPR, var,
- oprnd00, oprnd01, oprnd1);
+ pattern_stmt = gimple_build_assign_with_ops (DOT_PROD_EXPR, var,
+ oprnd00, oprnd01, oprnd1);
if (vect_print_dump_info (REPORT_DETAILS))
{
@@ -1688,12 +1688,12 @@ vect_recog_divmod_pattern (VEC (gimple, heap) **stmts,
tree var = vect_recog_temp_ssa_var (itype, NULL);
tree shift;
def_stmt
- = gimple_build_assign_with_ops3 (COND_EXPR, var, cond,
- fold_build2 (MINUS_EXPR, itype,
- oprnd1,
- build_int_cst (itype,
- 1)),
- build_int_cst (itype, 0));
+ = gimple_build_assign_with_ops (COND_EXPR, var, cond,
+ fold_build2 (MINUS_EXPR, itype,
+ oprnd1,
+ build_int_cst (itype,
+ 1)),
+ build_int_cst (itype, 0));
new_pattern_def_seq (stmt_vinfo, def_stmt);
var = vect_recog_temp_ssa_var (itype, NULL);
def_stmt
@@ -1716,9 +1716,9 @@ vect_recog_divmod_pattern (VEC (gimple, heap) **stmts,
{
signmask = vect_recog_temp_ssa_var (itype, NULL);
def_stmt
- = gimple_build_assign_with_ops3 (COND_EXPR, signmask, cond,
- build_int_cst (itype, 1),
- build_int_cst (itype, 0));
+ = gimple_build_assign_with_ops (COND_EXPR, signmask, cond,
+ build_int_cst (itype, 1),
+ build_int_cst (itype, 0));
append_pattern_def_seq (stmt_vinfo, def_stmt);
}
else
@@ -1732,9 +1732,9 @@ vect_recog_divmod_pattern (VEC (gimple, heap) **stmts,
tree var = vect_recog_temp_ssa_var (utype, NULL);
def_stmt
- = gimple_build_assign_with_ops3 (COND_EXPR, var, cond,
- build_int_cst (utype, -1),
- build_int_cst (utype, 0));
+ = gimple_build_assign_with_ops (COND_EXPR, var, cond,
+ build_int_cst (utype, -1),
+ build_int_cst (utype, 0));
def_stmt_vinfo
= new_stmt_vec_info (def_stmt, loop_vinfo, bb_vinfo);
set_vinfo_for_stmt (def_stmt, def_stmt_vinfo);
@@ -2172,11 +2172,11 @@ vect_recog_mixed_size_cond_pattern (VEC (gimple, heap) **stmts, tree *type_in,
}
def_stmt
- = gimple_build_assign_with_ops3 (COND_EXPR,
- vect_recog_temp_ssa_var (itype, NULL),
- unshare_expr (cond_expr),
- fold_convert (itype, then_clause),
- fold_convert (itype, else_clause));
+ = gimple_build_assign_with_ops (COND_EXPR,
+ vect_recog_temp_ssa_var (itype, NULL),
+ unshare_expr (cond_expr),
+ fold_convert (itype, then_clause),
+ fold_convert (itype, else_clause));
pattern_stmt
= gimple_build_assign_with_ops (NOP_EXPR,
vect_recog_temp_ssa_var (type, NULL),
@@ -2476,10 +2476,10 @@ adjust_bool_pattern (tree var, tree out_type, tree trueval,
gcc_checking_assert (useless_type_conversion_p (itype,
TREE_TYPE (trueval)));
pattern_stmt
- = gimple_build_assign_with_ops3 (COND_EXPR,
- vect_recog_temp_ssa_var (itype, NULL),
- cond_expr, trueval,
- build_int_cst (itype, 0));
+ = gimple_build_assign_with_ops (COND_EXPR,
+ vect_recog_temp_ssa_var (itype, NULL),
+ cond_expr, trueval,
+ build_int_cst (itype, 0));
break;
}
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 11dbdfb5a02..83cbb49fb22 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -2672,8 +2672,8 @@ vect_create_mask_and_perm (gimple stmt, gimple next_scalar_stmt,
second_vec = VEC_index (tree, dr_chain, second_vec_indx);
/* Generate the permute statement. */
- perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, perm_dest,
- first_vec, second_vec, mask);
+ perm_stmt = gimple_build_assign_with_ops (VEC_PERM_EXPR, perm_dest,
+ first_vec, second_vec, mask);
data_ref = make_ssa_name (perm_dest, perm_stmt);
gimple_set_lhs (perm_stmt, data_ref);
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index ab4a26c2b28..210e5b572fa 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -3702,8 +3702,8 @@ vectorizable_operation (gimple stmt, gimple_stmt_iterator *gsi,
? VEC_index (tree, vec_oprnds1, i) : NULL_TREE);
vop2 = ((op_type == ternary_op)
? VEC_index (tree, vec_oprnds2, i) : NULL_TREE);
- new_stmt = gimple_build_assign_with_ops3 (code, vec_dest,
- vop0, vop1, vop2);
+ new_stmt = gimple_build_assign_with_ops (code, vec_dest,
+ vop0, vop1, vop2);
new_temp = make_ssa_name (vec_dest, new_stmt);
gimple_assign_set_lhs (new_stmt, new_temp);
vect_finish_stmt_generation (stmt, new_stmt, gsi);
@@ -4235,8 +4235,8 @@ permute_vec_elements (tree x, tree y, tree mask_vec, gimple stmt,
data_ref = make_ssa_name (perm_dest, NULL);
/* Generate the permute statement. */
- perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, data_ref,
- x, y, mask_vec);
+ perm_stmt = gimple_build_assign_with_ops (VEC_PERM_EXPR, data_ref,
+ x, y, mask_vec);
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
return data_ref;
@@ -5047,9 +5047,9 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
realignment_token = dataref_ptr;
vec_dest = vect_create_destination_var (scalar_dest, vectype);
new_stmt
- = gimple_build_assign_with_ops3 (REALIGN_LOAD_EXPR,
- vec_dest, msq, lsq,
- realignment_token);
+ = gimple_build_assign_with_ops (REALIGN_LOAD_EXPR,
+ vec_dest, msq, lsq,
+ realignment_token);
new_temp = make_ssa_name (vec_dest, new_stmt);
gimple_assign_set_lhs (new_stmt, new_temp);
vect_finish_stmt_generation (stmt, new_stmt, gsi);