aboutsummaryrefslogtreecommitdiff
path: root/gcc/internal-fn.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2015-04-17 09:26:59 +0000
committerTom de Vries <vries@gcc.gnu.org>2015-04-17 09:26:59 +0000
commitf8e89441bc5518f450b6511c59c17c837859d109 (patch)
tree5d4de8b2de7d1bc521bef75e9c0cea144cf87699 /gcc/internal-fn.c
parent1691b2e1ca494eee178a70c73c0f941ff27118f6 (diff)
downloadgcc-f8e89441bc5518f450b6511c59c17c837859d109.zip
gcc-f8e89441bc5518f450b6511c59c17c837859d109.tar.gz
gcc-f8e89441bc5518f450b6511c59c17c837859d109.tar.bz2
Postpone expanding va_arg until pass_stdarg
2015-04-17 Tom de Vries <tom@codesourcery.com> Michael Matz <matz@suse.de> * gimple-iterator.c (update_modified_stmts): Remove static. * gimple-iterator.h (update_modified_stmts): Declare. * gimplify.c (gimplify_modify_expr): Handle IFN_VA_ARG. (gimplify_va_arg_internal): New function. (gimplify_va_arg_expr): Use IFN_VA_ARG. * gimplify.h (gimplify_va_arg_internal): Declare. * internal-fn.c (expand_VA_ARG): New unreachable function. * internal-fn.def (VA_ARG): New DEF_INTERNAL_FN. * tree-stdarg.c (gimple_call_ifn_va_arg_p, expand_ifn_va_arg_1) (expand_ifn_va_arg): New function. (pass_data_stdarg): Add PROP_gimple_lva to properties_provided field. (pass_stdarg::execute): Call expand_ifn_va_arg. (pass_data_lower_vaarg): New pass_data. (pass_lower_vaarg): New gimple_opt_pass. (pass_lower_vaarg::gate, pass_lower_vaarg::execute) (make_pass_lower_vaarg): New function. * cfgexpand.c (pass_data_expand): Add PROP_gimple_lva to properties_required field. * passes.def (all_passes): Add pass_lower_vaarg. * tree-pass.h (PROP_gimple_lva): Add define. (make_pass_lower_vaarg): Declare. * gcc.dg/tree-ssa/stdarg-2.c: Change f15 scan-tree-dump for target x86_64-*-*. Co-Authored-By: Michael Matz <matz@suse.de> From-SVN: r222173
Diffstat (limited to 'gcc/internal-fn.c')
-rw-r--r--gcc/internal-fn.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index e402825..0053ed9 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -1972,6 +1972,15 @@ expand_BUILTIN_EXPECT (gcall *stmt)
emit_move_insn (target, val);
}
+/* IFN_VA_ARG is supposed to be expanded at pass_stdarg. So this dummy function
+ should never be called. */
+
+static void
+expand_VA_ARG (gcall *stmt ATTRIBUTE_UNUSED)
+{
+ gcc_unreachable ();
+}
+
/* Routines to expand each internal function, indexed by function number.
Each routine has the prototype: