diff mbox

[gomp4] Override default target hook

Message ID 55F2E15F.9070708@codesourcery.com
State New
Headers show

Commit Message

James Norris Sept. 11, 2015, 2:12 p.m. UTC
Hi!

The attached patch overrides the hook's default action
for anchored address usage.

Committed after regtest on x86_64 and powerpc64le

Thanks!
Jim
diff mbox

Patch

Index: nvptx.c
===================================================================
--- nvptx.c	(revision 227683)
+++ nvptx.c	(working copy)
@@ -4340,6 +4340,14 @@  nvptx_goacc_reduction (gimple call)
       gcc_unreachable ();
     }
 }
+
+/* Don't allow use of anchored addresses.  */
+
+static bool
+nvptx_use_anchors_for_symbol (const_rtx ARG_UNUSED (symbol))
+{
+  return false;
+}
 
 #undef TARGET_OPTION_OVERRIDE
 #define TARGET_OPTION_OVERRIDE nvptx_option_override
@@ -4452,6 +4460,9 @@  nvptx_goacc_reduction (gimple call)
 #undef TARGET_GOACC_REDUCTION
 #define TARGET_GOACC_REDUCTION nvptx_goacc_reduction
 
+#undef TARGET_USE_ANCHORS_FOR_SYMBOL_P
+#define TARGET_USE_ANCHORS_FOR_SYMBOL_P nvptx_use_anchors_for_symbol
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 #include "gt-nvptx.h"