]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: reduce inline cost of OCONVOP
authorEgon Elbre <egonelbre@gmail.com>
Sat, 2 Jan 2021 14:28:11 +0000 (16:28 +0200)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 24 Feb 2021 17:00:14 +0000 (17:00 +0000)
commitadb467ffd2d82b796de12bdd8effa2cfefe01f29
tree5aedd704525f3103c568813e9fd9a6078680efce
parent27684ea195641ead8a8f08cb345925da889a12ed
cmd/compile: reduce inline cost of OCONVOP

OCONVOP doesn't have effect in the compiled code so, it can be safely
excluded from inline cost calculation.

Also make sequence ODEREF OCONVNOP* OADDR cost 1. This is rather common
conversion, such as *(*uint32)(unsafe.Pointer(&x)).

Fixes #42788

Change-Id: I5001f7e89d985c198b6405694cdd5b819cf3f47a
Reviewed-on: https://go-review.googlesource.com/c/go/+/281232
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Elias Naur <mail@eliasnaur.com>
src/cmd/compile/internal/inline/inl.go
test/inline.go