Commit 50619d2
committed
[MLIR][OpenMP] Reduce overhead of target compilation
This patch avoids calling `TargetOp::getInnermostCapturedOmpOp` multiple times
during initialization of default and runtime target attributes in MLIR to LLVM
IR translation of `omp.target` operations. This is a potentially expensive
operation, so this change should help keep compile times lower.1 parent cbeae3e commit 50619d2
File tree
3 files changed
+32
-14
lines changed- mlir
- include/mlir/Dialect/OpenMP
- lib
- Dialect/OpenMP/IR
- Target/LLVMIR/Dialect/OpenMP
3 files changed
+32
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1343 | 1343 | | |
1344 | 1344 | | |
1345 | 1345 | | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
1346 | 1350 | | |
1347 | 1351 | | |
1348 | 1352 | | |
1349 | 1353 | | |
1350 | | - | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
1351 | 1360 | | |
1352 | 1361 | | |
1353 | 1362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2025 | 2025 | | |
2026 | 2026 | | |
2027 | 2027 | | |
2028 | | - | |
| 2028 | + | |
| 2029 | + | |
2029 | 2030 | | |
2030 | 2031 | | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
2031 | 2039 | | |
2032 | 2040 | | |
2033 | | - | |
2034 | | - | |
| 2041 | + | |
2035 | 2042 | | |
2036 | 2043 | | |
2037 | 2044 | | |
2038 | | - | |
| 2045 | + | |
2039 | 2046 | | |
2040 | 2047 | | |
2041 | 2048 | | |
| |||
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4558 | 4558 | | |
4559 | 4559 | | |
4560 | 4560 | | |
4561 | | - | |
| 4561 | + | |
4562 | 4562 | | |
4563 | 4563 | | |
4564 | 4564 | | |
4565 | | - | |
4566 | 4565 | | |
4567 | 4566 | | |
4568 | 4567 | | |
| |||
4644 | 4643 | | |
4645 | 4644 | | |
4646 | 4645 | | |
4647 | | - | |
| 4646 | + | |
4648 | 4647 | | |
4649 | 4648 | | |
4650 | 4649 | | |
| |||
4660 | 4659 | | |
4661 | 4660 | | |
4662 | 4661 | | |
4663 | | - | |
| 4662 | + | |
4664 | 4663 | | |
4665 | | - | |
4666 | | - | |
| 4664 | + | |
4667 | 4665 | | |
4668 | 4666 | | |
4669 | 4667 | | |
| |||
4690 | 4688 | | |
4691 | 4689 | | |
4692 | 4690 | | |
4693 | | - | |
| 4691 | + | |
| 4692 | + | |
4694 | 4693 | | |
4695 | 4694 | | |
4696 | 4695 | | |
| |||
4940 | 4939 | | |
4941 | 4940 | | |
4942 | 4941 | | |
4943 | | - | |
| 4942 | + | |
| 4943 | + | |
| 4944 | + | |
4944 | 4945 | | |
4945 | 4946 | | |
4946 | 4947 | | |
4947 | 4948 | | |
4948 | | - | |
| 4949 | + | |
| 4950 | + | |
4949 | 4951 | | |
4950 | 4952 | | |
4951 | 4953 | | |
| |||
0 commit comments