aboutsummaryrefslogtreecommitdiff
path: root/gcc/hsa.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2016-01-27 13:50:05 +0100
committerMartin Liska <marxin@gcc.gnu.org>2016-01-27 12:50:05 +0000
commit4ecbadc72896ca5fa7a3cdeea84f4faafd3b0be3 (patch)
tree0ddc7a7d882a6be038b8f16263950f039fbb714c /gcc/hsa.c
parentb1652ddea99943a7a6df4be25e3a35e4eeeeb86d (diff)
downloadgcc-4ecbadc72896ca5fa7a3cdeea84f4faafd3b0be3.zip
gcc-4ecbadc72896ca5fa7a3cdeea84f4faafd3b0be3.tar.gz
gcc-4ecbadc72896ca5fa7a3cdeea84f4faafd3b0be3.tar.bz2
HSA: simplify partitioning of HSA kernels and host impls.
* lto-partition.c (add_symbol_to_partition_1): Remove usage of hsa_summaries. * hsa.c (hsa_summary_t::link_functions): Create IPA_REF_ADDR reference for an HSA kernel and its host function. From-SVN: r232871
Diffstat (limited to 'gcc/hsa.c')
-rw-r--r--gcc/hsa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/hsa.c b/gcc/hsa.c
index ec23f81..f0b3205 100644
--- a/gcc/hsa.c
+++ b/gcc/hsa.c
@@ -781,6 +781,11 @@ hsa_summary_t::link_functions (cgraph_node *gpu, cgraph_node *host,
TREE_OPTIMIZATION (fn_opts)->x_flag_tree_loop_vectorize = false;
TREE_OPTIMIZATION (fn_opts)->x_flag_tree_slp_vectorize = false;
DECL_FUNCTION_SPECIFIC_OPTIMIZATION (gdecl) = fn_opts;
+
+ /* Create reference between a kernel and a corresponding host implementation
+ to quarantee LTO streaming to a same LTRANS. */
+ if (kind == HSA_KERNEL)
+ gpu->create_reference (host, IPA_REF_ADDR);
}
/* Add a HOST function to HSA summaries. */