Commit 8cfde92
committed
MergeSimilarFunctions: do a return_call when possible
This patch makes MergeSimilarFunctions do a return_call when the
module has tail-call enabled. This is not merely an optimization, but
is crucial for correctness when optimizing wasm modules produced by
GHC that relies on tail-call to do control flow transfers. Previously,
-Oz would break tail-call enabled modules by making the control stack
grow where it shouldn't.1 parent bc47696 commit 8cfde92
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
480 | 481 | | |
481 | 482 | | |
482 | 483 | | |
483 | | - | |
| 484 | + | |
484 | 485 | | |
485 | 486 | | |
486 | 487 | | |
| |||
617 | 618 | | |
618 | 619 | | |
619 | 620 | | |
620 | | - | |
| 621 | + | |
| 622 | + | |
621 | 623 | | |
622 | 624 | | |
623 | 625 | | |
| |||
628 | 630 | | |
629 | 631 | | |
630 | 632 | | |
631 | | - | |
632 | | - | |
| 633 | + | |
633 | 634 | | |
634 | 635 | | |
635 | 636 | | |
| |||
0 commit comments