[dev.typeparams] cmd/compile: simplify targ's type
Make the base type of targ a *types.Type instead of an ir.Node
containing a type.
Also move makeInstName to typecheck, so it can later be used by
reflectdata for making wrappers.
Change-Id: If148beaa972e5112ead2771d6e32d73f16ca30c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/321209
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dan Scales <danscales@google.com>