aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2018-12-17 21:27:19 +0000
committerTom de Vries <vries@gcc.gnu.org>2018-12-17 21:27:19 +0000
commit693ad66b86dcadc9764a2ef4365902b153560dde (patch)
tree955f05f43e667a9228e56e37713ce49cb09ead21
parent5d17a4763a71cbf10d3d4bb93bed11f832a24683 (diff)
downloadgcc-693ad66b86dcadc9764a2ef4365902b153560dde.zip
gcc-693ad66b86dcadc9764a2ef4365902b153560dde.tar.gz
gcc-693ad66b86dcadc9764a2ef4365902b153560dde.tar.bz2
[nvptx] Move macro defs to top of nvptx.c
Move macro definition to the top of the file, allowing them to be used there-after. Build and reg-tested on x86_64 with nvptx accelerator. 2018-12-17 Tom de Vries <tdevries@suse.de> * config/nvptx/nvptx.c (PTX_VECTOR_LENGTH, PTX_WORKER_LENGTH, PTX_DEFAULT_RUNTIME_DIM): Move to the top of the file. From-SVN: r267216
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/nvptx/nvptx.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b53cd62..0f8708f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2018-12-17 Tom de Vries <tdevries@suse.de>
+ * config/nvptx/nvptx.c (PTX_VECTOR_LENGTH, PTX_WORKER_LENGTH,
+ PTX_DEFAULT_RUNTIME_DIM): Move to the top of the file.
+
+2018-12-17 Tom de Vries <tdevries@suse.de>
+
* config/nvptx/nvptx.c (PTX_WARP_SIZE): Define.
(nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH.
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 9906716..74ca0f5 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -82,6 +82,9 @@
#define WORKAROUND_PTXJIT_BUG_3 1
#define PTX_WARP_SIZE 32
+#define PTX_VECTOR_LENGTH 32
+#define PTX_WORKER_LENGTH 32
+#define PTX_DEFAULT_RUNTIME_DIM 0 /* Defer to runtime. */
/* The various PTX memory areas an object might reside in. */
enum nvptx_data_area
@@ -5166,11 +5169,6 @@ nvptx_expand_builtin (tree exp, rtx target, rtx ARG_UNUSED (subtarget),
default: gcc_unreachable ();
}
}
-
-/* Define dimension sizes for known hardware. */
-#define PTX_VECTOR_LENGTH 32
-#define PTX_WORKER_LENGTH 32
-#define PTX_DEFAULT_RUNTIME_DIM 0 /* Defer to runtime. */
/* Implement TARGET_SIMT_VF target hook: number of threads in a warp. */