[dev.regabi] cmd/compile: refactor type initialization code into helper
Create a helper routine for initializing the types package, so as make
it easier to use in unit testing (in a follow-on patch).
Change-Id: I0f937788dfd34ac6641a4f28c16e47008aa08116
Reviewed-on: https://go-review.googlesource.com/c/go/+/273010
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Than McIntosh <thanm@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>