diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2015-11-20 14:23:18 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2015-11-20 14:23:18 +0000 |
commit | a794bd2079ed380fb35b8d06a9cc588c1998dd90 (patch) | |
tree | 64b48e2871b61cc14642d758d7a604d43a92a67c /gcc | |
parent | b09d93475d8e4f86e3b2bce19ef05dbb669e55fb (diff) | |
download | gcc-a794bd2079ed380fb35b8d06a9cc588c1998dd90.zip gcc-a794bd2079ed380fb35b8d06a9cc588c1998dd90.tar.gz gcc-a794bd2079ed380fb35b8d06a9cc588c1998dd90.tar.bz2 |
nvptx.c (nvptx_use_anchors_for_symbol_p): New.
* config/nvptx/nvptx.c (nvptx_use_anchors_for_symbol_p): New.
(TARGET_USE_ANCHORS_FOR_SYMBOL_P): Override.
Co-Authored-By: James Norris <jnorris@codesourcery.com>
From-SVN: r230659
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/nvptx/nvptx.c | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b9beee7..03e6993 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-20 Nathan Sidwell <nathan@codesourcery.com> + James Norris <jnorris@codesourcery.com> + + * config/nvptx/nvptx.c (nvptx_use_anchors_for_symbol_p): New. + (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Override. + 2015-11-20 Alan Hayward <alan.hayward@arm.com> PR tree-optimization/68413 diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 044f545..fdeb78a 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 |