[gomp4] Missing -fopenacc handling (was: Dumping gimple for offload.)
Thomas Schwinge
thomas@codesourcery.com
Wed Jun 4 17:16:00 GMT 2014
Hi!
On Tue, 19 Nov 2013 13:58:29 +0400, Ilya Tocar <tocarip.intel@gmail.com> wrote:
> * cgraph.h (symtab_node): Add need_dump.
> * cgraphunit.c (ipa_passes): Run ipa_write_summaries for omp.
> (compile): Intialize streamer for omp.
> * ipa-inline-analysis.c (inline_generate_summary): Add flag_openmp.
> * lto-cgraph.c (lto_set_symtab_encoder_in_partition): Respect
> need_dump flag.
> (select_what_to_dump): New.
> * lto-streamer.c (section_name_prefix): New.
> (lto_get_section_name): Use section_name_prefix.
> (lto_streamer_init): Add flag_openmp.
> * lto-streamer.h (OMP_SECTION_NAME_PREFIX): New.
> (section_name_prefix): Ditto.
> (select_what_to_dump): Ditto.
> * lto/lto-partition.c (add_symbol_to_partition_1): Set need_dump.
> (lto_promote_cross_file_statics): Dump everyhtinh.
> * passes.c (ipa_write_summaries): Add parameter,
> call select_what_to_dump.
> * tree-pass.h (void ipa_write_summaries): Add parameter.
In several places, this needs to consider flag_openacc, too; r211236:
commit 02da7b3beb9f8e9d3dbb8214c0a6ebaccf407deb
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
AuthorDate: Wed Jun 4 17:11:30 2014 +0000
Commit: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
CommitDate: Wed Jun 4 17:11:30 2014 +0000
Missing -fopenacc handling.
gcc/
* cgraphunit.c (ipa_passes, compile): Handle flag_openacc next to
flag_openmp.
* ipa-inline-analysis.c (inline_generate_summary): Likewise.
* lto-streamer.c (lto_streamer_init, gate_lto_out): Likewise.
* passes.c (ipa_write_summaries): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@211236 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog.gomp | 8 ++++++++
gcc/cgraphunit.c | 4 ++--
gcc/ipa-inline-analysis.c | 2 +-
gcc/lto-streamer.c | 2 +-
gcc/passes.c | 2 +-
5 files changed, 13 insertions(+), 5 deletions(-)
diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp
index b543bbc..011fe77 100644
--- gcc/ChangeLog.gomp
+++ gcc/ChangeLog.gomp
@@ -1,3 +1,11 @@
+2014-06-04 Thomas Schwinge <thomas@codesourcery.com>
+
+ * cgraphunit.c (ipa_passes, compile): Handle flag_openacc next to
+ flag_openmp.
+ * ipa-inline-analysis.c (inline_generate_summary): Likewise.
+ * lto-streamer.c (lto_streamer_init, gate_lto_out): Likewise.
+ * passes.c (ipa_write_summaries): Likewise.
+
2014-05-12 Bernd Schmidt <bernds@codesourcery.com>
* lto-wrapper.c (ompbegin): New static variable.
diff --git gcc/cgraphunit.c gcc/cgraphunit.c
index c524120..fb34c2d 100644
--- gcc/cgraphunit.c
+++ gcc/cgraphunit.c
@@ -2086,7 +2086,7 @@ ipa_passes (void)
if (!in_lto_p)
{
- if (flag_openmp)
+ if (flag_openacc || flag_openmp)
{
section_name_prefix = OMP_SECTION_NAME_PREFIX;
ipa_write_summaries (true);
@@ -2187,7 +2187,7 @@ compile (void)
cgraph_state = CGRAPH_STATE_IPA;
/* If LTO is enabled, initialize the streamer hooks needed by GIMPLE. */
- if (flag_lto || flag_openmp)
+ if (flag_lto || flag_openacc || flag_openmp)
lto_streamer_hooks_init ();
/* Don't run the IPA passes if there was any error or sorry messages. */
diff --git gcc/ipa-inline-analysis.c gcc/ipa-inline-analysis.c
index 176954a..340f26a 100644
--- gcc/ipa-inline-analysis.c
+++ gcc/ipa-inline-analysis.c
@@ -4010,7 +4010,7 @@ inline_generate_summary (void)
/* When not optimizing, do not bother to analyze. Inlining is still done
because edge redirection needs to happen there. */
- if (!optimize && !flag_lto && !flag_wpa && !flag_openmp)
+ if (!optimize && !flag_lto && !flag_wpa && !flag_openacc && !flag_openmp)
return;
function_insertion_hook_holder =
diff --git gcc/lto-streamer.c gcc/lto-streamer.c
index 6153b0a..e9fc6e1 100644
--- gcc/lto-streamer.c
+++ gcc/lto-streamer.c
@@ -316,7 +316,7 @@ lto_streamer_init (void)
bool
gate_lto_out (void)
{
- return ((flag_generate_lto || in_lto_p || flag_openmp)
+ return ((flag_generate_lto || in_lto_p || flag_openacc || flag_openmp)
/* Don't bother doing anything if the program has errors. */
&& !seen_error ());
}
diff --git gcc/passes.c gcc/passes.c
index 620376e..e4c2336 100644
--- gcc/passes.c
+++ gcc/passes.c
@@ -2335,7 +2335,7 @@ ipa_write_summaries (bool is_omp)
struct cgraph_node *node;
struct cgraph_node **order;
- if (!(flag_generate_lto || flag_openmp) || seen_error () )
+ if (!(flag_generate_lto || flag_openacc || flag_openmp) || seen_error () )
return;
select_what_to_dump (is_omp);
Grüße,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140604/9a8faff8/attachment.sig>
More information about the Gcc-patches
mailing list