Commit 80625c1
authored
[MLIR][Affine] Fix memref replacement in affine-data-copy-generate (llvm#139016)
Fixes: llvm#130257
Fix affine-data-copy-generate in certain cases that involved users in
multiple blocks. Perform the memref replacement correctly during copy
generation.
Improve/clean up memref affine use replacement API. Instead of
supporting dominance and post dominance filters (which aren't adequate
in most cases) and computing dominance info expensively each time in
RAMUW, provide a user filter callback, i.e., force users to compute
dominance if needed.1 parent 28d4cc6 commit 80625c1
File tree
7 files changed
+109
-63
lines changed- mlir
- include/mlir/Dialect/Affine
- lib/Dialect
- Affine
- Transforms
- Utils
- MemRef/Transforms
- test/Dialect/Affine
7 files changed
+109
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
205 | 204 | | |
206 | 205 | | |
207 | 206 | | |
| |||
224 | 223 | | |
225 | 224 | | |
226 | 225 | | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
448 | 453 | | |
449 | 454 | | |
450 | 455 | | |
451 | | - | |
| 456 | + | |
452 | 457 | | |
453 | 458 | | |
454 | 459 | | |
| |||
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1967 | 1967 | | |
1968 | 1968 | | |
1969 | 1969 | | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
1970 | 1976 | | |
1971 | 1977 | | |
1972 | 1978 | | |
| |||
2143 | 2149 | | |
2144 | 2150 | | |
2145 | 2151 | | |
2146 | | - | |
2147 | | - | |
2148 | | - | |
2149 | | - | |
2150 | | - | |
2151 | | - | |
2152 | 2152 | | |
2153 | 2153 | | |
2154 | 2154 | | |
| |||
2244 | 2244 | | |
2245 | 2245 | | |
2246 | 2246 | | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
2247 | 2253 | | |
2248 | 2254 | | |
2249 | 2255 | | |
2250 | 2256 | | |
2251 | | - | |
2252 | | - | |
2253 | | - | |
| 2257 | + | |
2254 | 2258 | | |
2255 | 2259 | | |
2256 | 2260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| |||
1328 | 1328 | | |
1329 | 1329 | | |
1330 | 1330 | | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | 1331 | | |
1339 | 1332 | | |
1340 | 1333 | | |
1341 | 1334 | | |
1342 | 1335 | | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1350 | 1339 | | |
1351 | 1340 | | |
1352 | 1341 | | |
1353 | 1342 | | |
1354 | | - | |
| 1343 | + | |
1355 | 1344 | | |
1356 | 1345 | | |
1357 | 1346 | | |
1358 | 1347 | | |
1359 | 1348 | | |
1360 | 1349 | | |
1361 | | - | |
| 1350 | + | |
1362 | 1351 | | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
1366 | 1356 | | |
1367 | 1357 | | |
1368 | 1358 | | |
1369 | 1359 | | |
1370 | | - | |
| 1360 | + | |
1371 | 1361 | | |
1372 | 1362 | | |
1373 | | - | |
| 1363 | + | |
1374 | 1364 | | |
1375 | 1365 | | |
1376 | 1366 | | |
1377 | 1367 | | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
1381 | 1372 | | |
1382 | 1373 | | |
1383 | | - | |
| 1374 | + | |
1384 | 1375 | | |
1385 | | - | |
| 1376 | + | |
1386 | 1377 | | |
1387 | 1378 | | |
1388 | 1379 | | |
| |||
1763 | 1754 | | |
1764 | 1755 | | |
1765 | 1756 | | |
1766 | | - | |
1767 | | - | |
| 1757 | + | |
1768 | 1758 | | |
1769 | 1759 | | |
1770 | 1760 | | |
| |||
1854 | 1844 | | |
1855 | 1845 | | |
1856 | 1846 | | |
1857 | | - | |
1858 | | - | |
| 1847 | + | |
1859 | 1848 | | |
1860 | 1849 | | |
1861 | 1850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
| 300 | + | |
302 | 301 | | |
303 | 302 | | |
304 | 303 | | |
| |||
407 | 406 | | |
408 | 407 | | |
409 | 408 | | |
410 | | - | |
411 | | - | |
| 409 | + | |
412 | 410 | | |
413 | 411 | | |
414 | 412 | | |
| |||
457 | 455 | | |
458 | 456 | | |
459 | 457 | | |
460 | | - | |
461 | | - | |
| 458 | + | |
462 | 459 | | |
463 | 460 | | |
464 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
0 commit comments