From d989dba8ef02c2406b7c9e62b352197dffc6b880 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 3 Aug 2018 11:21:09 +0000 Subject: [c++] Don't emit exception tables for UI_NONE If a target does not support exceptions, it can indicate this by returning UI_NONE in TARGET_EXCEPT_UNWIND_INFO. Currently the compiler still emits exception tables for such a target. This patch makes sure that no exception tables are emitted if the target does not support exceptions. This allows us to remove a workaround in TARGET_ASM_BYTE_OP in the nvptx port. Build on x86_64 with nvptx accelerator, and tested libgomp. Build and reg-tested on x86_64. 2018-08-03 Tom de Vries * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return UI_NONE. * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define. * except.c (output_function_exception_table): Do early exit if targetm_common.except_unwind_info (&global_options) == UI_NONE. From-SVN: r263287 --- gcc/except.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/except.c') diff --git a/gcc/except.c b/gcc/except.c index 84666d9041e..728b1e1d349 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -3189,7 +3189,8 @@ output_function_exception_table (int section) rtx personality = get_personality_function (current_function_decl); /* Not all functions need anything. */ - if (!crtl->uses_eh_lsda) + if (!crtl->uses_eh_lsda + || targetm_common.except_unwind_info (&global_options) == UI_NONE) return; /* No need to emit any boilerplate stuff for the cold part. */ -- cgit v1.2.3