* doc/loop.texi: Document number_of_latch_executions and
[official-gcc.git] / gcc / omp-builtins.def
blob596beae97aafe6caf6c45ac35922fc05b39e6ab6
1 /* This file contains the definitions and documentation for the
2 OpenMP builtins used in the GNU compiler.
3 Copyright (C) 2005 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
20 02110-1301, USA. */
22 /* Before including this file, you should define a macro:
24 DEF_GOMP_BUILTIN (ENUM, NAME, TYPE, ATTRS)
26 See builtins.def for details. */
28 DEF_GOMP_BUILTIN (BUILT_IN_OMP_GET_THREAD_NUM, "omp_get_thread_num",
29 BT_FN_INT, ATTR_CONST_NOTHROW_LIST)
30 DEF_GOMP_BUILTIN (BUILT_IN_OMP_GET_NUM_THREADS, "omp_get_num_threads",
31 BT_FN_INT, ATTR_CONST_NOTHROW_LIST)
33 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ATOMIC_START, "GOMP_atomic_start",
34 BT_FN_VOID, ATTR_NOTHROW_LIST)
35 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ATOMIC_END, "GOMP_atomic_end",
36 BT_FN_VOID, ATTR_NOTHROW_LIST)
37 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_BARRIER, "GOMP_barrier",
38 BT_FN_VOID, ATTR_NOTHROW_LIST)
39 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_CRITICAL_START, "GOMP_critical_start",
40 BT_FN_VOID, ATTR_NOTHROW_LIST)
41 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_CRITICAL_END, "GOMP_critical_end",
42 BT_FN_VOID, ATTR_NOTHROW_LIST)
43 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_CRITICAL_NAME_START,
44 "GOMP_critical_name_start",
45 BT_FN_VOID_PTRPTR, ATTR_NOTHROW_LIST)
46 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_CRITICAL_NAME_END,
47 "GOMP_critical_name_end",
48 BT_FN_VOID_PTRPTR, ATTR_NOTHROW_LIST)
49 /* NOTE: Do not change the order of BUILT_IN_GOMP_LOOP_*_START. They
50 are used in index arithmetic with enum omp_clause_schedule_kind
51 in omp-low.c. */
52 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_STATIC_START,
53 "GOMP_loop_static_start",
54 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
55 ATTR_NOTHROW_LIST)
56 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_DYNAMIC_START,
57 "GOMP_loop_dynamic_start",
58 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
59 ATTR_NOTHROW_LIST)
60 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_GUIDED_START,
61 "GOMP_loop_guided_start",
62 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
63 ATTR_NOTHROW_LIST)
64 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_RUNTIME_START,
65 "GOMP_loop_runtime_start",
66 BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
67 ATTR_NOTHROW_LIST)
68 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
69 "GOMP_loop_ordered_static_start",
70 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
71 ATTR_NOTHROW_LIST)
72 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
73 "GOMP_loop_ordered_dynamic_start",
74 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
75 ATTR_NOTHROW_LIST)
76 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
77 "GOMP_loop_ordered_guided_start",
78 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
79 ATTR_NOTHROW_LIST)
80 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
81 "GOMP_loop_ordered_runtime_start",
82 BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
83 ATTR_NOTHROW_LIST)
84 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_STATIC_NEXT, "GOMP_loop_static_next",
85 BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
86 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT, "GOMP_loop_dynamic_next",
87 BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
88 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_GUIDED_NEXT, "GOMP_loop_guided_next",
89 BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
90 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_RUNTIME_NEXT, "GOMP_loop_runtime_next",
91 BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
92 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
93 "GOMP_loop_ordered_static_next",
94 BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
95 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
96 "GOMP_loop_ordered_dynamic_next",
97 BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
98 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
99 "GOMP_loop_ordered_guided_next",
100 BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
101 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
102 "GOMP_loop_ordered_runtime_next",
103 BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
104 /* NOTE: Do not change the order of BUILT_IN_GOMP_PARALLEL_LOOP_*_START.
105 They are used in index arithmetic with enum omp_clause_schedule_kind
106 in omp-low.c. */
107 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
108 "GOMP_parallel_loop_static_start",
109 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
110 ATTR_NOTHROW_LIST)
111 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
112 "GOMP_parallel_loop_dynamic_start",
113 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
114 ATTR_NOTHROW_LIST)
115 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
116 "GOMP_parallel_loop_guided_start",
117 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
118 ATTR_NOTHROW_LIST)
119 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
120 "GOMP_parallel_loop_runtime_start",
121 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
122 ATTR_NOTHROW_LIST)
123 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_END, "GOMP_loop_end",
124 BT_FN_VOID, ATTR_NOTHROW_LIST)
125 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_END_NOWAIT, "GOMP_loop_end_nowait",
126 BT_FN_VOID, ATTR_NOTHROW_LIST)
127 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ORDERED_START, "GOMP_ordered_start",
128 BT_FN_VOID, ATTR_NOTHROW_LIST)
129 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ORDERED_END, "GOMP_ordered_end",
130 BT_FN_VOID, ATTR_NOTHROW_LIST)
131 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_START, "GOMP_parallel_start",
132 BT_FN_VOID_OMPFN_PTR_UINT, ATTR_NOTHROW_LIST)
133 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_END, "GOMP_parallel_end",
134 BT_FN_VOID, ATTR_NOTHROW_LIST)
135 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SECTIONS_START, "GOMP_sections_start",
136 BT_FN_UINT_UINT, ATTR_NOTHROW_LIST)
137 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SECTIONS_NEXT, "GOMP_sections_next",
138 BT_FN_UINT, ATTR_NOTHROW_LIST)
139 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_SECTIONS_START,
140 "GOMP_parallel_sections_start",
141 BT_FN_VOID_OMPFN_PTR_UINT_UINT, ATTR_NOTHROW_LIST)
142 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SECTIONS_END, "GOMP_sections_end",
143 BT_FN_VOID, ATTR_NOTHROW_LIST)
144 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SECTIONS_END_NOWAIT,
145 "GOMP_sections_end_nowait",
146 BT_FN_VOID, ATTR_NOTHROW_LIST)
147 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SINGLE_START, "GOMP_single_start",
148 BT_FN_BOOL, ATTR_NOTHROW_LIST)
149 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SINGLE_COPY_START, "GOMP_single_copy_start",
150 BT_FN_PTR, ATTR_NOTHROW_LIST)
151 DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SINGLE_COPY_END, "GOMP_single_copy_end",
152 BT_FN_VOID_PTR, ATTR_NOTHROW_LIST)