bors
d2d24e395a
Auto merge of #123602 - cjgillot:gvn-borrowed, r=oli-obk
...
Account for immutably borrowed locals in MIR copy-prop and GVN
For the most part, we consider that immutably borrowed `Freeze` locals still fulfill SSA conditions. As the borrow is immutable, any use of the local will have the value given by the single assignment, and there can be no surprise.
This allows copy-prop to merge a non-borrowed local with a borrowed local. We chose to keep copy-classes heads unborrowed, as those may be easier to optimize in later passes.
This also allows to GVN the value behind an immutable borrow. If a SSA local is borrowed, dereferencing that borrow is equivalent to copying the local's value: re-executing the assignment between the borrow and the dereference would be UB.
r? `@ghost` for perf
2024-05-03 21:50:13 +00:00
..
2024-04-24 13:12:33 +01:00
2024-04-28 21:10:09 +01:00
2024-05-03 21:50:13 +00:00
2024-04-22 21:55:33 +10:00
2024-04-28 21:10:09 +01:00
2024-04-20 13:19:34 +02:00
2024-04-20 13:19:34 +02:00
2024-04-24 08:05:29 +00:00
2024-04-22 20:26:00 +02:00
2024-04-18 09:35:35 -07:00
2024-02-22 16:04:04 +00:00
2024-05-03 21:50:13 +00:00
2024-04-20 13:19:34 +02:00
2024-04-03 08:50:12 +00:00
2024-04-08 15:08:06 +00:00
2023-10-19 15:51:52 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-20 13:19:34 +02:00
2024-04-03 08:50:12 +00:00
2024-03-18 10:07:43 -04:00
2024-03-19 16:59:24 -04:00
2024-03-19 16:59:24 -04:00
2024-03-19 16:59:24 -04:00
2024-03-19 16:59:24 -04:00
2024-03-26 12:10:51 -04:00
2024-03-26 12:10:51 -04:00
2024-03-19 16:59:24 -04:00
2023-08-24 14:26:26 +02:00
2024-04-08 15:08:06 +00:00
2024-04-20 13:19:34 +02:00
2024-04-03 08:50:12 +00:00
2024-04-20 13:19:34 +02:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-01-07 13:54:05 +00:00
2024-01-07 13:54:05 +00:00
2024-04-20 13:19:34 +02:00
2024-01-07 13:54:05 +00:00
2024-01-07 13:54:05 +00:00
2024-04-20 13:19:34 +02:00
2024-01-07 13:54:05 +00:00
2024-01-07 13:54:05 +00:00
2024-04-20 13:19:34 +02:00
2023-12-24 20:08:57 +00:00
2024-04-20 13:19:34 +02:00
2024-02-09 21:13:53 +00:00
2024-02-22 16:04:04 +00:00
2024-03-17 19:59:15 +01:00
2024-03-10 14:59:41 +01:00
2024-03-17 19:59:15 +01:00
2024-04-03 08:50:12 +00:00
2024-03-17 19:59:15 +01:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-02-12 17:37:05 +01:00
2024-02-12 17:37:05 +01:00
2024-04-20 13:19:34 +02:00
2024-03-10 14:59:41 +01:00
2024-03-10 14:59:41 +01:00
2024-04-20 13:19:34 +02:00
2023-08-24 14:26:26 +02:00
2023-08-24 14:26:26 +02:00
2024-04-20 13:19:34 +02:00
2023-10-24 15:30:17 +00:00
2023-10-24 15:30:17 +00:00
2024-04-20 13:19:34 +02:00
2024-04-20 13:19:34 +02:00
2024-04-20 13:19:34 +02:00
2023-09-19 05:42:23 +00:00
2024-04-20 13:19:34 +02:00
2024-04-07 21:14:26 +08:00
2024-04-08 19:20:07 +08:00
2024-04-20 13:19:34 +02:00
2024-04-20 13:19:34 +02:00
2024-04-07 21:14:26 +08:00
2024-03-13 06:41:21 +01:00
2024-04-20 13:19:34 +02:00
2024-04-07 21:14:26 +08:00
2024-04-07 21:14:26 +08:00
2024-04-20 13:19:34 +02:00
2024-04-07 21:14:26 +08:00
2024-04-07 21:14:26 +08:00
2024-04-08 19:20:07 +08:00
2024-04-08 19:20:07 +08:00
2024-04-20 13:19:34 +02:00
2023-10-16 16:29:35 +00:00
2023-10-16 16:29:35 +00:00
2024-04-20 13:19:34 +02:00
2023-10-16 16:29:35 +00:00
2023-10-16 16:29:35 +00:00
2024-02-22 16:04:04 +00:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-03-22 20:14:39 -04:00
2024-02-22 16:04:04 +00:00
2024-02-05 23:31:54 +00:00
2024-04-20 13:19:34 +02:00
2024-04-20 19:22:13 +00:00
2024-04-20 19:22:13 +00:00
2024-04-20 13:19:34 +02:00
2024-01-16 22:20:53 +00:00
2024-01-16 22:20:53 +00:00
2023-10-25 06:46:45 +00:00
2023-10-25 06:46:45 +00:00
2024-03-10 14:59:41 +01:00
2024-03-10 14:59:41 +01:00
2024-04-20 19:25:20 +00:00
2024-04-20 19:25:20 +00:00
2023-10-25 06:46:47 +00:00
2023-10-25 06:46:47 +00:00
2024-01-16 22:20:53 +00:00
2024-01-16 22:20:53 +00:00
2024-03-10 14:59:41 +01:00
2024-03-10 14:59:41 +01:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2023-10-25 06:46:48 +00:00
2023-10-25 06:46:48 +00:00
2024-04-20 19:25:20 +00:00
2024-04-20 19:25:20 +00:00
2023-10-25 17:59:30 +00:00
2023-10-25 17:59:30 +00:00
2023-10-25 06:46:45 +00:00
2023-10-25 06:46:45 +00:00
2024-04-20 19:10:23 +00:00
2024-04-20 19:10:23 +00:00
2023-10-25 06:46:47 +00:00
2023-10-25 06:46:47 +00:00
2023-10-25 06:46:48 +00:00
2023-10-25 06:46:48 +00:00
2024-01-16 22:20:54 +00:00
2024-01-16 22:20:54 +00:00
2024-05-03 21:50:13 +00:00
2024-04-20 19:22:13 +00:00
2024-04-20 19:22:13 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-01-16 22:20:54 +00:00
2024-01-16 22:20:54 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-03-10 14:59:41 +01:00
2024-03-10 14:59:41 +01:00
2024-03-10 14:59:41 +01:00
2024-03-10 14:59:41 +01:00
2024-02-12 17:37:05 +01:00
2024-02-12 17:37:05 +01:00
2023-08-30 17:24:10 +08:00
2023-08-30 17:24:10 +08:00
2023-08-30 17:24:10 +08:00
2023-08-30 17:24:10 +08:00
2023-08-30 17:24:10 +08:00
2023-08-30 17:24:10 +08:00
2024-04-20 13:19:34 +02:00
2024-04-20 13:19:34 +02:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-04-20 13:19:34 +02:00
2023-10-19 15:51:52 +00:00
2023-08-24 14:26:26 +02:00
2023-08-24 14:26:26 +02:00
2023-10-19 15:51:52 +00:00
2023-08-24 14:26:26 +02:00
2023-08-24 14:26:26 +02:00
2023-10-19 15:51:52 +00:00
2023-10-19 15:51:52 +00:00
2023-10-24 15:30:17 +00:00
2023-10-24 15:30:17 +00:00
2023-10-19 15:51:52 +00:00
2023-10-19 15:51:52 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-02-12 17:37:05 +01:00
2024-04-08 15:08:06 +00:00
2024-02-22 16:04:04 +00:00
2024-02-17 20:21:57 +01:00
2024-04-03 08:50:12 +00:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2023-10-25 06:46:45 +00:00
2023-10-25 06:46:45 +00:00
2024-02-22 16:04:04 +00:00
2024-02-17 20:21:57 +01:00
2023-08-24 14:26:26 +02:00
2024-02-17 20:21:57 +01:00
2024-02-22 16:04:04 +00:00
2024-04-08 15:08:06 +00:00
2024-04-08 15:08:06 +00:00
2023-10-19 15:51:52 +00:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-04-20 13:19:34 +02:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2023-10-19 15:51:52 +00:00
2024-02-13 17:21:53 +00:00
2024-03-10 14:59:41 +01:00
2024-03-10 14:59:41 +01:00
2024-01-23 00:00:22 +00:00
2024-01-23 00:00:22 +00:00
2023-10-21 06:58:38 +00:00
2023-10-21 06:58:38 +00:00
2024-02-12 17:37:05 +01:00
2024-02-12 17:37:05 +01:00
2023-10-21 07:08:53 +00:00
2023-10-21 07:08:53 +00:00
2023-10-21 06:58:38 +00:00
2023-10-21 06:58:38 +00:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2023-10-21 06:58:38 +00:00
2023-10-21 06:58:38 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2023-10-21 06:58:38 +00:00
2023-10-21 06:58:38 +00:00
2023-10-21 07:01:24 +00:00
2023-10-21 07:01:24 +00:00
2024-04-20 13:19:34 +02:00
2024-02-12 17:37:05 +01:00
2024-02-12 17:37:05 +01:00
2024-02-22 16:04:04 +00:00
2023-08-30 17:24:10 +08:00
2023-08-30 17:24:10 +08:00
2023-08-30 17:24:10 +08:00
2023-08-30 17:24:10 +08:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-20 13:19:34 +02:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-03-10 14:59:41 +01:00
2024-03-10 14:59:41 +01:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-21 11:08:37 -07:00
2024-04-21 11:08:37 -07:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-21 11:08:37 -07:00
2024-03-23 23:23:41 -07:00
2024-03-23 23:23:41 -07:00
2024-03-23 23:23:41 -07:00
2024-03-23 23:23:41 -07:00
2024-03-23 23:23:41 -07:00
2024-03-23 23:23:41 -07:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2023-10-24 15:30:17 +00:00
2023-10-24 15:30:17 +00:00
2023-10-24 15:30:17 +00:00
2023-10-24 15:30:17 +00:00
2023-10-24 15:30:17 +00:00
2023-10-24 15:30:17 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-03-30 03:32:11 -07:00
2024-03-30 03:32:11 -07:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2023-08-30 17:24:10 +08:00
2023-08-30 17:24:10 +08:00
2024-04-20 13:19:34 +02:00
2024-04-20 16:01:35 +02:00
2024-04-20 16:01:35 +02:00
2023-10-19 15:51:52 +00:00
2024-04-08 18:54:33 +08:00
2024-04-20 05:37:53 +08:00
2024-04-20 05:37:53 +08:00
2024-04-20 05:37:53 +08:00
2023-08-30 17:24:10 +08:00
2024-04-08 18:54:33 +08:00
2024-04-08 18:54:33 +08:00
2024-04-08 18:54:33 +08:00
2024-04-20 05:37:53 +08:00
2024-04-08 18:54:33 +08:00
2024-04-20 05:37:53 +08:00
2024-04-20 13:19:34 +02:00
2024-04-20 05:37:53 +08:00
2024-04-20 05:37:53 +08:00
2024-04-20 13:19:34 +02:00
2024-02-22 16:04:04 +00:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2023-08-24 14:26:26 +02:00
2023-08-24 14:26:26 +02:00
2023-10-19 15:51:52 +00:00
2024-04-20 13:19:34 +02:00
2024-04-20 13:19:34 +02:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-04-20 13:19:34 +02:00
2024-03-10 14:59:41 +01:00
2024-04-03 08:50:12 +00:00
2024-04-20 19:19:06 +00:00
2024-04-03 08:50:12 +00:00
2023-08-17 17:02:04 +00:00
2024-04-20 19:19:06 +00:00
2024-05-03 21:50:13 +00:00
2024-04-03 08:50:12 +00:00
2024-04-20 16:01:35 +02:00
2024-04-20 16:01:35 +02:00
2023-10-19 15:51:52 +00:00
2024-01-06 14:17:33 -05:00
2024-02-12 17:37:05 +01:00
2024-02-12 17:37:05 +01:00
2024-04-20 13:19:34 +02:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2024-04-18 09:35:35 -07:00
2023-10-19 15:51:52 +00:00
2023-10-19 15:51:52 +00:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-03-18 10:32:25 +01:00
2024-03-18 10:32:25 +01:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-04-20 13:19:34 +02:00
2023-10-19 15:51:52 +00:00
2024-04-18 09:35:35 -07:00
2024-02-22 16:04:04 +00:00
2024-03-08 08:15:14 +08:00
2024-01-07 00:28:20 +00:00
2024-01-07 00:28:20 +00:00
2024-04-20 13:19:34 +02:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2024-03-17 19:59:15 +01:00
2024-03-17 19:59:15 +01:00
2024-03-13 22:35:11 +08:00
2024-04-20 13:19:34 +02:00
2024-01-07 01:42:57 +00:00
2024-01-07 01:42:57 +00:00
2024-01-28 13:50:20 -06:00
2024-03-07 22:58:51 +08:00
2024-03-07 22:58:51 +08:00
2024-02-22 16:04:04 +00:00
2024-04-20 13:19:34 +02:00
2024-02-12 17:37:05 +01:00
2024-04-20 13:19:34 +02:00
2024-04-03 16:00:38 +02:00
2024-04-20 13:19:34 +02:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2024-01-11 09:58:19 +00:00
2024-01-11 09:58:19 +00:00
2023-12-24 20:08:57 +00:00
2024-02-22 16:04:04 +00:00
2023-08-24 14:26:26 +02:00
2024-02-22 16:04:04 +00:00
2023-10-19 15:51:52 +00:00
2023-10-19 15:51:52 +00:00
2023-10-19 15:51:52 +00:00
2023-10-19 15:51:52 +00:00
2024-04-03 08:50:12 +00:00
2024-02-22 16:04:04 +00:00
2024-04-03 08:50:12 +00:00
2024-04-03 08:50:12 +00:00
2023-10-19 15:51:52 +00:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2023-10-31 11:44:23 +00:00
2023-10-31 11:44:23 +00:00
2024-04-20 13:19:34 +02:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-04-20 13:19:34 +02:00
2024-03-09 14:32:27 +08:00
2024-03-09 14:32:27 +08:00
2024-02-12 17:37:05 +01:00
2024-02-12 17:37:05 +01:00
2023-10-31 11:44:23 +00:00
2023-10-31 11:44:23 +00:00
2024-04-20 13:19:34 +02:00
2023-10-19 15:51:52 +00:00
2023-08-24 14:26:26 +02:00
2024-02-22 16:04:04 +00:00