aboutsummaryrefslogtreecommitdiff
path: root/gcc/internal-fn.h
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2016-09-27 16:46:21 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2016-09-27 16:46:21 +0000
commit4d58c533a8a54cfd07f617fd4cfa91e67e51c57d (patch)
tree84caeb9c679772ac95d97b5cecf4031d435f5bed /gcc/internal-fn.h
parent20fba714a24284d708324e293da17355cbfb9fe9 (diff)
downloadgcc-4d58c533a8a54cfd07f617fd4cfa91e67e51c57d.zip
gcc-4d58c533a8a54cfd07f617fd4cfa91e67e51c57d.tar.gz
gcc-4d58c533a8a54cfd07f617fd4cfa91e67e51c57d.tar.bz2
internal-fn.h (IFN_UNIQUE_CODES, [...]): New.
* internal-fn.h (IFN_UNIQUE_CODES, IFN_GOACC_LOOP_CODES, IFN_GOACC_REDUCTION_CODES): New. (enum ifn_unique_kind, enum ifn_goacc_loop_kind, enum ifn_goacc_reduction_kind): Use them. * gimple-pretty-print.c (dump_gimple_call_args): Decode first arg of internal functions, when applicable. From-SVN: r240552
Diffstat (limited to 'gcc/internal-fn.h')
-rw-r--r--gcc/internal-fn.h58
1 files changed, 31 insertions, 27 deletions
diff --git a/gcc/internal-fn.h b/gcc/internal-fn.h
index bb31465..4e5dbaa 100644
--- a/gcc/internal-fn.h
+++ b/gcc/internal-fn.h
@@ -20,26 +20,28 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_INTERNAL_FN_H
#define GCC_INTERNAL_FN_H
-/* INTEGER_CST values for IFN_UNIQUE function arg-0. */
+/* INTEGER_CST values for IFN_UNIQUE function arg-0.
+
+ UNSPEC: Undifferentiated UNIQUE.
+
+ FORK and JOIN mark the points at which OpenACC partitioned
+ execution is entered or exited.
+ DEP_VAR = UNIQUE ({FORK,JOIN}, DEP_VAR, AXIS)
+
+ HEAD_MARK and TAIL_MARK are used to demark the sequence entering
+ or leaving partitioned execution.
+ DEP_VAR = UNIQUE ({HEAD,TAIL}_MARK, REMAINING_MARKS, ...PRIMARY_FLAGS)
+
+ The PRIMARY_FLAGS only occur on the first HEAD_MARK of a sequence. */
+#define IFN_UNIQUE_CODES \
+ DEF(UNSPEC), \
+ DEF(OACC_FORK), DEF(OACC_JOIN), \
+ DEF(OACC_HEAD_MARK), DEF(OACC_TAIL_MARK)
+
enum ifn_unique_kind {
- IFN_UNIQUE_UNSPEC, /* Undifferentiated UNIQUE. */
-
- /* FORK and JOIN mark the points at which OpenACC partitioned
- execution is entered or exited.
- return: data dependency value
- arg-1: data dependency var
- arg-2: INTEGER_CST argument, indicating the axis. */
- IFN_UNIQUE_OACC_FORK,
- IFN_UNIQUE_OACC_JOIN,
-
- /* HEAD_MARK and TAIL_MARK are used to demark the sequence entering
- or leaving partitioned execution.
- return: data dependency value
- arg-1: data dependency var
- arg-2: INTEGER_CST argument, remaining markers in this sequence
- arg-3...: varargs on primary header */
- IFN_UNIQUE_OACC_HEAD_MARK,
- IFN_UNIQUE_OACC_TAIL_MARK
+#define DEF(X) IFN_UNIQUE_##X
+ IFN_UNIQUE_CODES
+#undef DEF
};
/* INTEGER_CST values for IFN_GOACC_LOOP arg-0. Allows the precise
@@ -59,11 +61,12 @@ enum ifn_unique_kind {
CHUNK_NO - chunk number
MASK - partitioning mask. */
+#define IFN_GOACC_LOOP_CODES \
+ DEF(CHUNKS), DEF(STEP), DEF(OFFSET), DEF(BOUND)
enum ifn_goacc_loop_kind {
- IFN_GOACC_LOOP_CHUNKS, /* Number of chunks. */
- IFN_GOACC_LOOP_STEP, /* Size of each thread's step. */
- IFN_GOACC_LOOP_OFFSET, /* Initial iteration value. */
- IFN_GOACC_LOOP_BOUND /* Limit of iteration value. */
+#define DEF(X) IFN_GOACC_LOOP_##X
+ IFN_GOACC_LOOP_CODES
+#undef DEF
};
/* The GOACC_REDUCTION function defines a generic interface to support
@@ -81,11 +84,12 @@ enum ifn_goacc_loop_kind {
In general the return value is LOCAL_VAR, which creates a data
dependency between calls operating on the same reduction. */
+#define IFN_GOACC_REDUCTION_CODES \
+ DEF(SETUP), DEF(INIT), DEF(FINI), DEF(TEARDOWN)
enum ifn_goacc_reduction_kind {
- IFN_GOACC_REDUCTION_SETUP,
- IFN_GOACC_REDUCTION_INIT,
- IFN_GOACC_REDUCTION_FINI,
- IFN_GOACC_REDUCTION_TEARDOWN
+#define DEF(X) IFN_GOACC_REDUCTION_##X
+ IFN_GOACC_REDUCTION_CODES
+#undef DEF
};
/* Initialize internal function tables. */