Patchwork 14/n: trans-mem: compiler documentation

login
register
mail settings
Submitter Torvald Riegel
Date Nov. 4, 2011, 10:20 p.m.
Message ID <1320445241.5756.1074.camel@triegel.csb>
Download mbox | patch
Permalink /patch/123709/
State New
Headers show

Comments

Torvald Riegel - Nov. 4, 2011, 10:20 p.m.
On Thu, 2011-11-03 at 20:24 +0000, Joseph S. Myers wrote:
> On Thu, 3 Nov 2011, Aldy Hernandez wrote:
> 
> > Index: gcc/doc/tm.texi.in
> > ===================================================================
> > --- gcc/doc/tm.texi.in	(.../trunk)	(revision 180744)
> > +++ gcc/doc/tm.texi.in	(.../branches/transactional-memory)	(revision
> > 180773)
> > @@ -5696,6 +5696,16 @@ mode returned by @code{TARGET_VECTORIZE_
> >  The default is zero which means to not iterate over other vector sizes.
> >  @end deftypefn
> > 
> > +@hook TARGET_VECTORIZE_BUILTIN_TM_LOAD
> > +This hook should return the built-in decl needed to load a vector of
> > +the given type.
> > +@end deftypefn
> > +
> > +@hook TARGET_VECTORIZE_BUILTIN_TM_STORE
> > +This hook should return the built-in decl needed to store a vector of
> > +the given type.
> > +@end deftypefn
> 
> Is this text based on pre-existing GFDL-only text?  If not, it's better to 
> put it in target.def rather than directly in tm.texi.in (tm.texi.in should 
> preferably just have the @hook lines saying where to put the documentation 
> in tm.texi).

Better with the attached patch? Also mentions that these hooks are for
transactions. OK for branch?
commit 4e9d0c618f604628065025c0ebfd5c5084ccc6a8
Author: Torvald Riegel <triegel@redhat.com>
Date:   Fri Nov 4 23:16:19 2011 +0100

    Move hook documentation from tm.texi.in to target.def.
Richard Henderson - Nov. 4, 2011, 10:21 p.m.
On 11/04/2011 03:20 PM, Torvald Riegel wrote:
> Better with the attached patch? Also mentions that these hooks are for
> transactions. OK for branch?

Ok.


r~

Patch

diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 9955894..737b48e 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -5759,13 +5759,11 @@  The default is zero which means to not iterate over other vector sizes.
 @end deftypefn
 
 @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_TM_LOAD (tree)
-This hook should return the built-in decl needed to load a vector of
-the given type.
+This hook should return the built-in decl needed to load a vector of the given type within a transaction.
 @end deftypefn
 
 @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_TM_STORE (tree)
-This hook should return the built-in decl needed to store a vector of
-the given type.
+This hook should return the built-in decl needed to store a vector of the given type within a transaction.
 @end deftypefn
 
 @node Anchored Addresses
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 0e3011a..348b7e6 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -5697,14 +5697,8 @@  The default is zero which means to not iterate over other vector sizes.
 @end deftypefn
 
 @hook TARGET_VECTORIZE_BUILTIN_TM_LOAD
-This hook should return the built-in decl needed to load a vector of
-the given type.
-@end deftypefn
 
 @hook TARGET_VECTORIZE_BUILTIN_TM_STORE
-This hook should return the built-in decl needed to store a vector of
-the given type.
-@end deftypefn
 
 @node Anchored Addresses
 @section Anchored Addresses
diff --git a/gcc/target.def b/gcc/target.def
index 9c14720..d6d6cc3 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -1006,7 +1006,8 @@  DEFHOOK
 /* Return the builtin decl needed to load a vector of TYPE.  */
 DEFHOOK
 (builtin_tm_load,
- "",
+ "This hook should return the built-in decl needed to load a vector of the "
+ "given type within a transaction.",
  tree,
  (tree),
  default_builtin_tm_load_store)
@@ -1014,7 +1015,8 @@  DEFHOOK
 /* Return the builtin decl needed to store a vector of TYPE.  */
 DEFHOOK
 (builtin_tm_store,
- "",
+ "This hook should return the built-in decl needed to store a vector of the "
+ "given type within a transaction.",
  tree,
  (tree),
  default_builtin_tm_load_store)