This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r228608 - in /branches/hsa: gcc/ChangeLog.hsa g...
- From: marxin at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 08 Oct 2015 16:41:23 -0000
- Subject: r228608 - in /branches/hsa: gcc/ChangeLog.hsa g...
Author: marxin
Date: Thu Oct 8 16:41:22 2015
New Revision: 228608
URL: https://gcc.gnu.org/viewcvs?rev=228608&root=gcc&view=rev
Log:
HSA: introduce warnings and libgomp host fallback
* common.opt: Add new Whsa option.
* hsa-gen.c (hsa_function_representation::hsa_function_representation):
Add new member seen_error.
(hsa_type_for_scalar_tree_type): Use HSA_SORRY_AT{V} instread of
sorry.
(hsa_type_for_tree_type): Likewise.
(hsa_op_immed::hsa_op_immed): Likewise.
(process_mem_base): Likewise.
(gen_hsa_addr): Likewise.
(gen_hsa_insns_for_load): Likewise.
(gen_hsa_insns_for_store): Likewise.
(gen_hsa_ctor_assignment): Likewise.
(gen_hsa_insns_for_single_assignment): Likewise.
(gen_hsa_cmp_insn_from_gimple): Likewise.
(gen_hsa_insns_for_operation_assignment): Likewise.
(verify_function_arguments): Likewise.
(gen_hsa_insns_for_direct_call): Likewise.
(gen_hsa_insns_for_return): Likewise.
(get_address_from_value): Likewise.
(gen_hsa_insns_for_call): Likewise.
(gen_hsa_insns_for_gimple_stmt): Likewise.
(gen_hsa_phi_from_gimple_phi): Likewise.
(gen_body_from_gimple): Use aforementioned hsa_cfun->seen_error.
(generate_hsa): Likewise.
* hsa.c (hsa_deinit_compilation_unit_data): Release
hsa_failed_functions.
(hsa_seen_error): New function.
* hsa.h (hsa_failed_functions): New variable.
* libgomp.h (struct gomp_device_descr): Add new function
pointer (can_run_func).
* plugin/plugin-hsa.c (init_enviroment_variables): Rename this
function from init_debug.
(hsa_warn): New function.
(struct kernel_info): Add new member variable
initialization_failed.
(struct agent_info): Add new member variable
prog_finalized_error.
(get_kernel_in_module): Do not call GOMP_PLUGIN_fatal.
(init_hsa_context): Use HSA_DEBUG macro.
(GOMP_OFFLOAD_init_device): Likewise.
(destroy_hsa_program): Likewise.
(GOMP_OFFLOAD_load_image): Produce warnings instread
of failures.
(GOMP_OFFLOAD_unload_image): Do not check if the agent
is initialized, the check is in the called function.
(GOMP_OFFLOAD_fini_device): Likewise.
(create_and_finalize_hsa_program): Likewise.
(release_kernel_dispatch): Use HSA_DEBUG macro.
(init_single_kernel): Produce warnings instread of failures.
(init_kernel): Use HSA_DEBUG macro.
(parse_launch_attributes): Likewise.
(GOMP_OFFLOAD_can_run): New function.
(GOMP_OFFLOAD_run): Remove part of initialization that
is moved to GOMP_OFFLOAD_can_run.
(GOMP_OFFLOAD_fini_device): Fix coding style.
* target.c (run_on_host): New function.
(GOMP_target): Use the function.
(gomp_load_plugin_for_device): Dynamically load the new hook.
Modified:
branches/hsa/gcc/ChangeLog.hsa
branches/hsa/gcc/common.opt
branches/hsa/gcc/hsa-gen.c
branches/hsa/gcc/hsa.c
branches/hsa/gcc/hsa.h
branches/hsa/libgomp/ChangeLog.hsa
branches/hsa/libgomp/libgomp.h
branches/hsa/libgomp/plugin/plugin-hsa.c
branches/hsa/libgomp/target.c