Commit 7e6b07c
committed
[constant-folding] Visit struct, tuple when we initialize our worklist as well as when we are processing the worklist.
This simplifies the IR and eliminates in a certain sense "constant information"
from the IR by allowing us to remove extract, nominal literal round trips.
NOTE: I had to modify the pound_assert test slightly on the location of a note
that it emits. The reason that I did this is that the test output is technically
correct. The instruction we are interpreting when we error is (after this
commit), a debug_value in the prelude of the function (and thus has the new
location). I am going to talk with Ravi and others on what to do with this.1 parent f743c68 commit 7e6b07c
File tree
3 files changed
+58
-21
lines changed- lib/SILOptimizer/Utils
- test/SILOptimizer
3 files changed
+58
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
1532 | 1537 | | |
1533 | 1538 | | |
1534 | 1539 | | |
1535 | 1540 | | |
1536 | | - | |
| 1541 | + | |
1537 | 1542 | | |
1538 | 1543 | | |
1539 | 1544 | | |
1540 | 1545 | | |
1541 | | - | |
| 1546 | + | |
1542 | 1547 | | |
1543 | 1548 | | |
1544 | 1549 | | |
1545 | 1550 | | |
1546 | 1551 | | |
1547 | | - | |
1548 | | - | |
| 1552 | + | |
| 1553 | + | |
1549 | 1554 | | |
1550 | 1555 | | |
1551 | 1556 | | |
1552 | 1557 | | |
1553 | 1558 | | |
1554 | 1559 | | |
1555 | | - | |
1556 | | - | |
1557 | | - | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
1558 | 1568 | | |
1559 | 1569 | | |
1560 | 1570 | | |
1561 | | - | |
1562 | | - | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
1563 | 1576 | | |
1564 | 1577 | | |
1565 | 1578 | | |
1566 | | - | |
1567 | | - | |
1568 | | - | |
1569 | | - | |
1570 | | - | |
| 1579 | + | |
| 1580 | + | |
1571 | 1581 | | |
1572 | 1582 | | |
1573 | 1583 | | |
1574 | | - | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
1575 | 1590 | | |
1576 | 1591 | | |
1577 | | - | |
| 1592 | + | |
| 1593 | + | |
1578 | 1594 | | |
1579 | 1595 | | |
1580 | 1596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1004 | 1004 | | |
1005 | 1005 | | |
1006 | 1006 | | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
0 commit comments