Commit 45732b6
authored
[mlir][Transforms] Fix compile time regression in dialect conversion (llvm#83023)
The dialect conversion does not directly erase ops that are
replaced/erased with a rewriter. Instead, the op stays in place and is
erased at the end if the dialect conversion succeeds. However, ops that
were replaced/erased are ignored from that point on.
llvm#81757 introduced a compile time regression that made the check whether
an op is ignored or not more expensive. Whether an op is ignored or not
is queried many times throughout a dialect conversion, so the check must
be fast.
After this change, replaced ops are stored in the `ignoredOps` set. This
also simplifies the dialect conversion a bit.1 parent 82acec1 commit 45732b6
1 file changed
+4
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
| 1232 | + | |
| 1233 | + | |
1235 | 1234 | | |
1236 | 1235 | | |
1237 | 1236 | | |
| |||
1480 | 1479 | | |
1481 | 1480 | | |
1482 | 1481 | | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
| 1482 | + | |
1489 | 1483 | | |
1490 | 1484 | | |
1491 | 1485 | | |
| |||
1506 | 1500 | | |
1507 | 1501 | | |
1508 | 1502 | | |
| 1503 | + | |
1509 | 1504 | | |
1510 | 1505 | | |
1511 | 1506 | | |
| |||
0 commit comments