Commit 8c5c4d9
authored
[Coro][WebAssembly] Add tail-call check for async lowering (#81481)
This patch fixes a verifier error when async lowering is used for
WebAssembly target without tail-call feature. This missing check was
revealed by b1ac052, which removed
inlining of the musttail'ed call and it started leaving the invalid call
at the verification stage. Additionally, `TTI::supportsTailCallFor` did
not respect the concrete TTI's `supportsTailCalls` implementation, so it
always returned true even though `supportsTailCalls` returned false, so
this patch also fixes the wrong CRTP base class implementation.1 parent 8ac7c4f commit 8c5c4d9
File tree
5 files changed
+50
-12
lines changed- llvm
- include/llvm/Analysis
- lib/Transforms/Coroutines
- test/Transforms/Coroutines
5 files changed
+50
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | 370 | | |
375 | 371 | | |
376 | 372 | | |
| |||
1427 | 1423 | | |
1428 | 1424 | | |
1429 | 1425 | | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | 1432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3064 | 3064 | | |
3065 | 3065 | | |
3066 | 3066 | | |
3067 | | - | |
| 3067 | + | |
3068 | 3068 | | |
3069 | 3069 | | |
3070 | 3070 | | |
| |||
3100 | 3100 | | |
3101 | 3101 | | |
3102 | 3102 | | |
3103 | | - | |
| 3103 | + | |
3104 | 3104 | | |
3105 | 3105 | | |
3106 | 3106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
275 | | - | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
| 279 | + | |
278 | 280 | | |
279 | 281 | | |
280 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1746 | 1746 | | |
1747 | 1747 | | |
1748 | 1748 | | |
| 1749 | + | |
1749 | 1750 | | |
1750 | 1751 | | |
1751 | 1752 | | |
| |||
1755 | 1756 | | |
1756 | 1757 | | |
1757 | 1758 | | |
1758 | | - | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
1759 | 1763 | | |
1760 | 1764 | | |
1761 | 1765 | | |
1762 | 1766 | | |
1763 | 1767 | | |
1764 | 1768 | | |
1765 | | - | |
| 1769 | + | |
| 1770 | + | |
1766 | 1771 | | |
1767 | 1772 | | |
1768 | 1773 | | |
| |||
1837 | 1842 | | |
1838 | 1843 | | |
1839 | 1844 | | |
1840 | | - | |
| 1845 | + | |
1841 | 1846 | | |
1842 | 1847 | | |
1843 | 1848 | | |
| |||
2010 | 2015 | | |
2011 | 2016 | | |
2012 | 2017 | | |
2013 | | - | |
| 2018 | + | |
2014 | 2019 | | |
2015 | 2020 | | |
2016 | 2021 | | |
| |||
2023 | 2028 | | |
2024 | 2029 | | |
2025 | 2030 | | |
2026 | | - | |
| 2031 | + | |
2027 | 2032 | | |
2028 | 2033 | | |
2029 | 2034 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments