From: nathan Date: Fri, 20 Nov 2015 14:23:18 +0000 (+0000) Subject: * config/nvptx/nvptx.c (nvptx_use_anchors_for_symbol_p): New. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c33494f0953c8dbb4834344fc4baacf4bd0d5e35;p=thirdparty%2Fgcc.git * config/nvptx/nvptx.c (nvptx_use_anchors_for_symbol_p): New. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Override. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230659 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b9beee772a7b..03e6993ac0be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-20 Nathan Sidwell + James Norris + + * config/nvptx/nvptx.c (nvptx_use_anchors_for_symbol_p): New. + (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Override. + 2015-11-20 Alan Hayward PR tree-optimization/68413 diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 044f54537847..fdeb78af1402 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -3895,6 +3895,19 @@ nvptx_cannot_copy_insn_p (rtx_insn *insn) return false; } } + +/* Section anchors do not work. Initialization for flag_section_anchor + probes the existence of the anchoring target hooks and prevents + anchoring if they don't exist. However, we may be being used with + a host-side compiler that does support anchoring, and hence see + the anchor flag set (as it's not recalculated). So provide an + implementation denying anchoring. */ + +static bool +nvptx_use_anchors_for_symbol_p (const_rtx ARG_UNUSED (a)) +{ + return false; +} /* Record a symbol for mkoffload to enter into the mapping table. */ @@ -4914,6 +4927,9 @@ nvptx_goacc_reduction (gcall *call) #undef TARGET_CANNOT_COPY_INSN_P #define TARGET_CANNOT_COPY_INSN_P nvptx_cannot_copy_insn_p +#undef TARGET_USE_ANCHORS_FOR_SYMBOL_P +#define TARGET_USE_ANCHORS_FOR_SYMBOL_P nvptx_use_anchors_for_symbol_p + #undef TARGET_INIT_BUILTINS #define TARGET_INIT_BUILTINS nvptx_init_builtins #undef TARGET_EXPAND_BUILTIN