@@ -202,131 +202,132 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &Out,
202202 return printOpenACCAtomicKind (Out, AK);
203203}
204204
205- // / Represents the kind of an OpenACC clause.
205+ // / Represents the kind of an OpenACC clause. Sorted alphabetically, since this
206+ // / order ends up influencing the sorting of the list diagnostic.
206207enum class OpenACCClauseKind : uint8_t {
207- // / 'finalize' clause, allowed on 'exit data' directive.
208- Finalize,
209- // / 'if_present' clause, allowed on 'host_data' and 'update' directives.
210- IfPresent,
211- // / 'seq' clause, allowed on 'loop' and 'routine' directives.
212- Seq,
213- // / 'independent' clause, allowed on 'loop' directives.
214- Independent,
208+ // / 'async' clause, allowed on Compute, Data, 'update', 'wait', and Combined
209+ // / constructs.
210+ Async,
211+ // / 'attach' clause, allowed on Compute and Combined constructs, plus 'data'
212+ // / and 'enter data'.
213+ Attach,
215214 // / 'auto' clause, allowed on 'loop' directives.
216215 Auto,
217- // / 'worker' clause, allowed on 'loop', Combined, and 'routine' directives.
218- Worker,
219- // / 'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
220- Vector,
221- // / 'nohost' clause, allowed on 'routine' directives.
222- NoHost,
223- // / 'default' clause, allowed on parallel, serial, kernel (and compound)
224- // / constructs.
225- Default,
226- // / 'if' clause, allowed on all the Compute Constructs, Data Constructs,
227- // / Executable Constructs, and Combined Constructs.
228- If,
229- // / 'self' clause, allowed on Compute and Combined Constructs, plus 'update'.
230- Self,
216+ // / 'bind' clause, allowed on routine constructs.
217+ Bind,
218+ // / 'collapse' clause, allowed on 'loop' and Combined constructs.
219+ Collapse,
231220 // / 'copy' clause, allowed on Compute and Combined Constructs, plus 'data' and
232221 // / 'declare'.
233222 Copy,
234223 // / 'copy' clause alias 'pcopy'. Preserved for diagnostic purposes.
235224 PCopy,
236225 // / 'copy' clause alias 'present_or_copy'. Preserved for diagnostic purposes.
237226 PresentOrCopy,
238- // / 'use_device' clause, allowed on 'host_data' construct.
239- UseDevice,
240- // / 'attach' clause, allowed on Compute and Combined constructs, plus 'data'
241- // / and 'enter data'.
242- Attach,
227+ // / 'copyin' clause, allowed on Compute and Combined constructs, plus 'data',
228+ // / 'enter data', and 'declare'.
229+ CopyIn,
230+ // / 'copyin' clause alias 'pcopyin'. Preserved for diagnostic purposes.
231+ PCopyIn,
232+ // / 'copyin' clause alias 'present_or_copyin'. Preserved for diagnostic
233+ // / purposes.
234+ PresentOrCopyIn,
235+ // / 'copyout' clause, allowed on Compute and Combined constructs, plus 'data',
236+ // / 'exit data', and 'declare'.
237+ CopyOut,
238+ // / 'copyout' clause alias 'pcopyout'. Preserved for diagnostic purposes.
239+ PCopyOut,
240+ // / 'copyout' clause alias 'present_or_copyout'. Preserved for diagnostic
241+ // / purposes.
242+ PresentOrCopyOut,
243+ // / 'create' clause, allowed on Compute and Combined constructs, plus 'data',
244+ // / 'enter data', and 'declare'.
245+ Create,
246+ // / 'create' clause alias 'pcreate'. Preserved for diagnostic purposes.
247+ PCreate,
248+ // / 'create' clause alias 'present_or_create'. Preserved for diagnostic
249+ // / purposes.
250+ PresentOrCreate,
251+ // / 'default' clause, allowed on parallel, serial, kernel (and compound)
252+ // / constructs.
253+ Default,
254+ // / 'default_async' clause, allowed on 'set' construct.
255+ DefaultAsync,
243256 // / 'delete' clause, allowed on the 'exit data' construct.
244257 Delete,
245258 // / 'detach' clause, allowed on the 'exit data' construct.
246259 Detach,
247260 // / 'device' clause, allowed on the 'update' construct.
248261 Device,
262+ // / 'device_num' clause, allowed on 'init', 'shutdown', and 'set' constructs.
263+ DeviceNum,
249264 // / 'deviceptr' clause, allowed on Compute and Combined Constructs, plus
250265 // / 'data' and 'declare'.
251266 DevicePtr,
252267 // / 'device_resident' clause, allowed on the 'declare' construct.
253268 DeviceResident,
269+ // / 'device_type' clause, allowed on Compute, 'data', 'init', 'shutdown',
270+ // / 'set', update', 'loop', 'routine', and Combined constructs.
271+ DeviceType,
272+ // / 'dtype' clause, an alias for 'device_type', stored separately for
273+ // / diagnostic purposes.
274+ DType,
275+ // / 'finalize' clause, allowed on 'exit data' directive.
276+ Finalize,
254277 // / 'firstprivate' clause, allowed on 'parallel', 'serial', 'parallel loop',
255278 // / and 'serial loop' constructs.
256279 FirstPrivate,
280+ // / 'gang' clause, allowed on 'loop' and Combined constructs.
281+ Gang,
257282 // / 'host' clause, allowed on 'update' construct.
258283 Host,
284+ // / 'if' clause, allowed on all the Compute Constructs, Data Constructs,
285+ // / Executable Constructs, and Combined Constructs.
286+ If,
287+ // / 'if_present' clause, allowed on 'host_data' and 'update' directives.
288+ IfPresent,
289+ // / 'independent' clause, allowed on 'loop' directives.
290+ Independent,
259291 // / 'link' clause, allowed on 'declare' construct.
260292 Link,
261293 // / 'no_create' clause, allowed on allowed on Compute and Combined constructs,
262294 // / plus 'data'.
263295 NoCreate,
296+ // / 'nohost' clause, allowed on 'routine' directives.
297+ NoHost,
298+ // / 'num_gangs' clause, allowed on 'parallel', 'kernels', parallel loop', and
299+ // / 'kernels loop' constructs.
300+ NumGangs,
301+ // / 'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop',
302+ // / and 'kernels loop' constructs.
303+ NumWorkers,
264304 // / 'present' clause, allowed on Compute and Combined constructs, plus 'data'
265305 // / and 'declare'.
266306 Present,
267307 // / 'private' clause, allowed on 'parallel', 'serial', 'loop', 'parallel
268308 // / loop', and 'serial loop' constructs.
269309 Private,
270- // / 'copyout' clause, allowed on Compute and Combined constructs, plus 'data',
271- // / 'exit data', and 'declare'.
272- CopyOut,
273- // / 'copyout' clause alias 'pcopyout'. Preserved for diagnostic purposes.
274- PCopyOut,
275- // / 'copyout' clause alias 'present_or_copyout'. Preserved for diagnostic
276- // / purposes.
277- PresentOrCopyOut,
278- // / 'copyin' clause, allowed on Compute and Combined constructs, plus 'data',
279- // / 'enter data', and 'declare'.
280- CopyIn,
281- // / 'copyin' clause alias 'pcopyin'. Preserved for diagnostic purposes.
282- PCopyIn,
283- // / 'copyin' clause alias 'present_or_copyin'. Preserved for diagnostic
284- // / purposes.
285- PresentOrCopyIn,
286- // / 'create' clause, allowed on Compute and Combined constructs, plus 'data',
287- // / 'enter data', and 'declare'.
288- Create,
289- // / 'create' clause alias 'pcreate'. Preserved for diagnostic purposes.
290- PCreate,
291- // / 'create' clause alias 'present_or_create'. Preserved for diagnostic
292- // / purposes.
293- PresentOrCreate,
294310 // / 'reduction' clause, allowed on Parallel, Serial, Loop, and the combined
295311 // / constructs.
296312 Reduction,
297- // / 'collapse' clause, allowed on 'loop' and Combined constructs.
298- Collapse,
299- // / 'bind' clause, allowed on routine constructs.
300- Bind,
313+ // / 'self' clause, allowed on Compute and Combined Constructs, plus 'update'.
314+ Self,
315+ // / 'seq' clause, allowed on 'loop' and 'routine' directives.
316+ Seq,
317+ // / 'tile' clause, allowed on 'loop' and Combined constructs.
318+ Tile,
319+ // / 'use_device' clause, allowed on 'host_data' construct.
320+ UseDevice,
321+ // / 'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
322+ Vector,
301323 // / 'vector_length' clause, allowed on 'parallel', 'kernels', 'parallel loop',
302324 // / and 'kernels loop' constructs.
303325 VectorLength,
304- // / 'num_gangs' clause, allowed on 'parallel', 'kernels', parallel loop', and
305- // / 'kernels loop' constructs.
306- NumGangs,
307- // / 'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop',
308- // / and 'kernels loop' constructs.
309- NumWorkers,
310- // / 'device_num' clause, allowed on 'init', 'shutdown', and 'set' constructs.
311- DeviceNum,
312- // / 'default_async' clause, allowed on 'set' construct.
313- DefaultAsync,
314- // / 'device_type' clause, allowed on Compute, 'data', 'init', 'shutdown',
315- // / 'set', update', 'loop', 'routine', and Combined constructs.
316- DeviceType,
317- // / 'dtype' clause, an alias for 'device_type', stored separately for
318- // / diagnostic purposes.
319- DType,
320- // / 'async' clause, allowed on Compute, Data, 'update', 'wait', and Combined
321- // / constructs.
322- Async,
323- // / 'tile' clause, allowed on 'loop' and Combined constructs.
324- Tile,
325- // / 'gang' clause, allowed on 'loop' and Combined constructs.
326- Gang,
327326 // / 'wait' clause, allowed on Compute, Data, 'update', and Combined
328327 // / constructs.
329328 Wait,
329+ // / 'worker' clause, allowed on 'loop', Combined, and 'routine' directives.
330+ Worker,
330331
331332 // / 'shortloop' is represented in the ACC.td file, but isn't present in the
332333 // / standard. This appears to be an old extension for the nvidia fortran
0 commit comments