comparison gcc/gimple.def @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* This file contains the definitions of the GIMPLE IR tuples used in GCC. 1 /* This file contains the definitions of the GIMPLE IR tuples used in GCC.
2 2
3 Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 3 Copyright (C) 2007-2017 Free Software Foundation, Inc.
4 Contributed by Aldy Hernandez <aldyh@redhat.com> 4 Contributed by Aldy Hernandez <aldyh@redhat.com>
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
8 GCC is free software; you can redistribute it and/or modify it under 8 GCC is free software; you can redistribute it and/or modify it under
122 is_gimple_operand. 122 is_gimple_operand.
123 123
124 CHAIN is the optional static chain link for nested functions. */ 124 CHAIN is the optional static chain link for nested functions. */
125 DEFGSCODE(GIMPLE_CALL, "gimple_call", GSS_CALL) 125 DEFGSCODE(GIMPLE_CALL, "gimple_call", GSS_CALL)
126 126
127 /* GIMPLE_TRANSACTION <BODY, LABEL> represents __transaction_atomic and
128 __transaction_relaxed blocks.
129 BODY is the sequence of statements inside the transaction.
130 LABEL is a label for the statement immediately following the
131 transaction. This is before RETURN so that it has MEM_OPS,
132 so that it can clobber global memory. */
133 DEFGSCODE(GIMPLE_TRANSACTION, "gimple_transaction", GSS_TRANSACTION)
134
127 /* GIMPLE_RETURN <RETVAL> represents return statements. 135 /* GIMPLE_RETURN <RETVAL> represents return statements.
128 136
129 RETVAL is the value to return or NULL. If a value is returned it 137 RETVAL is the value to return or NULL. If a value is returned it
130 must be accepted by is_gimple_operand. */ 138 must be accepted by is_gimple_operand. */
131 DEFGSCODE(GIMPLE_RETURN, "gimple_return", GSS_WITH_MEM_OPS) 139 DEFGSCODE(GIMPLE_RETURN, "gimple_return", GSS_WITH_MEM_OPS)
148 156
149 /* GIMPLE_EH_MUST_NOT_THROW <DECL> represents an exception barrier. 157 /* GIMPLE_EH_MUST_NOT_THROW <DECL> represents an exception barrier.
150 DECL is a noreturn function decl taking no arguments that will 158 DECL is a noreturn function decl taking no arguments that will
151 be invoked if an exception propagates to this point. */ 159 be invoked if an exception propagates to this point. */
152 DEFGSCODE(GIMPLE_EH_MUST_NOT_THROW, "gimple_eh_must_not_throw", GSS_EH_MNT) 160 DEFGSCODE(GIMPLE_EH_MUST_NOT_THROW, "gimple_eh_must_not_throw", GSS_EH_MNT)
161
162 /* GIMPLE_EH_ELSE <N_BODY, E_BODY> must be the sole contents of
163 a GIMPLE_TRY_FINALLY node. For all normal exits from the try block,
164 N_BODY is run; for all exception exits from the try block,
165 E_BODY is run. */
166 DEFGSCODE(GIMPLE_EH_ELSE, "gimple_eh_else", GSS_EH_ELSE)
153 167
154 /* GIMPLE_RESX resumes execution after an exception. */ 168 /* GIMPLE_RESX resumes execution after an exception. */
155 DEFGSCODE(GIMPLE_RESX, "gimple_resx", GSS_EH_CTRL) 169 DEFGSCODE(GIMPLE_RESX, "gimple_resx", GSS_EH_CTRL)
156 170
157 /* GIMPLE_EH_DISPATCH demultiplexes an exception edge based on 171 /* GIMPLE_EH_DISPATCH demultiplexes an exception edge based on
205 val = some computations involving tmp; 219 val = some computations involving tmp;
206 GIMPLE_OMP_STORE (val). */ 220 GIMPLE_OMP_STORE (val). */
207 DEFGSCODE(GIMPLE_OMP_ATOMIC_LOAD, "gimple_omp_atomic_load", 221 DEFGSCODE(GIMPLE_OMP_ATOMIC_LOAD, "gimple_omp_atomic_load",
208 GSS_OMP_ATOMIC_LOAD) 222 GSS_OMP_ATOMIC_LOAD)
209 DEFGSCODE(GIMPLE_OMP_ATOMIC_STORE, "gimple_omp_atomic_store", 223 DEFGSCODE(GIMPLE_OMP_ATOMIC_STORE, "gimple_omp_atomic_store",
210 GSS_OMP_ATOMIC_STORE) 224 GSS_OMP_ATOMIC_STORE_LAYOUT)
211 225
212 /* GIMPLE_OMP_CONTINUE marks the location of the loop or sections 226 /* GIMPLE_OMP_CONTINUE marks the location of the loop or sections
213 iteration in partially lowered OpenMP code. */ 227 iteration in partially lowered OpenMP code. */
214 DEFGSCODE(GIMPLE_OMP_CONTINUE, "gimple_omp_continue", GSS_OMP_CONTINUE) 228 DEFGSCODE(GIMPLE_OMP_CONTINUE, "gimple_omp_continue", GSS_OMP_CONTINUE)
215 229
227 PRE_BODY 241 PRE_BODY
228 #pragma omp for [clause1 ... clauseN] 242 #pragma omp for [clause1 ... clauseN]
229 for (INDEX = INITIAL; INDEX COND FINAL; INDEX {+=,-=} INCR) 243 for (INDEX = INITIAL; INDEX COND FINAL; INDEX {+=,-=} INCR)
230 BODY 244 BODY
231 245
246 Likewise for:
247 #pragma acc loop [clause1 ... clauseN]
248
232 BODY is the loop body. 249 BODY is the loop body.
233 250
234 CLAUSES is the list of clauses. 251 CLAUSES is the list of clauses.
235 252
236 INDEX must be an integer or pointer variable, which is implicitly thread 253 INDEX must be an integer or pointer variable, which is implicitly thread
253 structured block, but are evaluated before the loop body begins. 270 structured block, but are evaluated before the loop body begins.
254 271
255 INITIAL, FINAL and INCR are required to be loop invariant integer 272 INITIAL, FINAL and INCR are required to be loop invariant integer
256 expressions that are evaluated without any synchronization. 273 expressions that are evaluated without any synchronization.
257 The evaluation order, frequency of evaluation and side-effects are 274 The evaluation order, frequency of evaluation and side-effects are
258 unspecified by the standard. */ 275 unspecified by the standards. */
259 DEFGSCODE(GIMPLE_OMP_FOR, "gimple_omp_for", GSS_OMP_FOR) 276 DEFGSCODE(GIMPLE_OMP_FOR, "gimple_omp_for", GSS_OMP_FOR)
260 277
261 /* GIMPLE_OMP_MASTER <BODY> represents #pragma omp master. 278 /* GIMPLE_OMP_MASTER <BODY> represents #pragma omp master.
262 BODY is the sequence of statements to execute in the master section. */ 279 BODY is the sequence of statements to execute in the master section. */
263 DEFGSCODE(GIMPLE_OMP_MASTER, "gimple_omp_master", GSS_OMP) 280 DEFGSCODE(GIMPLE_OMP_MASTER, "gimple_omp_master", GSS_OMP)
264 281
265 /* GIMPLE_OMP_ORDERED <BODY> represents #pragma omp ordered. 282 /* GIMPLE_OMP_TASKGROUP <BODY> represents #pragma omp taskgroup.
266 BODY is the sequence of statements to execute in the ordered section. */ 283 BODY is the sequence of statements to execute in the taskgroup section. */
267 DEFGSCODE(GIMPLE_OMP_ORDERED, "gimple_omp_ordered", GSS_OMP) 284 DEFGSCODE(GIMPLE_OMP_TASKGROUP, "gimple_omp_taskgroup", GSS_OMP)
268 285
269 /* GIMPLE_OMP_PARALLEL <BODY, CLAUSES, CHILD_FN, DATA_ARG> represents 286 /* GIMPLE_OMP_PARALLEL <BODY, CLAUSES, CHILD_FN, DATA_ARG> represents
270 287
271 #pragma omp parallel [CLAUSES] 288 #pragma omp parallel [CLAUSES]
272 BODY 289 BODY
273 290
274 BODY is a the sequence of statements to be executed by all threads. 291 BODY is a the sequence of statements to be executed by all threads.
275 292
276 CLAUSES is a TREE_LIST node with all the clauses. 293 CLAUSES is an OMP_CLAUSE chain with all the clauses.
277 294
278 CHILD_FN is set when outlining the body of the parallel region. 295 CHILD_FN is set when outlining the body of the parallel region.
279 All the statements in BODY are moved into this newly created 296 All the statements in BODY are moved into this newly created
280 function when converting OMP constructs into low-GIMPLE. 297 function when converting OMP constructs into low-GIMPLE.
281 298
282 DATA_ARG is a local variable in the parent function containing data 299 DATA_ARG is a local variable in the parent function containing data
283 to be shared with CHILD_FN. This is used to implement all the data 300 to be shared with CHILD_FN. This is used to implement all the data
284 sharing clauses. */ 301 sharing clauses. */
285 DEFGSCODE(GIMPLE_OMP_PARALLEL, "gimple_omp_parallel", GSS_OMP_PARALLEL) 302 DEFGSCODE(GIMPLE_OMP_PARALLEL, "gimple_omp_parallel", GSS_OMP_PARALLEL_LAYOUT)
286 303
287 /* GIMPLE_OMP_TASK <BODY, CLAUSES, CHILD_FN, DATA_ARG, COPY_FN, 304 /* GIMPLE_OMP_TASK <BODY, CLAUSES, CHILD_FN, DATA_ARG, COPY_FN,
288 ARG_SIZE, ARG_ALIGN> represents 305 ARG_SIZE, ARG_ALIGN> represents
289 306
290 #pragma omp task [CLAUSES] 307 #pragma omp task [CLAUSES]
291 BODY 308 BODY
292 309
293 BODY is a the sequence of statements to be executed by all threads. 310 BODY is a the sequence of statements to be executed by all threads.
294 311
295 CLAUSES is a TREE_LIST node with all the clauses. 312 CLAUSES is an OMP_CLAUSE chain with all the clauses.
296 313
297 CHILD_FN is set when outlining the body of the explicit task region. 314 CHILD_FN is set when outlining the body of the explicit task region.
298 All the statements in BODY are moved into this newly created 315 All the statements in BODY are moved into this newly created
299 function when converting OMP constructs into low-GIMPLE. 316 function when converting OMP constructs into low-GIMPLE.
300 317
309 ARG_SIZE and ARG_ALIGN are the size and alignment of the incoming 326 ARG_SIZE and ARG_ALIGN are the size and alignment of the incoming
310 data area allocated by GOMP_task and passed to CHILD_FN. */ 327 data area allocated by GOMP_task and passed to CHILD_FN. */
311 DEFGSCODE(GIMPLE_OMP_TASK, "gimple_omp_task", GSS_OMP_TASK) 328 DEFGSCODE(GIMPLE_OMP_TASK, "gimple_omp_task", GSS_OMP_TASK)
312 329
313 /* OMP_RETURN marks the end of an OpenMP directive. */ 330 /* OMP_RETURN marks the end of an OpenMP directive. */
314 DEFGSCODE(GIMPLE_OMP_RETURN, "gimple_omp_return", GSS_BASE) 331 DEFGSCODE(GIMPLE_OMP_RETURN, "gimple_omp_return", GSS_OMP_ATOMIC_STORE_LAYOUT)
315 332
316 /* OMP_SECTION <BODY> represents #pragma omp section. 333 /* OMP_SECTION <BODY> represents #pragma omp section.
317 BODY is the sequence of statements in the section body. */ 334 BODY is the sequence of statements in the section body. */
318 DEFGSCODE(GIMPLE_OMP_SECTION, "gimple_omp_section", GSS_OMP) 335 DEFGSCODE(GIMPLE_OMP_SECTION, "gimple_omp_section", GSS_OMP)
319 336
320 /* OMP_SECTIONS <BODY, CLAUSES, CONTROL> represents #pragma omp sections. 337 /* OMP_SECTIONS <BODY, CLAUSES, CONTROL> represents #pragma omp sections.
321 338
322 BODY is the sequence of statements in the sections body. 339 BODY is the sequence of statements in the sections body.
323 CLAUSES is a TREE_LIST node holding the list of associated clauses. 340 CLAUSES is an OMP_CLAUSE chain holding the list of associated clauses.
324 CONTROL is a VAR_DECL used for deciding which of the sections 341 CONTROL is a VAR_DECL used for deciding which of the sections
325 to execute. */ 342 to execute. */
326 DEFGSCODE(GIMPLE_OMP_SECTIONS, "gimple_omp_sections", GSS_OMP_SECTIONS) 343 DEFGSCODE(GIMPLE_OMP_SECTIONS, "gimple_omp_sections", GSS_OMP_SECTIONS)
327 344
328 /* GIMPLE_OMP_SECTIONS_SWITCH is a marker placed immediately after 345 /* GIMPLE_OMP_SECTIONS_SWITCH is a marker placed immediately after
330 branch is taken. */ 347 branch is taken. */
331 DEFGSCODE(GIMPLE_OMP_SECTIONS_SWITCH, "gimple_omp_sections_switch", GSS_BASE) 348 DEFGSCODE(GIMPLE_OMP_SECTIONS_SWITCH, "gimple_omp_sections_switch", GSS_BASE)
332 349
333 /* GIMPLE_OMP_SINGLE <BODY, CLAUSES> represents #pragma omp single 350 /* GIMPLE_OMP_SINGLE <BODY, CLAUSES> represents #pragma omp single
334 BODY is the sequence of statements inside the single section. 351 BODY is the sequence of statements inside the single section.
335 CLAUSES is a TREE_LIST node holding the associated clauses. */ 352 CLAUSES is an OMP_CLAUSE chain holding the associated clauses. */
336 DEFGSCODE(GIMPLE_OMP_SINGLE, "gimple_omp_single", GSS_OMP_SINGLE) 353 DEFGSCODE(GIMPLE_OMP_SINGLE, "gimple_omp_single", GSS_OMP_SINGLE_LAYOUT)
354
355 /* GIMPLE_OMP_TARGET <BODY, CLAUSES, CHILD_FN> represents
356 #pragma acc {kernels,parallel,data,enter data,exit data,update}
357 #pragma omp target {,data,update}
358 BODY is the sequence of statements inside the construct
359 (NULL for some variants).
360 CLAUSES is an OMP_CLAUSE chain holding the associated clauses.
361 CHILD_FN is set when outlining the body of the offloaded region.
362 All the statements in BODY are moved into this newly created
363 function when converting OMP constructs into low-GIMPLE.
364 DATA_ARG is a vec of 3 local variables in the parent function
365 containing data to be mapped to CHILD_FN. This is used to
366 implement the MAP clauses. */
367 DEFGSCODE(GIMPLE_OMP_TARGET, "gimple_omp_target", GSS_OMP_PARALLEL_LAYOUT)
368
369 /* GIMPLE_OMP_TEAMS <BODY, CLAUSES> represents #pragma omp teams
370 BODY is the sequence of statements inside the single section.
371 CLAUSES is an OMP_CLAUSE chain holding the associated clauses. */
372 DEFGSCODE(GIMPLE_OMP_TEAMS, "gimple_omp_teams", GSS_OMP_SINGLE_LAYOUT)
373
374 /* GIMPLE_OMP_ORDERED <BODY, CLAUSES> represents #pragma omp ordered.
375 BODY is the sequence of statements to execute in the ordered section.
376 CLAUSES is an OMP_CLAUSE chain holding the associated clauses. */
377 DEFGSCODE(GIMPLE_OMP_ORDERED, "gimple_omp_ordered", GSS_OMP_SINGLE_LAYOUT)
378
379 /* GIMPLE_OMP_GRID_BODY <BODY> represents a parallel loop lowered for execution
380 on a GPU. It is an artificial statement created by omp lowering. */
381 DEFGSCODE(GIMPLE_OMP_GRID_BODY, "gimple_omp_gpukernel", GSS_OMP)
337 382
338 /* GIMPLE_PREDICT <PREDICT, OUTCOME> specifies a hint for branch prediction. 383 /* GIMPLE_PREDICT <PREDICT, OUTCOME> specifies a hint for branch prediction.
339 384
340 PREDICT is one of the predictors from predict.def. 385 PREDICT is one of the predictors from predict.def.
341 386