Commit 60aac81
[mlir] Add
This change introduces the `xls.cover` operation, which corresponds to the XLS IR `cover` node. Translation is implemented in both directions between XLS IR and MLIR. Test cases are added for both MLIR-to-XLS and XLS-to-MLIR translation of the `cover` operation. The MLIR-to-XLS translation logic is updated to correctly handle operations that do not produce a result.
PiperOrigin-RevId: 939971774xls.cover operation to XLS MLIR.1 parent be5dd5d commit 60aac81
5 files changed
Lines changed: 77 additions & 6 deletions
File tree
- xls/contrib/mlir
- IR
- testdata
- translate_from_xls
- tools/xls_translate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2352 | 2352 | | |
2353 | 2353 | | |
2354 | 2354 | | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
2355 | 2379 | | |
2356 | 2380 | | |
2357 | 2381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
516 | 521 | | |
517 | 522 | | |
518 | 523 | | |
| |||
1208 | 1213 | | |
1209 | 1214 | | |
1210 | 1215 | | |
1211 | | - | |
| 1216 | + | |
1212 | 1217 | | |
1213 | 1218 | | |
1214 | 1219 | | |
| |||
Lines changed: 26 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1320 | 1320 | | |
1321 | 1321 | | |
1322 | 1322 | | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1323 | 1339 | | |
1324 | 1340 | | |
1325 | 1341 | | |
| |||
1402 | 1418 | | |
1403 | 1419 | | |
1404 | 1420 | | |
1405 | | - | |
1406 | | - | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
1407 | 1424 | | |
1408 | 1425 | | |
1409 | 1426 | | |
| |||
1416 | 1433 | | |
1417 | 1434 | | |
1418 | 1435 | | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
1422 | 1443 | | |
1423 | 1444 | | |
1424 | 1445 | | |
| |||
0 commit comments