This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[nvptx, committed, PR79939] Disable constant pool for nvptx


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
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"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]