-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cherry-pick inlining fix from #725 #730
Conversation
As discussed in #561 (comment)
Since the tests seem to pass, I'll just merge this. :) |
Unfortunately, this doesn't seem to help with other inliner bugs I've seen:
It looks like the same bug as in #561: switch (v_y_166.__tag) {
case 0:
return () =>
link_0(v_y_154, v_y_155, l_9, v_y_164, ks_119, (v_r_97, ks_120) =>
() =>
go_1((level_1 << (1)), v_r_97, v_y_165, ks_120, k_88));
default:
switch (v_y_165.__tag) {
case 0:
return () =>
link_0(v_y_154, v_y_155, l_9, v_y_164, ks_119, (v_r_98, ks_121) => { opt IR let cr9991647052 = run {create403246401(level867844944, v_y_1271111410644966)}
cr9991647052 match {
case Tuple3335 { (v_y_126991101021747053: Map8335[A10266, Unit394], v_y_127001111031847054: List910[Tuple2249[A10266, Unit394]], v_y_127011121041947055: List910[Tuple2249[A10266, Unit394]]) =>
v_y_127011121041947055 match {
case Nil1135 { () =>
let v_r_126891039510350733 = run {link8561[A10266, Unit394](v_y_1271411510744967, v_y_1271511610844968, l9890547046, v_y_126991101021747053)}
go857746408(bitwiseShl225(level867844944, 1), v_r_126891039510350733, v_y_127001111031847054)
}
} else {
v_y_127001111031847054 match {
case Nil1135 { () =>
let v_r_126931079914350736 = run {link8561[A10266, Unit394](v_y_1271411510744967, v_y_1271511610844968, l9890547046, v_y_126991101021747053)}
|
I didn't have time to investigate this yet, but could this effekt-plots error (on master?!) be related? https://github.com/effekt-lang/effekt-plots/actions/runs/12247898051/job/34166543555 |
Fascinating. I have something similar in the exact same file reported above (where the inliner fails ^)
|
On the meeting, we found out that Effekt Plots doesn't work because of this change (cc @marvinborner) |
Reverts #730 as it seems like an incorrect fix, judging both by the Effekt Working Group meeting, and the graphs after merging it: ![image](https://github.com/user-attachments/assets/67f28d10-ef57-4529-b47d-4df1d342bd63) ![image](https://github.com/user-attachments/assets/e6de9240-d9fd-4aeb-8f45-79a225307811)
As discussed in #561 (comment), there's a missing rewrite. This fix is necessary for the `map` and `set` examples, as well as some of my AoC solutions using them, so I'd like to upstream it, if possible. Co-authored-by: Marvin <git@marvinborner.de>
Reverts #730 as it seems like an incorrect fix, judging both by the Effekt Working Group meeting, and the graphs after merging it: ![image](https://github.com/user-attachments/assets/67f28d10-ef57-4529-b47d-4df1d342bd63) ![image](https://github.com/user-attachments/assets/e6de9240-d9fd-4aeb-8f45-79a225307811)
As discussed in effekt-lang#561 (comment), there's a missing rewrite. This fix is necessary for the `map` and `set` examples, as well as some of my AoC solutions using them, so I'd like to upstream it, if possible. Co-authored-by: Marvin <git@marvinborner.de>
Reverts effekt-lang#730 as it seems like an incorrect fix, judging both by the Effekt Working Group meeting, and the graphs after merging it: ![image](https://github.com/user-attachments/assets/67f28d10-ef57-4529-b47d-4df1d342bd63) ![image](https://github.com/user-attachments/assets/e6de9240-d9fd-4aeb-8f45-79a225307811)
As discussed in #561 (comment), there's a missing rewrite.
This fix is necessary for the
map
andset
examples, as well as some of my AoC solutions using them, so I'd like to upstream it, if possible.