On 30 Oct 10:26, Richard Biener wrote: > > Ick - you enlarge all return statements? But you don't set the actual value? > So why allocate it with 2 ops in the first place??
When return does not return bounds it has operand with zero value similar to case when it does not return value. What is the difference then? > > [Seems I completely missed that MPX changes "gimple" and the design > document that was posted somewhere??] > Design is on GCC Wiki and link was posted few times: http://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler. Here is quote about return statements: Returns instrumentation. We add new operand to return statement to hold returned bounds and instrumentation pass is responsible to fill this operand with correct bounds > Bah. > > Where is the update to gimple.texi and tree.texi? > > Richard. > Unfortunately patch has been already installed. Should we uninstall it? If not, then here is patch for documentation. Thanks, Ilya -- gcc/ 2013-10-30 Ilya Enkovich <ilya.enkov...@intel.com> * doc/gimple.texi (gimple_call_num_nobnd_args): New. (gimple_call_nobnd_arg): New. (gimple_return_retbnd): New. (gimple_return_set_retbnd): New. (gimple_call_get_nobnd_arg_index): New. diff --git a/gcc/doc/gimple.texi b/gcc/doc/gimple.texi index 7bd9fd5..be74170 100644 --- a/gcc/doc/gimple.texi +++ b/gcc/doc/gimple.texi @@ -1240,11 +1240,25 @@ Set @code{CHAIN} to be the static chain for call statement @code{G}. Return the number of arguments used by call statement @code{G}. @end deftypefn +@deftypefn {GIMPLE function} unsigned gimple_call_num_nobnd_args (gimple g) +Return the number of arguments used by call statement @code{G} +ignoring bound ones. +@end deftypefn + @deftypefn {GIMPLE function} tree gimple_call_arg (gimple g, unsigned index) Return the argument at position @code{INDEX} for call statement @code{G}. The first argument is 0. @end deftypefn +@deftypefn {GIMPLE function} tree gimple_call_nobnd_arg (gimple g, unsigned index) +Return the argument at position @code{INDEX} for call statement @code{G} +ignoring bound ones. The first argument is 0. +@end deftypefn + +@deftypefn {GIMPLE function} unsigned gimple_call_get_nobnd_arg_index (gimple g, unsigned index) +Return index of @code{INDEX}'s non bound argument of the call statement @code{G} +@end deftypefn + @deftypefn {GIMPLE function} {tree *} gimple_call_arg_ptr (gimple g, unsigned index) Return a pointer to the argument at position @code{INDEX} for call statement @code{G}. @@ -2029,6 +2043,15 @@ Return the return value for @code{GIMPLE_RETURN} @code{G}. Set @code{RETVAL} to be the return value for @code{GIMPLE_RETURN} @code{G}. @end deftypefn +@deftypefn {GIMPLE function} tree gimple_return_retbnd (gimple g) +Return the bounds of return value for @code{GIMPLE_RETURN} @code{G}. +@end deftypefn + +@deftypefn {GIMPLE function} void gimple_return_set_retbnd (gimple g, tree retbnd) +Set @code{RETBND} to be the bounds of return value for @code{GIMPLE_RETURN} +@code{G}. +@end deftypefn + @node @code{GIMPLE_SWITCH} @subsection @code{GIMPLE_SWITCH} @cindex @code{GIMPLE_SWITCH}