summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-13 13:44:04 +0000
committerkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-13 13:44:04 +0000
commitdccabdd1369080883dbcd309be7e10ca4825a854 (patch)
treee5c2e1b47f7ea61d81e7314f0dab30406c0efc09 /gcc/doc
parent2e0643012a3e2fcd11acb3f0498530760ca83e00 (diff)
downloadgcc-dccabdd1369080883dbcd309be7e10ca4825a854.tar.gz
[PATCH 3/7] OpenMP 4.0 offloading infrastructure: Offload tables.
gcc/ * Makefile.in (GTFILES): Add omp-low.h to list of GC files. * cgraphunit.c: Include omp-low.h. * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_RECORD_OFFLOAD_SYMBOL): Document. * gengtype.c (open_base_files): Add omp-low.h to ifiles. * lto-cgraph.c (output_offload_tables): New function. (input_offload_tables): Likewise. * lto-section-in.c (lto_section_name): Add "offload_table". * lto-section-names.h (OFFLOAD_VAR_TABLE_SECTION_NAME): Define. (OFFLOAD_FUNC_TABLE_SECTION_NAME): Likewise. * lto-streamer-out.c (lto_output): Call output_offload_tables. * lto-streamer.h (lto_section_type): Add LTO_section_offload_table. (output_offload_tables, input_offload_tables): Declare. * omp-low.c: Include common/common-target.h and lto-section-names.h. (offload_funcs, offload_vars): New global <tree, va_gc> vectors. (expand_omp_target): Add child_fn into offload_funcs vector. (add_decls_addresses_to_decl_constructor): New function. (omp_finish_file): Likewise. * omp-low.h (omp_finish_file, offload_funcs, offload_vars): Declare. * target.def (record_offload_symbol): New DEFHOOK. * toplev.c: Include omp-low.h. (compile_file): Call omp_finish_file. * varpool.c: Include omp-low.h. (varpool_node::get_create): Add decl into offload_vars vector. gcc/lto/ * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217489 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/tm.texi6
-rw-r--r--gcc/doc/tm.texi.in2
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 8f708f6944c..778e90d989d 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -11396,6 +11396,12 @@ If defined, this function returns an appropriate alignment in bits for an atomic
ISO C11 requires atomic compound assignments that may raise floating-point exceptions to raise exceptions corresponding to the arithmetic operation whose result was successfully stored in a compare-and-exchange sequence. This requires code equivalent to calls to @code{feholdexcept}, @code{feclearexcept} and @code{feupdateenv} to be generated at appropriate points in the compare-and-exchange sequence. This hook should set @code{*@var{hold}} to an expression equivalent to the call to @code{feholdexcept}, @code{*@var{clear}} to an expression equivalent to the call to @code{feclearexcept} and @code{*@var{update}} to an expression equivalent to the call to @code{feupdateenv}. The three expressions are @code{NULL_TREE} on entry to the hook and may be left as @code{NULL_TREE} if no code is required in a particular place. The default implementation leaves all three expressions as @code{NULL_TREE}. The @code{__atomic_feraiseexcept} function from @code{libatomic} may be of use as part of the code generated in @code{*@var{update}}.
@end deftypefn
+@deftypefn {Target Hook} void TARGET_RECORD_OFFLOAD_SYMBOL (tree)
+Used when offloaded functions are seen in the compilation unit and no named
+sections are available. It is called once for each symbol that must be
+recorded in the offload function and variable table.
+@end deftypefn
+
@defmac TARGET_SUPPORTS_WIDE_INT
On older ports, large integers are stored in @code{CONST_DOUBLE} rtl
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index acd4cdcbc9d..6c82448c5a8 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -8169,6 +8169,8 @@ and the associated definitions of those functions.
@hook TARGET_ATOMIC_ASSIGN_EXPAND_FENV
+@hook TARGET_RECORD_OFFLOAD_SYMBOL
+
@defmac TARGET_SUPPORTS_WIDE_INT
On older ports, large integers are stored in @code{CONST_DOUBLE} rtl