]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/inline: minor compile time improvements in func flags
authorThan McIntosh <thanm@google.com>
Fri, 3 Nov 2023 18:04:57 +0000 (14:04 -0400)
committerThan McIntosh <thanm@google.com>
Tue, 21 Nov 2023 17:28:17 +0000 (17:28 +0000)
commit5239c913510633ce9fdfaf993ab5f31d7ba7e83e
tree48e6d1cdd80e087e0c55da7b6bf25ac7ee210c20
parent3255fca99395bb0c0dff491f92cc85c0a859dd25
cmd/compile/internal/inline: minor compile time improvements in func flags

Some small changes to help reduce compile time for function flags
computation. The current implementation of panic path detection adds
an entry to a map for every node in the function, which is wasteful
(and shows up in cpu profiles). Switch to only adding entries where
they are useful. This is especially important for functions with large
map literals and other constructs with many non-statement nodes.

Change-Id: I9cfb2cd1cbf480f21298e6102aa99e2d77219f3d
Reviewed-on: https://go-review.googlesource.com/c/go/+/539696
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/inline/inlheur/analyze_func_flags.go