diff options
author | Ilya Enkovich <ilya.enkovich@intel.com> | 2013-10-30 09:09:44 +0000 |
---|---|---|
committer | Kirill Yukhin <kyukhin@gcc.gnu.org> | 2013-10-30 09:09:44 +0000 |
commit | ea9637cdcdf4b66f56c19079c786927174289f59 (patch) | |
tree | 5587fa3d365aa2710f61defe58124d11a5e1e147 /gcc/gimple.c | |
parent | 0038da669587ccb1781a136f153a7e951d04465a (diff) | |
download | gcc-ea9637cdcdf4b66f56c19079c786927174289f59.zip gcc-ea9637cdcdf4b66f56c19079c786927174289f59.tar.gz gcc-ea9637cdcdf4b66f56c19079c786927174289f59.tar.bz2 |
tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
* tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
* tree.h (POINTER_BOUNDS_P): New.
(BOUNDED_TYPE_P): New.
(BOUNDED_P): New.
(pointer_bounds_type_node): New.
* tree.c (build_common_tree_nodes): Initialize
pointer_bounds_type_node.
* gimple.h (gimple_call_get_nobnd_arg_index): New.
(gimple_call_num_nobnd_args): New.
(gimple_call_nobnd_arg): New.
(gimple_return_retbnd): New.
(gimple_return_set_retbnd): New
* gimple.c (gimple_build_return): Increase number of ops
for return statement.
(gimple_call_get_nobnd_arg_index): New.
* gimple-pretty-print.c (dump_gimple_return): Print second op.
From-SVN: r204199
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 3ddceb9..20f6010 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. */ |