diff options
author | Tom de Vries <tom@codesourcery.com> | 2015-04-17 09:26:59 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2015-04-17 09:26:59 +0000 |
commit | f8e89441bc5518f450b6511c59c17c837859d109 (patch) | |
tree | 5d4de8b2de7d1bc521bef75e9c0cea144cf87699 /gcc/tree-pass.h | |
parent | 1691b2e1ca494eee178a70c73c0f941ff27118f6 (diff) | |
download | gcc-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/tree-pass.h')
-rw-r--r-- | gcc/tree-pass.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index bc8763d..172bd82 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -221,6 +221,7 @@ protected: #define PROP_loops (1 << 11) /* preserve loop structures */ #define PROP_gimple_lvec (1 << 12) /* lowered vector */ #define PROP_gimple_eomp (1 << 13) /* no OpenMP directives */ +#define PROP_gimple_lva (1 << 14) /* No va_arg internal function. */ #define PROP_trees \ (PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp) @@ -589,6 +590,7 @@ extern gimple_opt_pass *make_pass_early_inline (gcc::context *ctxt); extern gimple_opt_pass *make_pass_inline_parameters (gcc::context *ctxt); extern gimple_opt_pass *make_pass_update_address_taken (gcc::context *ctxt); extern gimple_opt_pass *make_pass_convert_switch (gcc::context *ctxt); +extern gimple_opt_pass *make_pass_lower_vaarg (gcc::context *ctxt); /* Current optimization pass. */ extern opt_pass *current_pass; |