]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: flatten OINLCALL in walk
authorMatthew Dempsky <mdempsky@google.com>
Sat, 3 Jul 2021 11:53:25 +0000 (04:53 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Sat, 3 Jul 2021 17:45:52 +0000 (17:45 +0000)
commitc45d0eaadb77f11061cf9b18f521eb0b27e6bedb
treeb910e6da7e316f7f2408460a5fb2cbb99ac093f3
parentad2ba3ff518b9762e3f5497f0a8ce67c0e155aa8
[dev.typeparams] cmd/compile: flatten OINLCALL in walk

Inlining replaces inlined calls with OINLCALL nodes, and then somewhat
clumsily tries to rewrite these in place without messing up
order-of-evaluation rules.

But handling these rules cleanly is much easier to do during order,
and escape analysis is the only major pass between inlining and
order. It's simpler to teach escape analysis how to analyze OINLCALL
nodes than to try to hide them from escape analysis.

Does not pass toolstash -cmp, but seems to just be line number
changes.

Change-Id: I1986cea39793e3e1ed5e887ba29d46364c6c532e
Reviewed-on: https://go-review.googlesource.com/c/go/+/332649
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/escape/call.go
src/cmd/compile/internal/escape/expr.go
src/cmd/compile/internal/escape/stmt.go
src/cmd/compile/internal/inline/inl.go
src/cmd/compile/internal/ir/expr.go
src/cmd/compile/internal/ir/fmt.go
src/cmd/compile/internal/logopt/logopt_test.go
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/typecheck/dcl.go
src/cmd/compile/internal/walk/order.go