Commit ddd8b4f
committed
[LAA] hoist setting condition for rt-checks (NFC)
Strip ShouldRetyWithRuntimeCheck from the
DepedenceDistanceStrideAndSizeInfo struct, and free isDependent from the
responsibility of setting the condition for when runtime-checks are
needed, transferring this responsibility to
getDependenceDistanceStrideAndSize. The change is simple enough, but
proving that this was the original intent of the code, making the change
non-functional is non-trivial.
The proof is as follows. The condition for runtime-checks is only
respected when we return a Dependence::DepType of Dependence::Unknown,
and the only possible place that could introduce a functional change
with this patch is when Dist is possibly zero, but HasSameSize is false.
Previously, we weren't checking that the Dist is not a SCEVConstant, and
setting the runtime-check condition. Now, with the runtime-check
condition hoisted, we do. We note that for a functional change to occur,
the distance must be both non-constant, not provably non-positive and
non-negative, and this is an impossibility.1 parent 67e73ba commit ddd8b4f
File tree
3 files changed
+29
-51
lines changed- llvm
- include/llvm/Analysis
- lib/Analysis
- test/Analysis/LoopAccessAnalysis
3 files changed
+29
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
400 | | - | |
401 | 399 | | |
402 | 400 | | |
403 | 401 | | |
| |||
407 | 405 | | |
408 | 406 | | |
409 | 407 | | |
410 | | - | |
411 | 408 | | |
412 | 409 | | |
413 | 410 | | |
414 | | - | |
415 | 411 | | |
416 | 412 | | |
417 | 413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2081 | 2081 | | |
2082 | 2082 | | |
2083 | 2083 | | |
2084 | | - | |
2085 | | - | |
2086 | | - | |
2087 | | - | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
2088 | 2089 | | |
2089 | 2090 | | |
2090 | | - | |
2091 | | - | |
| 2091 | + | |
2092 | 2092 | | |
2093 | 2093 | | |
2094 | 2094 | | |
| |||
2103 | 2103 | | |
2104 | 2104 | | |
2105 | 2105 | | |
2106 | | - | |
2107 | | - | |
| 2106 | + | |
2108 | 2107 | | |
2109 | 2108 | | |
2110 | 2109 | | |
2111 | 2110 | | |
2112 | | - | |
2113 | | - | |
2114 | | - | |
2115 | 2111 | | |
2116 | 2112 | | |
2117 | 2113 | | |
| |||
2173 | 2169 | | |
2174 | 2170 | | |
2175 | 2171 | | |
2176 | | - | |
2177 | | - | |
2178 | | - | |
2179 | | - | |
2180 | | - | |
2181 | | - | |
| 2172 | + | |
2182 | 2173 | | |
2183 | | - | |
2184 | 2174 | | |
2185 | 2175 | | |
2186 | 2176 | | |
| |||
2195 | 2185 | | |
2196 | 2186 | | |
2197 | 2187 | | |
2198 | | - | |
2199 | | - | |
| 2188 | + | |
2200 | 2189 | | |
2201 | | - | |
2202 | | - | |
2203 | | - | |
2204 | | - | |
2205 | | - | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
2214 | 2190 | | |
2215 | 2191 | | |
2216 | 2192 | | |
| |||
Lines changed: 20 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
| 323 | + | |
325 | 324 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
335 | 341 | | |
336 | 342 | | |
337 | | - | |
338 | | - | |
| 343 | + | |
| 344 | + | |
339 | 345 | | |
340 | 346 | | |
341 | 347 | | |
342 | 348 | | |
343 | | - | |
344 | | - | |
| 349 | + | |
| 350 | + | |
345 | 351 | | |
346 | 352 | | |
347 | 353 | | |
| |||
0 commit comments