Skip to content
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

cmd/compile: Value live at entry [1.18 backport] #54918

Closed
cuonglm opened this issue Sep 7, 2022 · 3 comments
Closed

cmd/compile: Value live at entry [1.18 backport] #54918

cuonglm opened this issue Sep 7, 2022 · 3 comments
Assignees
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@cuonglm
Copy link
Member

cuonglm commented Sep 7, 2022

@cuonglm requested issue #54911 to be considered for backport to the next 1.18 minor release.

@gopherbot please backport this to go1.18

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 7, 2022
@gopherbot gopherbot added this to the Go1.18.7 milestone Sep 7, 2022
@cuonglm cuonglm added the CherryPickCandidate Used during the release process for point releases label Sep 7, 2022
@mdempsky
Copy link
Member

mdempsky commented Sep 7, 2022

See also my thoughts on backporting at #54911 (comment).

@mknyszek mknyszek added the CherryPickApproved Used during the release process for point releases label Sep 7, 2022
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Sep 7, 2022
@gopherbot
Copy link

gopherbot commented Sep 9, 2022

Change https://go.dev/cl/429897 mentions this issue: [release-branch.go1.18] cmd/compile/internal/inline: fix latent CalleeEffects issue

gopherbot pushed a commit that referenced this issue Sep 19, 2022
…eEffects issue

ir.ClosureExpr implements ir.InitNode, so ir.InitExpr can prepend init
statements to it. However, CalleeEffects wasn't aware of this and
could cause the init statements to get dropped when inlining a call to
a closure.

This isn't an issue today, because we don't create closures with init
statements. But I ran into this within unified IR.

Easy and robust solution: just take advantage that ir.TakeInit can
handle any node.

Fixes #54918.

Change-Id: Ica05fbf6a8c5be4b11927daf84491a1140da5431
Reviewed-on: https://go-review.googlesource.com/c/go/+/422196
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/429897
Reviewed-by: Michael Knyszek <mknyszek@google.com>
@gopherbot
Copy link

gopherbot commented Sep 19, 2022

Closed by merging d5a5db3 to release-branch.go1.18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
Status: Done
Development

No branches or pull requests

4 participants