compiler: don't export bodies for functions marked "go:noinline"

The current Mark_inline_candidates helper looks only at budget when
deciding to mark a function or method as inline (with the proviso that
IR constructs not yet supported by the inliner are given artificially
high cost). This patch changes the helper to also look at whether a
function has the "go:noinline" pragma; if it does have the pragma
there is no point putting it into the export data (it will just make
the export data bigger).

Change-Id: I67dbb02a66fcd71635eaf769ed051b106fb1a3f6
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186923
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
1 file changed