This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
tidy varargs bits in struct target
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Jul 2004 15:17:10 -0700
- Subject: tidy varargs bits in struct target
* target.h (struct gcc_target): Move gimplify_va_arg_expr
next to build_builtin_va_list.
* target-def.h (TARGET_GIMPLIFY_VA_ARG_EXPR): Update to match.
* builtins.c (gimplify_va_arg_expr): Likewise.
* gimplify.c (copy_if_shared_r): Likewise.
Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.361
diff -c -p -d -u -r1.361 builtins.c
--- builtins.c 11 Jul 2004 18:14:47 -0000 1.361
+++ builtins.c 12 Jul 2004 22:12:51 -0000
@@ -4642,11 +4642,11 @@ gimplify_va_arg_expr (tree *expr_p, tree
else
gimplify_expr (&valist, pre_p, post_p, is_gimple_min_lval, fb_lvalue);
- if (!targetm.calls.gimplify_va_arg_expr)
+ if (!targetm.gimplify_va_arg_expr)
/* Once most targets are converted this should abort. */
return GS_ALL_DONE;
- *expr_p = targetm.calls.gimplify_va_arg_expr (valist, type, pre_p, post_p);
+ *expr_p = targetm.gimplify_va_arg_expr (valist, type, pre_p, post_p);
return GS_OK;
}
}
Index: gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gimplify.c,v
retrieving revision 2.45
diff -c -p -d -u -r2.45 gimplify.c
--- gimplify.c 12 Jul 2004 06:56:41 -0000 2.45
+++ gimplify.c 12 Jul 2004 22:12:51 -0000
@@ -667,7 +667,7 @@ copy_if_shared_r (tree *tp, int *walk_su
{
TREE_VISITED (t) = 1;
if (TREE_CODE (*tp) == VA_ARG_EXPR
- && targetm.calls.gimplify_va_arg_expr == NULL)
+ && targetm.gimplify_va_arg_expr == NULL)
{
/* Mark any _DECL inside the operand as volatile to avoid
the optimizers messing around with it. We have to do this
Index: target-def.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target-def.h,v
retrieving revision 1.85
diff -c -p -d -u -r1.85 target-def.h
--- target-def.h 9 Jul 2004 22:42:37 -0000 1.85
+++ target-def.h 12 Jul 2004 22:12:52 -0000
@@ -376,7 +376,6 @@ Foundation, 59 Temple Place - Suite 330,
TARGET_STRICT_ARGUMENT_NAMING, \
TARGET_PRETEND_OUTGOING_VARARGS_NAMED, \
TARGET_SPLIT_COMPLEX_ARG, \
- TARGET_GIMPLIFY_VA_ARG_EXPR, \
}
@@ -458,6 +457,7 @@ Foundation, 59 Temple Place - Suite 330,
TARGET_CC_MODES_COMPATIBLE, \
TARGET_MACHINE_DEPENDENT_REORG, \
TARGET_BUILD_BUILTIN_VA_LIST, \
+ TARGET_GIMPLIFY_VA_ARG_EXPR, \
TARGET_GET_PCH_VALIDITY, \
TARGET_PCH_VALID_P, \
TARGET_DEFAULT_SHORT_ENUMS, \
Index: target.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target.h,v
retrieving revision 1.98
diff -c -p -d -u -r1.98 target.h
--- target.h 9 Jul 2004 22:42:37 -0000 1.98
+++ target.h 12 Jul 2004 22:12:52 -0000
@@ -414,6 +414,10 @@ struct gcc_target
/* Create the __builtin_va_list type. */
tree (* build_builtin_va_list) (void);
+ /* Gimplifies a VA_ARG_EXPR. */
+ tree (* gimplify_va_arg_expr) (tree valist, tree type, tree *pre_p,
+ tree *post_p);
+
/* Validity-checking routines for PCH files, target-specific.
get_pch_validity returns a pointer to the data to be stored,
and stores the size in its argument. pch_valid_p gets the same
@@ -458,10 +462,6 @@ struct gcc_target
/* Given a complex type T, return true if a parameter of type T
should be passed as two scalars. */
bool (* split_complex_arg) (tree type);
-
- /* Gimplifies a VA_ARG_EXPR. */
- tree (* gimplify_va_arg_expr) (tree valist, tree type, tree *pre_p,
- tree *post_p);
} calls;
/* Functions specific to the C++ frontend. */