]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH 3/7] OpenMP 4.0 offloading infrastructure: Offload tables.
authorIlya Verbin <ilya.verbin@intel.com>
Thu, 13 Nov 2014 13:44:04 +0000 (13:44 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Thu, 13 Nov 2014 13:44:04 +0000 (13:44 +0000)
commitec6fe917cd323dfe1f84aebe9f3c2eda2b5cbdd1
treee5c2e1b47f7ea61d81e7314f0dab30406c0efc09
parent3f341ee716b3e32238c5b57e3282a125e273d6f7
[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.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>
From-SVN: r217489
18 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/cgraphunit.c
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/gengtype.c
gcc/lto-cgraph.c
gcc/lto-section-in.c
gcc/lto-section-names.h
gcc/lto-streamer-out.c
gcc/lto-streamer.h
gcc/lto/ChangeLog
gcc/lto/lto.c
gcc/omp-low.c
gcc/omp-low.h
gcc/target.def
gcc/toplev.c
gcc/varpool.c