cmd/compile: add recursive-invalidate Value method, use in expand_calls
This removes more unused values during transformation.
Leaving them in the tree can create type conflicts in OpArg* references.
Updates #40724.
Updates #44816.
Fixes #45417.
Change-Id: I07dcb7b4b2bf8d79e22e0543cb2fb52c2ececb96
Reviewed-on: https://go-review.googlesource.com/c/go/+/308589
Trust: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>