@@ -12222,7 +12222,7 @@ fold_build1_stat_loc (location_t loc,
tem = fold_unary_loc (loc, code, type, op0);
if (!tem)
- tem = build1_stat_loc (loc, code, type, op0 PASS_MEM_STAT);
+ tem = build1_loc (loc, code, type, op0 PASS_MEM_STAT);
#ifdef ENABLE_FOLD_CHECKING
md5_init_ctx (&ctx);
@@ -12268,7 +12268,7 @@ fold_build2_stat_loc (location_t loc,
tem = fold_binary_loc (loc, code, type, op0, op1);
if (!tem)
- tem = build2_stat_loc (loc, code, type, op0, op1 PASS_MEM_STAT);
+ tem = build2_loc (loc, code, type, op0, op1 PASS_MEM_STAT);
#ifdef ENABLE_FOLD_CHECKING
md5_init_ctx (&ctx);
@@ -12328,7 +12328,7 @@ fold_build3_stat_loc (location_t loc, enum tree_code code, tree type,
gcc_assert (TREE_CODE_CLASS (code) != tcc_vl_exp);
tem = fold_ternary_loc (loc, code, type, op0, op1, op2);
if (!tem)
- tem = build3_stat_loc (loc, code, type, op0, op1, op2 PASS_MEM_STAT);
+ tem = build3_loc (loc, code, type, op0, op1, op2 PASS_MEM_STAT);
#ifdef ENABLE_FOLD_CHECKING
md5_init_ctx (&ctx);
@@ -4365,7 +4365,7 @@ do { tree _node = (NODE); \
enough for all extant tree codes. */
tree
-build0_stat (enum tree_code code, tree tt MEM_STAT_DECL)
+build0 (enum tree_code code, tree tt MEM_STAT_DECL)
{
tree t;
@@ -4378,7 +4378,7 @@ build0_stat (enum tree_code code, tree tt MEM_STAT_DECL)
}
tree
-build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL)
+build1 (enum tree_code code, tree type, tree node MEM_STAT_DECL)
{
int length = sizeof (struct tree_exp);
tree t;
@@ -4454,7 +4454,7 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL)
} while (0)
tree
-build2_stat (enum tree_code code, tree tt, tree arg0, tree arg1 MEM_STAT_DECL)
+build2 (enum tree_code code, tree tt, tree arg0, tree arg1 MEM_STAT_DECL)
{
bool constant, read_only, side_effects, div_by_zero;
tree t;
@@ -4534,8 +4534,8 @@ build2_stat (enum tree_code code, tree tt, tree arg0, tree arg1 MEM_STAT_DECL)
tree
-build3_stat (enum tree_code code, tree tt, tree arg0, tree arg1,
- tree arg2 MEM_STAT_DECL)
+build3 (enum tree_code code, tree tt, tree arg0, tree arg1,
+ tree arg2 MEM_STAT_DECL)
{
bool constant, read_only, side_effects;
tree t;
@@ -4575,8 +4575,8 @@ build3_stat (enum tree_code code, tree tt, tree arg0, tree arg1,
}
tree
-build4_stat (enum tree_code code, tree tt, tree arg0, tree arg1,
- tree arg2, tree arg3 MEM_STAT_DECL)
+build4 (enum tree_code code, tree tt, tree arg0, tree arg1,
+ tree arg2, tree arg3 MEM_STAT_DECL)
{
bool constant, read_only, side_effects;
tree t;
@@ -4602,8 +4602,8 @@ build4_stat (enum tree_code code, tree tt, tree arg0, tree arg1,
}
tree
-build5_stat (enum tree_code code, tree tt, tree arg0, tree arg1,
- tree arg2, tree arg3, tree arg4 MEM_STAT_DECL)
+build5 (enum tree_code code, tree tt, tree arg0, tree arg1,
+ tree arg2, tree arg3, tree arg4 MEM_STAT_DECL)
{
bool constant, read_only, side_effects;
tree t;
@@ -3929,81 +3929,67 @@ extern tree grow_tree_vec_stat (tree v, int MEM_STAT_DECL);
extern tree build_nt (enum tree_code, ...);
extern tree build_nt_call_vec (tree, vec<tree, va_gc> *);
-extern tree build0_stat (enum tree_code, tree MEM_STAT_DECL);
-#define build0(c,t) build0_stat (c,t MEM_STAT_INFO)
-extern tree build1_stat (enum tree_code, tree, tree MEM_STAT_DECL);
-#define build1(c,t1,t2) build1_stat (c,t1,t2 MEM_STAT_INFO)
-extern tree build2_stat (enum tree_code, tree, tree, tree MEM_STAT_DECL);
-#define build2(c,t1,t2,t3) build2_stat (c,t1,t2,t3 MEM_STAT_INFO)
-extern tree build3_stat (enum tree_code, tree, tree, tree, tree MEM_STAT_DECL);
-#define build3(c,t1,t2,t3,t4) build3_stat (c,t1,t2,t3,t4 MEM_STAT_INFO)
-extern tree build4_stat (enum tree_code, tree, tree, tree, tree,
- tree MEM_STAT_DECL);
-#define build4(c,t1,t2,t3,t4,t5) build4_stat (c,t1,t2,t3,t4,t5 MEM_STAT_INFO)
-extern tree build5_stat (enum tree_code, tree, tree, tree, tree, tree,
- tree MEM_STAT_DECL);
-#define build5(c,t1,t2,t3,t4,t5,t6) build5_stat (c,t1,t2,t3,t4,t5,t6 MEM_STAT_INFO)
+extern tree build0 (enum tree_code, tree CXX_MEM_STAT_INFO);
+extern tree build1 (enum tree_code, tree, tree CXX_MEM_STAT_INFO);
+extern tree build2 (enum tree_code, tree, tree, tree CXX_MEM_STAT_INFO);
+extern tree build3 (enum tree_code, tree, tree, tree, tree CXX_MEM_STAT_INFO);
+extern tree build4 (enum tree_code, tree, tree, tree, tree,
+ tree CXX_MEM_STAT_INFO);
+extern tree build5 (enum tree_code, tree, tree, tree, tree, tree,
+ tree CXX_MEM_STAT_INFO);
/* _loc versions of build[1-5]. */
static inline tree
-build1_stat_loc (location_t loc, enum tree_code code, tree type,
- tree arg1 MEM_STAT_DECL)
+build1_loc (location_t loc, enum tree_code code, tree type,
+ tree arg1 CXX_MEM_STAT_INFO)
{
- tree t = build1_stat (code, type, arg1 PASS_MEM_STAT);
+ tree t = build1 (code, type, arg1 PASS_MEM_STAT);
if (CAN_HAVE_LOCATION_P (t))
SET_EXPR_LOCATION (t, loc);
return t;
}
-#define build1_loc(l,c,t1,t2) build1_stat_loc (l,c,t1,t2 MEM_STAT_INFO)
static inline tree
-build2_stat_loc (location_t loc, enum tree_code code, tree type, tree arg0,
- tree arg1 MEM_STAT_DECL)
+build2_loc (location_t loc, enum tree_code code, tree type, tree arg0,
+ tree arg1 CXX_MEM_STAT_INFO)
{
- tree t = build2_stat (code, type, arg0, arg1 PASS_MEM_STAT);
+ tree t = build2 (code, type, arg0, arg1 PASS_MEM_STAT);
if (CAN_HAVE_LOCATION_P (t))
SET_EXPR_LOCATION (t, loc);
return t;
}
-#define build2_loc(l,c,t1,t2,t3) build2_stat_loc (l,c,t1,t2,t3 MEM_STAT_INFO)
static inline tree
-build3_stat_loc (location_t loc, enum tree_code code, tree type, tree arg0,
- tree arg1, tree arg2 MEM_STAT_DECL)
+build3_loc (location_t loc, enum tree_code code, tree type, tree arg0,
+ tree arg1, tree arg2 CXX_MEM_STAT_INFO)
{
- tree t = build3_stat (code, type, arg0, arg1, arg2 PASS_MEM_STAT);
+ tree t = build3 (code, type, arg0, arg1, arg2 PASS_MEM_STAT);
if (CAN_HAVE_LOCATION_P (t))
SET_EXPR_LOCATION (t, loc);
return t;
}
-#define build3_loc(l,c,t1,t2,t3,t4) \
- build3_stat_loc (l,c,t1,t2,t3,t4 MEM_STAT_INFO)
static inline tree
-build4_stat_loc (location_t loc, enum tree_code code, tree type, tree arg0,
- tree arg1, tree arg2, tree arg3 MEM_STAT_DECL)
+build4_loc (location_t loc, enum tree_code code, tree type, tree arg0,
+ tree arg1, tree arg2, tree arg3 CXX_MEM_STAT_INFO)
{
- tree t = build4_stat (code, type, arg0, arg1, arg2, arg3 PASS_MEM_STAT);
+ tree t = build4 (code, type, arg0, arg1, arg2, arg3 PASS_MEM_STAT);
if (CAN_HAVE_LOCATION_P (t))
SET_EXPR_LOCATION (t, loc);
return t;
}
-#define build4_loc(l,c,t1,t2,t3,t4,t5) \
- build4_stat_loc (l,c,t1,t2,t3,t4,t5 MEM_STAT_INFO)
static inline tree
-build5_stat_loc (location_t loc, enum tree_code code, tree type, tree arg0,
- tree arg1, tree arg2, tree arg3, tree arg4 MEM_STAT_DECL)
+build5_loc (location_t loc, enum tree_code code, tree type, tree arg0,
+ tree arg1, tree arg2, tree arg3, tree arg4 CXX_MEM_STAT_INFO)
{
- tree t = build5_stat (code, type, arg0, arg1, arg2, arg3,
+ tree t = build5 (code, type, arg0, arg1, arg2, arg3,
arg4 PASS_MEM_STAT);
if (CAN_HAVE_LOCATION_P (t))
SET_EXPR_LOCATION (t, loc);
return t;
}
-#define build5_loc(l,c,t1,t2,t3,t4,t5,t6) \
- build5_stat_loc (l,c,t1,t2,t3,t4,t5,t6 MEM_STAT_INFO)
extern tree build_var_debug_value_stat (tree, tree MEM_STAT_DECL);
#define build_var_debug_value(t1,t2) \
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org> gcc/ChangeLog: 2017-07-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * fold-const.c (fold_build1_stat_loc): Adjust. (fold_build2_stat_loc): Likewise. (fold_build3_stat_loc): Likewise. * tree.c (build0_stat): Remove _stat from name. (build1_stat): Likewise. (build2_stat): Likewise. (build3_stat): Likewise. (build4_stat): Likewise. (build5_stat): Likewise. * tree.h (build1_loc): Remove macro, and rename _stat function to this. (build2_loc): Likewise. (build3_loc): Likewise. (build4_loc): Likewise. (build5_loc): Likewise. --- gcc/fold-const.c | 6 +++--- gcc/tree.c | 18 ++++++++--------- gcc/tree.h | 60 ++++++++++++++++++++++---------------------------------- 3 files changed, 35 insertions(+), 49 deletions(-)