]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don’t consider recursive calls for inlining
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 5 May 2016 18:45:27 +0000 (11:45 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sun, 21 Aug 2016 23:18:50 +0000 (23:18 +0000)
commit376d9665a80e96f0b550c24be7ffedf0b467e40d
tree4c2822e08570161d43e39452b79475ee82092952
parentd1faf3879ede9efc9f1907dfad04bac8ec08d598
cmd/compile: don’t consider recursive calls for inlining

We will never inline recursive calls.
Rather than simulate the recursion until we hit
the complexity ceiling, just bail early.

Also, remove a pointless n.Op check.
visitBottomUp guarantees that n will be an
ODCLFUNC, and caninl double-checks it.

Change-Id: Ifa48331686b24289d34e68cf5bef385f464b6b92
Reviewed-on: https://go-review.googlesource.com/27462
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/main.go