summaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-04 21:29:11 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-04 21:29:11 +0000
commitaeb682a27a580c32813c316b911b59b851f6f34e (patch)
treecaef14d95e41d87b155a732aa16f18f483eea729 /gcc/gimple.c
parent8945e16bd0dc520c80b423cc0802c89ce551ff08 (diff)
parent8dd9f7ce09ba28909b069f5baa405ea4cc7b5c42 (diff)
downloadgcc-aeb682a27a580c32813c316b911b59b851f6f34e.tar.gz
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@204366 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index f6ed803857b..da7be0c4f4e 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -174,7 +174,7 @@ gimple_build_with_ops_stat (enum gimple_code code, unsigned subcode,
gimple
gimple_build_return (tree retval)
{
- gimple s = gimple_build_with_ops (GIMPLE_RETURN, ERROR_MARK, 1);
+ gimple s = gimple_build_with_ops (GIMPLE_RETURN, ERROR_MARK, 2);
if (retval)
gimple_return_set_retval (s, retval);
return s;
@@ -366,6 +366,26 @@ gimple_build_call_from_tree (tree t)
}
+/* Return index of INDEX's non bound argument of the call. */
+
+unsigned
+gimple_call_get_nobnd_arg_index (const_gimple gs, unsigned index)
+{
+ unsigned num_args = gimple_call_num_args (gs);
+ for (unsigned n = 0; n < num_args; n++)
+ {
+ if (POINTER_BOUNDS_P (gimple_call_arg (gs, n)))
+ continue;
+ else if (index)
+ index--;
+ else
+ return n;
+ }
+
+ gcc_unreachable ();
+}
+
+
/* Extract the operands and code for expression EXPR into *SUBCODE_P,
*OP1_P, *OP2_P and *OP3_P respectively. */