aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2017-07-21 09:46:05 +0000
committerTom de Vries <vries@gcc.gnu.org>2017-07-21 09:46:05 +0000
commit967a353a7259dc97098afc59646f9eedc6bbb511 (patch)
tree64448bd5d9735b3e46f38c6f5ca8bc469e45e424 /gcc
parent4bb3f8b53f9a1f95e68cc80ec9054b66815b250a (diff)
downloadgcc-967a353a7259dc97098afc59646f9eedc6bbb511.zip
gcc-967a353a7259dc97098afc59646f9eedc6bbb511.tar.gz
gcc-967a353a7259dc97098afc59646f9eedc6bbb511.tar.bz2
Add nvptx_override_options_after_change
2017-07-21 Tom de Vries <tom@codesourcery.com> PR lto/81430 * config/nvptx/nvptx.c (nvptx_override_options_after_change): New function. (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to nvptx_override_options_after_change. From-SVN: r250421
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/nvptx/nvptx.c14
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bfc1773..7ff7f10 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2017-07-21 Tom de Vries <tom@codesourcery.com>
+
+ PR lto/81430
+ * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
+ function.
+ (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
+ nvptx_override_options_after_change.
+
2017-07-21 Ulrich Drepper <drepper@redhat.com>
* dwarf2out.c (output_file_names): Avoid double testing for
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index d0aa054..a718054 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -207,6 +207,17 @@ nvptx_option_override (void)
target_flags |= MASK_SOFT_STACK | MASK_UNIFORM_SIMT;
}
+/* Implement TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE. */
+
+static void
+nvptx_override_options_after_change (void)
+{
+ /* This is a workaround for PR81430 - nvptx acceleration compilation broken
+ because of running pass_partition_blocks. This should be dealt with in the
+ common code, not in the target. */
+ flag_reorder_blocks_and_partition = 0;
+}
+
/* Return a ptx type for MODE. If PROMOTE, then use .u32 for QImode to
deal with ptx ideosyncracies. */
@@ -5505,6 +5516,9 @@ nvptx_data_alignment (const_tree type, unsigned int basic_align)
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE nvptx_option_override
+#undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
+#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE nvptx_override_options_after_change
+
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE nvptx_attribute_table