Commit 35c2a0f
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 8a3fe30 commit 35c2a0f
File tree
3 files changed
+32
-54
lines changed- llvm
- include/llvm/Analysis
- lib/Analysis
- test/Analysis/LoopAccessAnalysis
3 files changed
+32
-54
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
376 | | - | |
377 | 375 | | |
378 | 376 | | |
379 | 377 | | |
| |||
383 | 381 | | |
384 | 382 | | |
385 | 383 | | |
386 | | - | |
387 | 384 | | |
388 | 385 | | |
389 | 386 | | |
390 | | - | |
391 | 387 | | |
392 | 388 | | |
393 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2009 | 2009 | | |
2010 | 2010 | | |
2011 | 2011 | | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | | - | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
2016 | 2017 | | |
2017 | 2018 | | |
2018 | | - | |
2019 | | - | |
| 2019 | + | |
2020 | 2020 | | |
2021 | 2021 | | |
2022 | 2022 | | |
| |||
2031 | 2031 | | |
2032 | 2032 | | |
2033 | 2033 | | |
2034 | | - | |
2035 | | - | |
| 2034 | + | |
2036 | 2035 | | |
2037 | 2036 | | |
2038 | 2037 | | |
2039 | 2038 | | |
2040 | | - | |
2041 | | - | |
2042 | | - | |
2043 | 2039 | | |
2044 | 2040 | | |
2045 | 2041 | | |
| |||
2099 | 2095 | | |
2100 | 2096 | | |
2101 | 2097 | | |
2102 | | - | |
2103 | | - | |
2104 | | - | |
2105 | | - | |
2106 | | - | |
2107 | | - | |
| 2098 | + | |
2108 | 2099 | | |
2109 | | - | |
2110 | 2100 | | |
2111 | 2101 | | |
2112 | 2102 | | |
| |||
2122 | 2112 | | |
2123 | 2113 | | |
2124 | 2114 | | |
2125 | | - | |
2126 | | - | |
| 2115 | + | |
2127 | 2116 | | |
2128 | | - | |
2129 | | - | |
2130 | | - | |
2131 | | - | |
2132 | | - | |
2133 | | - | |
2134 | | - | |
2135 | | - | |
2136 | | - | |
2137 | | - | |
2138 | | - | |
2139 | | - | |
2140 | | - | |
2141 | 2117 | | |
2142 | 2118 | | |
2143 | 2119 | | |
| |||
Lines changed: 23 additions & 17 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 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
345 | 351 | | |
346 | 352 | | |
347 | 353 | | |
| |||
0 commit comments