]> gcc.gnu.org Git - gcc.git/commit
compiler: in composite literals use temps only for interfaces
authorIan Lance Taylor <iant@golang.org>
Tue, 29 Jun 2021 18:00:13 +0000 (11:00 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 29 Jun 2021 18:01:44 +0000 (11:01 -0700)
commit528ed794016472a209d6cfaa921307f30eee58da
tree8173d2af396d82b6141cf035c08b53ba40f1b689
parent2cf8d3fc05737684a16fa080b0c0d24048da782b
compiler: in composite literals use temps only for interfaces

For a composite literal we only need to introduce a temporary variable
if we may be converting to an interface type, so only do it then.
This saves over 80% of compilation time when using gccgo to compile
cmd/internal/obj/x86, as the GCC middle-end spends a lot of time
pointlessly computing interactions between temporary variables.

For PR debug/101064
For golang/go#46600

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/331513
gcc/go/gofrontend/expressions.cc
This page took 0.057869 seconds and 6 git commands to generate.