public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [nvptx, committed, PR79939] Disable constant pool for nvptx
@ 2017-06-11 21:58 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2017-06-11 21:58 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

Hi,

this patch fixes PR79939, a cc1 hang while trying to emit a constant in 
the constant pool.

Fixed by disabling the constant pool for nvptx.

Tested on target nvptx.

Committed as obvious.

Thanks,
- Tom

[-- Attachment #2: 0001-Disable-constant-pool-for-nvptx.patch --]
[-- Type: text/x-patch, Size: 1123 bytes --]

Disable constant pool for nvptx

2017-06-11  Tom de Vries  <tom@codesourcery.com>

	PR target/79939
	* config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
	Return true.
	(TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
	nvptx_cannot_force_const_mem.

---
 gcc/config/nvptx/nvptx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 2eb5570..daeec27 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -5328,6 +5328,13 @@ nvptx_goacc_reduction (gcall *call)
     }
 }
 
+static bool
+nvptx_cannot_force_const_mem (machine_mode mode ATTRIBUTE_UNUSED,
+			      rtx x ATTRIBUTE_UNUSED)
+{
+  return true;
+}
+
 #undef TARGET_OPTION_OVERRIDE
 #define TARGET_OPTION_OVERRIDE nvptx_option_override
 
@@ -5442,6 +5449,9 @@ nvptx_goacc_reduction (gcall *call)
 #undef TARGET_GOACC_REDUCTION
 #define TARGET_GOACC_REDUCTION nvptx_goacc_reduction
 
+#undef TARGET_CANNOT_FORCE_CONST_MEM
+#define TARGET_CANNOT_FORCE_CONST_MEM nvptx_cannot_force_const_mem
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 #include "gt-nvptx.h"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-11 21:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-11 21:58 [nvptx, committed, PR79939] Disable constant pool for nvptx Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).