diff mbox

14/n: trans-mem: compiler documentation

Message ID 4EB2E1D2.50309@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Nov. 3, 2011, 6:47 p.m. UTC
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(.../trunk)	(revision 180744)
+++ gcc/doc/invoke.texi	(.../branches/transactional-memory)	(revision 
180840)
@@ -1715,6 +1715,18 @@ Program Interface v3.0 @w{@uref{http://w
  implies @option{-pthread}, and thus is only supported on targets that
  have support for @option{-pthread}.

+@item -fgnu-tm
+@opindex fgnu-tm
+When the option @option{-fgnu-tm} is specified, the compiler will
+generate code for the Linux variant of Intel's current Transactional
+Memory ABI specification document (Revision 1.1, May 6 2009).  This is
+an experimental feature whose interface may change in future versions
+of GCC, as the official specification changes.  Please note that not
+all architectures are supported for this feature.
+
+For more information on GCC's support for transactional memory, see
+the accompanying documentation for @file{libitm}.
+
  @item -fms-extensions
  @opindex fms-extensions
  Accept some non-standard constructs used in Microsoft header files.
@@ -9093,6 +9105,13 @@ parameters only when their cumulative si
  @option{ipa-sra-ptr-growth-factor} times the size of the original
  pointer parameter.

+@item tm-max-aggregate-size
+When making copies of thread-local variables in a transaction, this
+parameter specifies the size in bytes after which variables will be
+saved with the logging functions as opposed to save/restore code
+sequence pairs.  This option only applies when using
+@option{-fgnu-tm}.
+
  @item graphite-max-nb-scop-params
  To avoid exponential effects in the Graphite loop transforms, the
  number of parameters in a Static Control Part (SCoP) is bounded.  The

Comments

Joseph Myers Nov. 3, 2011, 8:24 p.m. UTC | #1
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).

> +For more information on GCC's support for transactional memory, see
> +the accompanying documentation for @file{libitm}.

It should be possible to use a proper Texinfo cross-reference linking to 
the other manual.
Aldy Hernandez Nov. 3, 2011, 10:29 p.m. UTC | #2
>> +For more information on GCC's support for transactional memory, see
>> +the accompanying documentation for @file{libitm}.
>
> It should be possible to use a proper Texinfo cross-reference linking to
> the other manual.

I thought so too, but couldn't find how.  Libitm is in another directory 
(libitm/libitm.texi).  Does anyone know how to do this?
Joseph Myers Nov. 3, 2011, 11:27 p.m. UTC | #3
On Thu, 3 Nov 2011, Aldy Hernandez wrote:

> 
> > > +For more information on GCC's support for transactional memory, see
> > > +the accompanying documentation for @file{libitm}.
> > 
> > It should be possible to use a proper Texinfo cross-reference linking to
> > the other manual.
> 
> I thought so too, but couldn't find how.  Libitm is in another directory
> (libitm/libitm.texi).  Does anyone know how to do this?

When installed, all info files are presumed to go in one directory, HTML 
files in parallel directories, etc.; you use the five-argument form of 
@xref with "libitm" as the fourth argument.
Michael Matz Nov. 4, 2011, 2:59 p.m. UTC | #4
Hi,

On Thu, 3 Nov 2011, Aldy Hernandez wrote:

> Index: gcc/doc/tm.texi
> ===================================================================
> --- gcc/doc/tm.texi	(.../trunk)	(revision 180744)
> +++ gcc/doc/tm.texi	(.../branches/transactional-memory)	(revision
> 180773)
> @@ -5758,6 +5758,16 @@ mode returned by @code{TARGET_VECTORIZE_
>  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.
> +@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.
> +@end deftypefn

Somehow this docu should mention transactional memory (apart from the _TM 
in the name :) ), otherwise it reads as if these hooks are to be used for 
all vector loads/stores.


Ciao,
Michael.
diff mbox

Patch

Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi	(.../trunk)	(revision 180744)
+++ gcc/doc/tm.texi	(.../branches/transactional-memory)	(revision 180773)
@@ -5758,6 +5758,16 @@  mode returned by @code{TARGET_VECTORIZE_
  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.
+@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.
+@end deftypefn
+
  @node Anchored Addresses
  @section Anchored Addresses
  @cindex anchored addresses
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
+
  @node Anchored Addresses
  @section Anchored Addresses
  @cindex anchored addresses