]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/inline: fix buglet in panic path scoring
authorThan McIntosh <thanm@google.com>
Tue, 14 Nov 2023 15:34:59 +0000 (10:34 -0500)
committerThan McIntosh <thanm@google.com>
Wed, 15 Nov 2023 14:23:20 +0000 (14:23 +0000)
commitd3d517375987dc1a9747bef0f3bb3c76aab6827e
tree0fb206761210f146e2b6eca011b9c5251d1afd63
parent12051f7d95ef6e97d1be0cab8a3583ad38ec1dcd
cmd/compile/internal/inline: fix buglet in panic path scoring

Fix a bug in scoring of calls appearing on panic paths. For this code
snippet:

  if x < 101 {
     foo()
     panic("bad")
  }

the function flags analyzer was correctly capturing the status of the
block corresponding to the true arm of the "if" statement, but wasn't
marking "foo()" as being on a panic path.

Change-Id: Iee13782828a1399028e2b560fed5f946850eb253
Reviewed-on: https://go-review.googlesource.com/c/go/+/542216
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
src/cmd/compile/internal/inline/inlheur/testdata/props/calls.go