This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[nvptx, committed] Move macro defs to top of nvptx.c
- From: Tom de Vries <tdevries at suse dot de>
- To: "Schwinge, Thomas" <Thomas_Schwinge at mentor dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 17 Dec 2018 22:53:17 +0100
- Subject: [nvptx, committed] Move macro defs to top of nvptx.c
- References: <d101a77b-fc5f-0396-b8d1-c13f34fd1c38@codesourcery.com> <2ece5d7b-3675-84ab-f255-3c56a2ffd7dc@suse.de> <91b927af-d854-2865-7cbd-9a9a835ab5cc@codesourcery.com> <1394d89c-896e-f6a3-5f9a-78e98b16e85c@suse.de>
[ was: Re: [nvptx] vector length patch series ]
On 14-12-18 20:58, Tom de Vries wrote:
> 0005-nvptx-update-openacc-dim-macros.patch
Factored out this patch.
Committed.
Thanks,
- Tom
[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.
---
gcc/config/nvptx/nvptx.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 9906716890e..74ca0f585aa 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. */