[patch] 14/n: trans-mem: compiler documentation

Torvald Riegel triegel@redhat.com
Fri Nov 4 22:23:00 GMT 2011


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?
-------------- next part --------------
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.

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)


More information about the Gcc-patches mailing list