compiler: only check whether struct or array types are big

Fetching the size of a type typically involves a hash table lookup,
and is generally non-trivial.  The escape analysis code calls is_big
more than one might expect.  So only fetch the size if we need it.

Change-Id: I44f28030f75c3e993020932631eea46fc6158b30
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/197699
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
1 file changed