]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.19] cmd/compile: defer transitive inlining until after AST is...
authorMatthew Dempsky <mdempsky@google.com>
Tue, 23 Aug 2022 23:34:26 +0000 (16:34 -0700)
committerMichael Knyszek <mknyszek@google.com>
Mon, 3 Apr 2023 14:38:10 +0000 (14:38 +0000)
commit837b1314fde57c0afad96bbfa050b47ce304c204
treeac6eb14942dc695dbf869b4180dfa45998566605
parent6d9df0a5a62d2509819d3abc688ff8f78a466730
[release-branch.go1.19] cmd/compile: defer transitive inlining until after AST is edited

This CL changes the inliner to process transitive inlining iteratively
after the AST has actually been edited, rather than recursively and
immediately. This is important for handling indirect function calls
correctly, because ir.reassigned walks the function body looking for
reassignments; whereas previously the inlined reassignments might not
have been actually added to the AST yet.

Fixes #59158.

Change-Id: I0dd69813c8a70b965174e0072335bc00afedf286
Reviewed-on: https://go-review.googlesource.com/c/go/+/425257
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-by: David Chase <drchase@google.com>
(cherry picked from commit f983a9340d5660a9655b63a371966b5df69be8c5)
Reviewed-on: https://go-review.googlesource.com/c/go/+/479629
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/cmd/compile/internal/inline/inl.go
test/fixedbugs/issue54632.go [new file with mode: 0644]