Mercurial > hg > CbC > CbC_gcc
diff gcc/ipa-hsa.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line diff
--- a/gcc/ipa-hsa.c Thu Oct 25 07:37:49 2018 +0900 +++ b/gcc/ipa-hsa.c Thu Feb 13 11:34:05 2020 +0900 @@ -1,5 +1,5 @@ /* Callgraph based analysis of static variables. - Copyright (C) 2015-2018 Free Software Foundation, Inc. + Copyright (C) 2015-2020 Free Software Foundation, Inc. Contributed by Martin Liska <mliska@suse.cz> This file is part of GCC. @@ -40,6 +40,7 @@ #include "stringpool.h" #include "cgraph.h" #include "print-tree.h" +#include "alloc-pool.h" #include "symbol-summary.h" #include "hsa-common.h" @@ -51,11 +52,11 @@ static bool check_warn_node_versionable (cgraph_node *node) { - if (!node->local.versionable) + if (!node->versionable) { warning_at (EXPR_LOCATION (node->decl), OPT_Whsa, "could not emit HSAIL for function %s: function cannot be " - "cloned", node->name ()); + "cloned", node->dump_name ()); return false; } return true; @@ -88,7 +89,7 @@ continue; cgraph_node *clone = node->create_virtual_clone (vec <cgraph_edge *> (), - NULL, NULL, "hsa"); + NULL, NULL, "hsa", 0); TREE_PUBLIC (clone->decl) = TREE_PUBLIC (node->decl); clone->externally_visible = node->externally_visible; @@ -97,7 +98,7 @@ if (dump_file) fprintf (dump_file, "Created a new HSA clone: %s, type: %s\n", - clone->name (), + clone->dump_name (), s->m_kind == HSA_KERNEL ? "kernel" : "function"); } else if (hsa_callable_function_p (node->decl) @@ -109,17 +110,17 @@ continue; cgraph_node *clone = node->create_virtual_clone (vec <cgraph_edge *> (), - NULL, NULL, "hsa"); + NULL, NULL, "hsa", 0); TREE_PUBLIC (clone->decl) = TREE_PUBLIC (node->decl); clone->externally_visible = node->externally_visible; - if (!node->local.local) + if (!node->local) clone->force_output = true; hsa_summaries->link_functions (clone, node, HSA_FUNCTION, false); if (dump_file) fprintf (dump_file, "Created a new HSA function clone: %s\n", - clone->name ()); + clone->dump_name ()); } } @@ -140,8 +141,8 @@ if (dump_file) fprintf (dump_file, "Redirecting edge to HSA function: %s->%s\n", - xstrdup_for_dump (e->caller->name ()), - xstrdup_for_dump (e->callee->name ())); + e->caller->dump_name (), + e->callee->dump_name ()); } } @@ -221,7 +222,7 @@ const int cfg_offset = sizeof (struct lto_function_header); const int main_offset = cfg_offset + header->cfg_size; const int string_offset = main_offset + header->main_size; - struct data_in *data_in; + class data_in *data_in; unsigned int i; unsigned int count; @@ -277,9 +278,8 @@ while ((file_data = file_data_vec[j++])) { size_t len; - const char *data = lto_get_section_data (file_data, LTO_section_ipa_hsa, - NULL, &len); - + const char *data + = lto_get_summary_section_data (file_data, LTO_section_ipa_hsa, &len); if (data) ipa_hsa_read_section (file_data, data, len); }