aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-09-26 16:19:55 +0000
committerJakub Jelinek <jakub@redhat.com>2011-09-26 16:19:55 +0000
commitce4a6bc38d7ccbc53f4bd1e21fa1d2189271f15b (patch)
tree1703d97374f453dce244795360190c541f24f0af /gcc/gimple.c
parent29b64f7aa567c2b8c640b8e75ed9d7957b70f8d4 (diff)
* gimple-fold.c (gimplify_and_update_call_from_tree): Set
gctx.into_ssa after push_gimplify_context. * gimple.c (gimple_build_call_valist): New function. * gimple.h (gimple_build_call_valist): New prototype. * tree-ssa-propagate.c (finish_update_gimple_call): New function. (update_gimple_call): Likewise. (update_call_from_tree): Use finish_update_gimple_call. * tree-ssa-propagate.h (update_gimple_call): New prototype. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@179204 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 75885bbb20e..9b8e1b1d7be 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -215,9 +215,10 @@ gimple_call_reset_alias_info (gimple s)
pt_solution_reset (gimple_call_clobber_set (s));
}
-/* Helper for gimple_build_call, gimple_build_call_vec and
- gimple_build_call_from_tree. Build the basic components of a
- GIMPLE_CALL statement to function FN with NARGS arguments. */
+/* Helper for gimple_build_call, gimple_build_call_valist,
+ gimple_build_call_vec and gimple_build_call_from_tree. Build the basic
+ components of a GIMPLE_CALL statement to function FN with NARGS
+ arguments. */
static inline gimple
gimple_build_call_1 (tree fn, unsigned nargs)
@@ -272,6 +273,26 @@ gimple_build_call (tree fn, unsigned nargs, ...)
}
+/* Build a GIMPLE_CALL statement to function FN. NARGS is the number of
+ arguments. AP contains the arguments. */
+
+gimple
+gimple_build_call_valist (tree fn, unsigned nargs, va_list ap)
+{
+ gimple call;
+ unsigned i;
+
+ gcc_assert (TREE_CODE (fn) == FUNCTION_DECL || is_gimple_call_addr (fn));
+
+ call = gimple_build_call_1 (fn, nargs);
+
+ for (i = 0; i < nargs; i++)
+ gimple_call_set_arg (call, i, va_arg (ap, tree));
+
+ return call;
+}
+
+
/* Helper for gimple_build_call_internal and gimple_build_call_internal_vec.
Build the basic components of a GIMPLE_CALL statement to internal
function FN with NARGS arguments. */