Matthew Dempsky
d5a5db3b41
[release-branch.go1.18] cmd/compile/internal/inline: fix latent CalleeEffects issue
...
ir.ClosureExpr implements ir.InitNode, so ir.InitExpr can prepend init
statements to it. However, CalleeEffects wasn't aware of this and
could cause the init statements to get dropped when inlining a call to
a closure.
This isn't an issue today, because we don't create closures with init
statements. But I ran into this within unified IR.
Easy and robust solution: just take advantage that ir.TakeInit can
handle any node.
Fixes #54918 .
Change-Id: Ica05fbf6a8c5be4b11927daf84491a1140da5431
Reviewed-on: https://go-review.googlesource.com/c/go/+/422196
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/429897
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2022-09-19 21:52:38 +00:00
..
2022-03-10 23:59:19 +00:00
2021-10-28 00:11:24 +00:00
2021-08-31 16:43:46 +00:00
2021-07-28 21:40:40 +00:00
2021-08-04 17:56:00 +00:00
2021-07-28 21:40:40 +00:00
2022-01-10 19:51:05 +00:00
2021-10-15 16:57:36 +00:00
2021-11-10 00:56:09 +00:00
2021-08-26 20:18:58 +00:00
2021-08-23 19:27:46 +00:00
2021-08-29 14:10:21 +00:00
2021-08-29 14:10:21 +00:00
2021-08-31 17:21:38 +00:00
2021-09-09 04:37:47 +00:00
2021-09-07 17:38:14 +00:00
2021-09-07 20:37:05 +00:00
2021-11-10 00:56:09 +00:00
2021-11-10 00:56:09 +00:00
2021-09-17 19:50:04 +00:00
2021-09-14 23:07:15 +00:00
2021-09-24 18:21:14 +00:00
2021-09-20 00:13:47 +00:00
2021-10-12 20:09:58 +00:00
2022-01-24 21:27:28 +00:00
2021-10-19 22:47:48 +00:00
2021-11-02 18:31:53 +00:00
2021-11-02 03:09:01 +00:00
2021-11-10 21:53:03 +00:00
2021-11-11 20:34:56 +00:00
2021-11-19 00:05:59 +00:00
2021-11-20 01:00:16 +00:00
2021-12-02 07:04:05 +00:00
2022-02-03 03:13:33 +00:00
2022-02-03 03:13:33 +00:00
2022-01-07 17:55:52 +00:00
2022-01-21 00:39:55 +00:00
2022-01-21 00:39:55 +00:00
2022-01-11 22:50:23 +00:00
2022-01-11 21:56:11 +00:00
2022-01-11 21:51:51 +00:00
2022-01-13 22:58:24 +00:00
2022-01-14 16:41:18 +00:00
2022-01-27 05:30:27 +00:00
2022-02-28 14:59:04 +00:00
2022-02-28 14:59:04 +00:00
2022-03-04 20:56:13 +00:00
2022-02-28 15:58:07 +00:00
2022-03-14 17:19:04 +00:00
2022-04-04 19:57:18 +00:00
2022-05-09 20:13:36 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-05-24 22:17:33 +00:00
2022-04-04 18:05:18 +00:00
2021-11-15 21:22:19 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-10-05 20:53:02 +00:00
2021-12-03 22:57:02 +00:00
2021-05-26 21:39:54 +00:00
2021-08-30 01:55:58 +00:00
2021-05-21 03:41:18 +00:00
2021-12-16 00:34:10 +00:00
2021-07-28 21:40:40 +00:00
2022-03-10 23:59:19 +00:00
2022-02-01 01:07:25 +00:00
2021-10-28 00:11:24 +00:00
2022-01-25 00:39:08 +00:00
2021-06-04 16:43:27 +00:00
2021-06-03 16:05:22 +00:00
2021-05-26 21:38:54 +00:00
2021-09-02 01:06:17 +00:00
2021-10-28 00:11:24 +00:00
2021-11-15 21:21:51 +00:00
2021-07-28 21:40:40 +00:00
2021-05-21 23:13:46 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-08-04 17:56:00 +00:00
2021-08-04 17:56:00 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-07-29 17:15:21 +00:00
2021-07-29 17:15:21 +00:00
2021-09-02 01:06:17 +00:00
2021-08-27 16:41:29 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-05-21 17:03:30 +00:00
2022-01-10 19:51:05 +00:00
2022-01-10 19:51:05 +00:00
2021-10-16 16:27:40 +00:00
2021-10-12 20:53:52 +00:00
2021-10-15 16:57:36 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2020-11-11 01:11:43 +00:00
2021-11-03 15:47:47 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2022-01-07 18:40:16 +00:00
2021-07-28 21:40:40 +00:00
2021-09-27 20:42:34 +00:00
2021-07-28 21:41:07 +00:00
2021-04-27 16:55:20 +00:00
2021-04-27 19:30:11 +00:00
2021-07-28 21:40:40 +00:00
2021-11-10 00:56:09 +00:00
2021-09-09 19:37:25 +00:00
2021-07-28 21:40:40 +00:00
2021-08-20 21:00:08 +00:00
2021-07-28 21:40:40 +00:00
2021-08-17 13:23:13 +00:00
2021-08-17 13:23:13 +00:00
2021-08-06 18:50:46 +00:00
2021-08-09 19:43:09 +00:00
2021-08-26 20:18:58 +00:00
2021-11-15 21:21:51 +00:00
2021-08-31 19:07:50 +00:00
2021-08-16 16:55:27 +00:00
2021-08-16 16:55:27 +00:00
2021-08-16 16:55:27 +00:00
2021-10-28 00:11:24 +00:00
2021-08-27 01:42:38 +00:00
2021-08-24 18:30:13 +00:00
2021-08-24 18:30:13 +00:00
2021-08-23 22:55:34 +00:00
2021-08-23 17:51:41 +00:00
2021-10-28 00:11:24 +00:00
2021-10-28 00:11:24 +00:00
2021-08-18 22:34:31 +00:00
2021-08-23 19:27:46 +00:00
2021-08-23 19:27:46 +00:00
2021-09-09 03:31:51 +00:00
2021-08-24 18:30:13 +00:00
2021-10-26 20:08:41 +00:00
2021-08-29 14:10:21 +00:00
2021-08-29 14:10:21 +00:00
2021-08-24 00:01:29 +00:00
2021-08-25 15:30:19 +00:00
2021-08-24 18:31:34 +00:00
2021-08-27 16:41:29 +00:00
2021-08-27 16:41:29 +00:00
2021-08-27 16:41:29 +00:00
2021-08-27 16:41:29 +00:00
2021-08-25 15:30:19 +00:00
2021-08-25 19:06:16 +00:00
2021-08-28 16:00:51 +00:00
2021-09-01 02:51:18 +00:00
2021-08-31 19:07:50 +00:00
2021-08-30 21:22:35 +00:00
2021-09-06 14:02:24 +00:00
2021-09-27 20:42:34 +00:00
2021-09-07 23:27:08 +00:00
2021-08-30 17:13:00 +00:00
2021-08-31 17:21:38 +00:00
2021-09-09 09:06:46 +00:00
2021-09-17 23:04:15 +00:00
2021-09-07 17:38:14 +00:00
2021-09-07 20:37:05 +00:00
2021-09-07 22:23:36 +00:00
2021-09-07 03:56:13 +00:00
2021-09-09 21:28:56 +00:00
2021-09-09 03:31:51 +00:00
2022-01-31 20:35:07 +00:00
2022-01-31 20:35:07 +00:00
2021-09-09 15:34:08 +00:00
2021-09-14 02:52:21 +00:00
2021-09-14 02:53:17 +00:00
2021-09-13 21:48:41 +00:00
2021-09-21 17:25:35 +00:00
2021-09-17 19:50:04 +00:00
2021-09-17 19:50:04 +00:00
2021-09-14 23:07:15 +00:00
2021-09-20 16:26:11 +00:00
2022-03-04 20:43:23 +00:00
2021-09-20 17:44:56 +00:00
2021-09-24 18:21:14 +00:00
2021-09-20 00:13:47 +00:00
2021-10-08 17:25:33 +00:00
2021-10-29 23:25:18 +00:00
2021-09-25 17:06:17 +00:00
2021-09-25 01:24:46 +00:00
2021-09-27 05:10:56 +00:00
2021-10-27 22:17:35 +00:00
2021-09-25 17:12:41 +00:00
2021-09-29 16:09:04 +00:00
2021-09-29 16:09:04 +00:00
2021-09-29 16:09:04 +00:00
2021-11-08 21:52:47 +00:00
2021-10-12 20:09:58 +00:00
2021-10-07 16:38:24 +00:00
2022-01-24 21:27:28 +00:00
2021-10-18 19:46:27 +00:00
2021-10-25 20:39:17 +00:00
2021-11-02 18:31:53 +00:00
2021-11-02 03:09:01 +00:00
2021-11-03 17:56:16 +00:00
2021-11-04 15:43:59 +00:00
2021-11-09 00:08:42 +00:00
2021-11-09 00:08:09 +00:00
2021-11-10 21:53:03 +00:00
2021-11-11 17:18:13 +00:00
2021-11-11 20:34:56 +00:00
2021-11-12 18:57:22 +00:00
2021-11-14 17:38:42 +00:00
2021-11-16 15:38:59 +00:00
2021-11-19 00:05:59 +00:00
2021-11-19 00:05:59 +00:00
2021-11-20 01:00:16 +00:00
2021-12-01 10:19:34 +00:00
2021-12-02 07:04:05 +00:00
2021-12-07 21:54:30 +00:00
2021-12-13 06:35:06 +00:00
2021-12-13 06:35:06 +00:00
2021-12-15 23:51:57 +00:00
2021-12-13 22:45:26 +00:00
2022-01-10 17:02:46 +00:00
2021-12-14 01:18:43 +00:00
2022-01-04 22:05:15 +00:00
2022-02-03 03:13:33 +00:00
2021-12-16 00:33:58 +00:00
2022-01-24 21:27:33 +00:00
2022-01-04 22:27:20 +00:00
2022-01-07 02:32:03 +00:00
2022-03-10 23:59:19 +00:00
2022-03-10 23:59:19 +00:00
2022-01-21 00:39:55 +00:00
2022-01-07 17:55:52 +00:00
2022-01-21 00:39:55 +00:00
2022-01-21 00:39:55 +00:00
2022-01-21 00:39:55 +00:00
2022-01-11 22:50:23 +00:00
2022-01-11 21:56:11 +00:00
2022-01-11 21:51:51 +00:00
2022-01-13 22:58:24 +00:00
2022-01-14 16:41:18 +00:00
2022-01-19 21:14:18 +00:00
2022-03-10 23:59:19 +00:00
2022-01-24 17:07:30 +00:00
2022-03-10 23:59:19 +00:00
2022-01-24 17:07:30 +00:00
2022-03-10 23:59:19 +00:00
2022-01-24 17:07:30 +00:00
2022-01-27 19:55:38 +00:00
2022-01-27 05:30:27 +00:00
2022-02-03 23:55:05 +00:00
2022-02-18 16:56:42 +00:00
2022-02-28 14:59:04 +00:00
2022-02-28 14:59:04 +00:00
2022-03-08 00:42:40 +00:00
2022-03-08 00:42:40 +00:00
2022-02-24 17:35:40 +00:00
2022-02-28 15:50:51 +00:00
2022-03-04 20:56:13 +00:00
2022-02-28 19:38:22 +00:00
2022-02-28 19:38:22 +00:00
2022-02-26 01:16:03 +00:00
2022-02-28 15:58:07 +00:00
2022-03-14 17:19:04 +00:00
2022-03-14 16:20:02 +00:00
2022-03-14 16:21:37 +00:00
2022-05-09 20:25:20 +00:00
2022-04-04 19:03:49 +00:00
2022-04-04 20:26:50 +00:00
2022-04-04 19:57:18 +00:00
2022-05-09 20:11:53 +00:00
2022-05-09 20:13:36 +00:00
2022-05-09 20:25:20 +00:00
2022-05-25 19:31:01 +00:00
2022-07-07 17:30:11 +00:00
2022-07-06 19:33:49 +00:00
2022-09-19 21:52:38 +00:00
2022-01-07 22:40:23 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-05-24 22:16:09 +00:00
2021-05-21 04:03:26 +00:00
2021-07-28 21:40:40 +00:00
2021-02-11 21:46:39 +00:00
2021-05-21 17:14:19 +00:00
2021-03-15 20:28:34 +00:00
2021-05-24 22:17:33 +00:00
2021-03-15 20:29:11 +00:00
2021-06-03 16:05:22 +00:00
2021-05-26 15:33:02 +00:00
2021-05-21 03:41:18 +00:00
2021-06-07 19:34:39 +00:00
2021-07-07 11:12:13 +00:00
2021-11-14 17:38:42 +00:00
2021-07-28 21:40:40 +00:00
2021-07-28 21:40:40 +00:00
2021-06-04 16:43:27 +00:00
2021-07-28 21:40:40 +00:00
2021-05-21 03:41:18 +00:00
2021-04-15 00:29:05 +00:00
2021-10-05 20:53:02 +00:00
2021-10-05 20:53:02 +00:00
2021-12-03 22:57:02 +00:00
2021-07-28 21:40:40 +00:00
2021-05-26 21:39:54 +00:00
2022-03-04 20:43:23 +00:00
2021-07-31 17:03:07 +00:00
2021-07-31 17:03:07 +00:00
2021-05-21 23:25:07 +00:00
2021-08-17 13:54:10 +00:00
2021-07-28 21:40:40 +00:00
2021-08-21 00:24:02 +00:00
2021-07-28 21:40:40 +00:00
2021-02-11 21:46:39 +00:00
2021-05-21 03:41:18 +00:00
2021-07-28 21:40:40 +00:00
2021-12-16 00:34:10 +00:00
2021-08-28 16:00:51 +00:00
2021-07-28 21:40:40 +00:00
2021-10-01 17:18:34 +00:00
2022-03-04 20:43:23 +00:00
2021-12-08 17:55:13 +00:00
2021-12-08 17:55:13 +00:00
2021-12-08 17:55:13 +00:00
2021-12-08 17:55:13 +00:00
2021-12-08 17:55:13 +00:00
2021-12-08 17:55:13 +00:00
2021-12-08 17:55:13 +00:00
2021-12-08 17:55:13 +00:00
2021-08-09 18:41:45 +00:00
2021-08-09 18:41:45 +00:00
2021-08-10 01:56:50 +00:00
2021-08-10 01:56:50 +00:00
2021-08-10 01:56:50 +00:00
2021-08-10 01:56:50 +00:00
2021-05-21 03:41:18 +00:00
2021-06-04 16:43:27 +00:00