Commit 7a86041
committed
[Flang] Add lowering support for depobj in depend clause
From Documentation:
depobj: The task dependences are derived from the depend clause
specified in the depobj constructs that initialized dependences
represented by the depend objects specified in the depend clause
as if the depend clauses of the depobj constructs were specified in
the current construct.
Implementation details:
- The variable is of type omp_depend_kind and is used as a locator_list.
- Access the base address of obj and compute the clause size, based on
the obj value and other clauses count.
- Allocate struct.kmp_dep_info with the size computed before.
- Now, populate all the depend clauses information into the alloca.
the other clauses info is added first in the index, 0, 1, 2, ... and
then all the depobj clauses info.
- Then, the alloca and size is passed as argument to
__kmpc_omp_task_with_deps runtime.
- `Stacksave` and `Stackrestore` is used to restore the stack pointer to
the state before the depobj operations. Basically removing all the
alloca's used.
TODO:
Requires depobj construct support for checking runtime results.
Also, test debobj modify and destroy clauses1 parent a01e1d4 commit 7a86041
File tree
8 files changed
+158
-37
lines changed- flang
- lib/Lower/OpenMP
- test/Lower/OpenMP
- Todo
- llvm
- include/llvm/Frontend/OpenMP
- lib/Frontend/OpenMP
- mlir
- include/mlir/Dialect/OpenMP
- lib/Target/LLVMIR/Dialect/OpenMP
- test/Target/LLVMIR
8 files changed
+158
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
| |||
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
159 | 165 | | |
160 | 166 | | |
161 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1241 | 1241 | | |
1242 | 1242 | | |
1243 | 1243 | | |
| 1244 | + | |
1244 | 1245 | | |
1245 | 1246 | | |
1246 | | - | |
1247 | | - | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1248 | 1250 | | |
1249 | 1251 | | |
1250 | 1252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2049 | 2049 | | |
2050 | 2050 | | |
2051 | 2051 | | |
2052 | | - | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
2053 | 2055 | | |
2054 | 2056 | | |
2055 | 2057 | | |
2056 | 2058 | | |
2057 | 2059 | | |
2058 | 2060 | | |
2059 | | - | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
2060 | 2100 | | |
2061 | 2101 | | |
2062 | 2102 | | |
| 2103 | + | |
| 2104 | + | |
2063 | 2105 | | |
2064 | | - | |
| 2106 | + | |
2065 | 2107 | | |
2066 | 2108 | | |
2067 | 2109 | | |
| |||
2087 | 2129 | | |
2088 | 2130 | | |
2089 | 2131 | | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
2090 | 2149 | | |
2091 | 2150 | | |
2092 | 2151 | | |
| |||
2124 | 2183 | | |
2125 | 2184 | | |
2126 | 2185 | | |
2127 | | - | |
| 2186 | + | |
2128 | 2187 | | |
2129 | 2188 | | |
2130 | 2189 | | |
| |||
2146 | 2205 | | |
2147 | 2206 | | |
2148 | 2207 | | |
2149 | | - | |
2150 | | - | |
2151 | | - | |
2152 | | - | |
2153 | | - | |
2154 | | - | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
2155 | 2215 | | |
2156 | 2216 | | |
2157 | 2217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1715 | 1715 | | |
1716 | 1716 | | |
1717 | 1717 | | |
| 1718 | + | |
1718 | 1719 | | |
1719 | 1720 | | |
1720 | 1721 | | |
| |||
1733 | 1734 | | |
1734 | 1735 | | |
1735 | 1736 | | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
1736 | 1740 | | |
1737 | 1741 | | |
1738 | | - | |
| 1742 | + | |
| 1743 | + | |
1739 | 1744 | | |
1740 | 1745 | | |
1741 | 1746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2653 | 2653 | | |
2654 | 2654 | | |
2655 | 2655 | | |
2656 | | - | |
| 2656 | + | |
2657 | 2657 | | |
2658 | 2658 | | |
2659 | 2659 | | |
| |||
2664 | 2664 | | |
2665 | 2665 | | |
2666 | 2666 | | |
2667 | | - | |
| 2667 | + | |
2668 | 2668 | | |
2669 | 2669 | | |
2670 | 2670 | | |
2671 | 2671 | | |
2672 | 2672 | | |
2673 | 2673 | | |
2674 | | - | |
| 2674 | + | |
2675 | 2675 | | |
2676 | 2676 | | |
2677 | 2677 | | |
2678 | 2678 | | |
2679 | 2679 | | |
2680 | 2680 | | |
2681 | | - | |
| 2681 | + | |
2682 | 2682 | | |
2683 | 2683 | | |
2684 | 2684 | | |
2685 | 2685 | | |
2686 | 2686 | | |
2687 | 2687 | | |
2688 | | - | |
| 2688 | + | |
2689 | 2689 | | |
2690 | 2690 | | |
2691 | 2691 | | |
| |||
2734 | 2734 | | |
2735 | 2735 | | |
2736 | 2736 | | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
2737 | 2794 | | |
2738 | 2795 | | |
2739 | 2796 | | |
| |||
0 commit comments