This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Oct 2013 14:34:10 +0400
- Subject: Re: [PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces
- Authentication-results: sourceware.org; auth=none
- References: <20131021122236 dot GE37888 at msticlxl57 dot ims dot intel dot com> <20131024144329 dot GB39638 at msticlxl57 dot ims dot intel dot com> <52700F0A dot 3010606 at redhat dot com> <20131029215323 dot GA46971 at msticlxl57 dot ims dot intel dot com> <CAFiYyc3Y9z_6TigcZYhMbHh=nPNuE7HqpcXK+mQUw=JQmWeCDw at mail dot gmail dot com>
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.enkovich@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}
- References:
- [PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces
- Re: [PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces
- Re: [PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces
- Re: [PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces
- Re: [PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces