Commit 4d9e77e
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 29db305 commit 4d9e77e
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 | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
397 | | - | |
398 | 396 | | |
399 | 397 | | |
400 | 398 | | |
| |||
404 | 402 | | |
405 | 403 | | |
406 | 404 | | |
407 | | - | |
408 | 405 | | |
409 | 406 | | |
410 | 407 | | |
411 | | - | |
412 | 408 | | |
413 | 409 | | |
414 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1979 | 1979 | | |
1980 | 1980 | | |
1981 | 1981 | | |
1982 | | - | |
1983 | | - | |
1984 | | - | |
1985 | | - | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
1986 | 1987 | | |
1987 | 1988 | | |
1988 | | - | |
1989 | | - | |
| 1989 | + | |
1990 | 1990 | | |
1991 | 1991 | | |
1992 | 1992 | | |
| |||
2001 | 2001 | | |
2002 | 2002 | | |
2003 | 2003 | | |
2004 | | - | |
2005 | | - | |
| 2004 | + | |
2006 | 2005 | | |
2007 | 2006 | | |
2008 | 2007 | | |
2009 | 2008 | | |
2010 | | - | |
2011 | | - | |
2012 | | - | |
2013 | 2009 | | |
2014 | 2010 | | |
2015 | 2011 | | |
| |||
2068 | 2064 | | |
2069 | 2065 | | |
2070 | 2066 | | |
2071 | | - | |
2072 | | - | |
2073 | | - | |
2074 | | - | |
2075 | | - | |
2076 | | - | |
| 2067 | + | |
2077 | 2068 | | |
2078 | | - | |
2079 | 2069 | | |
2080 | 2070 | | |
2081 | 2071 | | |
| |||
2090 | 2080 | | |
2091 | 2081 | | |
2092 | 2082 | | |
2093 | | - | |
2094 | | - | |
| 2083 | + | |
2095 | 2084 | | |
2096 | | - | |
2097 | | - | |
2098 | | - | |
2099 | | - | |
2100 | | - | |
2101 | | - | |
2102 | | - | |
2103 | | - | |
2104 | | - | |
2105 | | - | |
2106 | | - | |
2107 | | - | |
2108 | | - | |
2109 | 2085 | | |
2110 | 2086 | | |
2111 | 2087 | | |
| |||
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