From 6936671ed1c3a1dd25e0eea635ee2bdc86acd463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sat, 23 Sep 2017 12:22:10 +0100 Subject: [PATCH] cmd/compile: clarify adjustctxt inlining comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reason why adjustctxt wasn't being inlined was reported as: function too complex: cost 92 exceeds budget 80 However, after tweaking the code to be under the budget limit, we see the real blocker: non-leaf function There is little we can do about this one in particular at the moment. Create a section with funcs that will need mid-stack inlining to be inlineable, since this will likely come up again in other cases. Change-Id: I3a8eb1546b289a060ac896506a007b0496946e84 Reviewed-on: https://go-review.googlesource.com/65650 Run-TryBot: Daniel Martí TryBot-Result: Gobot Gobot Reviewed-by: Matthew Dempsky --- src/cmd/compile/internal/gc/inl_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cmd/compile/internal/gc/inl_test.go b/src/cmd/compile/internal/gc/inl_test.go index cbcd96a7b9..a0f466580a 100644 --- a/src/cmd/compile/internal/gc/inl_test.go +++ b/src/cmd/compile/internal/gc/inl_test.go @@ -29,6 +29,10 @@ func TestIntendedInlining(t *testing.T) { // be inlined. want := map[string][]string{ "runtime": { + // TODO(mvdan): enable these once mid-stack + // inlining is available + // "adjustctxt", + "add", "addb", "adjustpanics", @@ -58,8 +62,6 @@ func TestIntendedInlining(t *testing.T) { "(*bmap).keys", "(*bmap).overflow", "(*waitq).enqueue", - - //"adjustctxt", TODO(mvdan): fix and re-enable }, "runtime/internal/sys": {}, "unicode/utf8": {