Commit c747300
[clang][OpenMP] Move "loop" directive mapping from sema to codegen (#99905)
Given "loop" construct, clang will try to treat it as "for",
"distribute" or "simd", depending on either the implied binding, or the
bind clause if present. This patch moves the code that performs this
construct remapping from sema to codegen.
For a "loop" construct without a bind clause, this patch will create an
implicit bind clause based on implied binding to simplify further
analysis.
During codegen the function `EmitOMPGenericLoopDirective` (i.e. "loop")
will invoke the "emit" functions for "for", "distribute" or "simd",
depending on the bind clause.
---------
Co-authored-by: Alexey Bataev <[email protected]>1 parent 2eea9d6 commit c747300
File tree
11 files changed
+385
-462
lines changed- clang
- include/clang
- AST
- Sema
- lib
- AST
- CodeGen
- Sema
- Serialization
- test
- OpenMP
- PCH
11 files changed
+385
-462
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | 284 | | |
294 | 285 | | |
295 | 286 | | |
| |||
354 | 345 | | |
355 | 346 | | |
356 | 347 | | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | 348 | | |
362 | 349 | | |
363 | 350 | | |
| |||
611 | 598 | | |
612 | 599 | | |
613 | 600 | | |
614 | | - | |
615 | | - | |
616 | 601 | | |
617 | 602 | | |
618 | 603 | | |
| |||
1620 | 1605 | | |
1621 | 1606 | | |
1622 | 1607 | | |
1623 | | - | |
1624 | | - | |
| 1608 | + | |
1625 | 1609 | | |
1626 | 1610 | | |
1627 | 1611 | | |
| |||
1699 | 1683 | | |
1700 | 1684 | | |
1701 | 1685 | | |
1702 | | - | |
1703 | | - | |
| 1686 | + | |
1704 | 1687 | | |
1705 | 1688 | | |
1706 | 1689 | | |
| |||
4478 | 4461 | | |
4479 | 4462 | | |
4480 | 4463 | | |
4481 | | - | |
4482 | | - | |
| 4464 | + | |
4483 | 4465 | | |
4484 | 4466 | | |
4485 | 4467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
402 | | - | |
| 401 | + | |
403 | 402 | | |
404 | 403 | | |
405 | 404 | | |
| |||
1430 | 1429 | | |
1431 | 1430 | | |
1432 | 1431 | | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | 1432 | | |
1454 | 1433 | | |
1455 | 1434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
| |||
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
323 | | - | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | | - | |
| 339 | + | |
341 | 340 | | |
342 | 341 | | |
343 | 342 | | |
| |||
367 | 366 | | |
368 | 367 | | |
369 | 368 | | |
370 | | - | |
371 | 369 | | |
372 | 370 | | |
373 | 371 | | |
| |||
1569 | 1567 | | |
1570 | 1568 | | |
1571 | 1569 | | |
1572 | | - | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
1576 | 1575 | | |
1577 | 1576 | | |
1578 | 1577 | | |
| |||
1601 | 1600 | | |
1602 | 1601 | | |
1603 | 1602 | | |
1604 | | - | |
1605 | 1603 | | |
1606 | 1604 | | |
1607 | 1605 | | |
| |||
0 commit comments