Commit 2aaa416
[FIRRTL] Fix when flattening with layerblocks domination issue (#10650)
When flattening a when block, statements like asserts are merged with
ltlAndWithCondition and ltlImplicationWithCondition. In the process of
flattening, flattened ops that are identical become shared as an
optimization strategy. However, an op created inside of a layerblock
should not be shared by sibling layerblocks because an op defined in one
layerblock's region does not dominate a sibling layerblock.
This fixes the issue by saving a copy of cache before processing the layer
block. It then restores the copy after it finishes processing the
layerblock.
Assisted-by: Claude Code
Co-authored-by: Jack Toubes <jtoubes@berkeley.edu>1 parent c7f81c5 commit 2aaa416
2 files changed
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
709 | 719 | | |
710 | 720 | | |
711 | 721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
779 | 811 | | |
0 commit comments