Nikita Popov
b9808e5660
[LoopUnroll] Fold add chains during unrolling
...
Loop unrolling tends to produce chains of
`%x1 = add %x0, 1; %x2 = add %x1, 1; ...` with one add per unrolled
iteration. This patch simplifies these adds to `%xN = add %x0, N`
directly during unrolling, rather than waiting for InstCombine to do so.
The motivation for this is that having a single add (rather than
an add chain) on the induction variable makes it a simple recurrence,
which we specially recognize in a number of places. This allows
InstCombine to directly perform folds with that knowledge, instead
of first folding the add chains, and then doing other folds in another
InstCombine iteration.
Due to the reduced number of InstCombine iterations, this also
results in a small compile-time improvement.
Differential Revision: https://reviews.llvm.org/D153540
2023-07-05 09:54:28 +02:00
..
2022-12-15 10:00:45 +01:00
2022-12-09 01:04:45 +03:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2022-12-01 21:25:59 +01:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-04 15:57:30 -07:00
2021-09-04 15:57:30 -07:00
2022-12-15 10:00:45 +01:00
2022-11-24 18:43:42 +07:00
2022-11-24 18:43:42 +07:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2022-12-01 21:25:59 +01:00
2022-10-07 14:54:34 -07:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2022-10-07 14:54:34 -07:00
2023-07-05 09:54:28 +02:00
2021-09-02 11:38:14 -07:00
2022-12-16 13:12:27 +01:00
2022-12-12 20:41:56 +03:00
2023-03-07 17:10:34 +01:00
2023-04-14 19:36:56 +07:00
2023-06-29 09:09:17 +02:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2023-05-23 14:41:22 +02:00
2022-12-09 01:04:45 +03:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2023-06-09 20:05:50 +01:00
2023-03-07 17:10:34 +01:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2023-04-14 19:36:56 +07:00
2023-04-14 19:36:56 +07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2022-11-24 19:29:58 +07:00
2022-11-24 18:43:42 +07:00
2023-03-07 17:10:34 +01:00
2023-03-07 17:10:34 +01:00
2022-12-01 21:25:59 +01:00
2022-12-15 10:00:45 +01:00
2023-02-20 16:12:58 +07:00
2022-12-01 21:25:59 +01:00
2021-09-02 11:38:14 -07:00
2023-06-01 09:46:16 +02:00
2021-09-02 11:38:14 -07:00
2023-06-01 09:46:16 +02:00
2023-04-12 11:55:27 +02:00
2022-12-15 10:00:45 +01:00
2022-11-24 19:29:58 +07:00
2023-04-21 15:31:00 +02:00
2022-12-15 10:00:45 +01:00
2023-03-07 17:10:34 +01:00
2023-04-12 13:42:31 +07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2023-04-10 20:00:46 -07:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2023-06-29 09:09:17 +02:00
2021-09-02 11:38:14 -07:00
2023-05-31 21:05:17 -07:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-11-24 18:43:42 +07:00
2022-12-01 21:25:59 +01:00
2023-05-31 21:05:17 -07:00
2022-12-15 10:00:45 +01:00
2023-06-29 09:09:17 +02:00
2023-05-25 10:02:18 +02:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2023-06-29 09:35:20 -07:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2023-03-14 00:06:08 +07:00
2023-04-25 14:27:06 +02:00
2022-12-15 10:00:45 +01:00
2022-11-24 19:29:58 +07:00
2023-02-18 23:58:23 -08:00
2022-12-16 14:32:36 +01:00
2022-12-15 10:00:45 +01:00
2023-03-07 17:10:34 +01:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2021-09-15 11:34:50 -07:00
2022-10-07 14:54:34 -07:00
2022-12-15 10:00:45 +01:00
2023-02-23 19:59:25 +00:00
2022-12-16 13:12:27 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2023-06-29 09:09:17 +02:00
2022-12-15 10:00:45 +01:00
2022-11-25 11:41:36 +07:00
2022-11-25 11:41:36 +07:00
2023-03-07 17:10:34 +01:00
2022-04-29 02:37:05 +03:00
2022-04-29 02:37:05 +03:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-01 21:25:59 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2022-11-24 18:43:42 +07:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2022-12-01 21:25:59 +01:00
2022-12-15 10:00:45 +01:00
2022-11-25 11:41:36 +07:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2022-12-09 22:14:04 +00:00
2023-05-22 20:10:51 +07:00
2023-06-22 15:49:15 +07:00
2022-12-15 10:00:45 +01:00
2022-12-16 13:12:27 +01:00
2023-06-29 09:09:17 +02:00
2023-02-20 16:12:58 +07:00
2023-02-20 16:12:58 +07:00
2023-03-07 17:10:34 +01:00
2023-05-07 22:01:04 -07:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00
2023-03-17 10:07:39 +01:00
2022-12-16 14:32:36 +01:00
2022-12-01 21:25:59 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-01 21:25:59 +01:00
2023-03-17 14:27:03 +01:00
2023-06-09 11:51:53 +02:00
2023-06-09 11:51:53 +02:00
2022-12-09 01:04:45 +03:00
2022-12-15 10:00:45 +01:00
2023-06-29 09:09:17 +02:00
2022-12-15 10:00:45 +01:00
2023-03-07 17:10:34 +01:00
2022-12-15 10:00:45 +01:00
2023-04-14 19:36:56 +07:00
2022-12-16 14:32:36 +01:00
2023-03-07 17:10:34 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2023-06-01 09:46:16 +02:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2023-04-27 15:18:07 +02:00
2022-11-24 19:29:58 +07:00
2022-12-15 10:00:45 +01:00
2023-03-07 17:10:34 +01:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2023-06-29 09:09:17 +02:00
2022-12-15 10:00:45 +01:00
2023-03-07 17:10:34 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-11-24 19:29:58 +07:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2022-11-24 18:43:42 +07:00
2022-12-15 10:00:45 +01:00
2023-03-07 17:10:34 +01:00
2022-11-24 19:29:58 +07:00
2022-11-24 19:29:58 +07:00
2022-12-15 10:00:45 +01:00
2023-02-20 13:05:00 +07:00
2023-05-31 21:05:17 -07:00
2022-11-25 11:41:36 +07:00
2022-11-24 18:43:42 +07:00
2022-11-24 18:43:42 +07:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2023-05-07 22:01:04 -07:00
2023-05-07 22:01:04 -07:00
2022-12-15 10:00:45 +01:00
2023-04-27 15:07:19 +02:00
2022-12-15 10:00:45 +01:00
2022-12-15 10:00:45 +01:00
2023-03-07 17:10:34 +01:00
2021-09-02 11:38:14 -07:00
2023-03-07 17:10:34 +01:00
2022-06-27 09:33:05 +01:00
2021-09-02 11:38:14 -07:00
2021-11-16 11:59:21 -08:00
2022-12-15 10:00:45 +01:00
2023-03-07 17:10:34 +01:00
2023-02-18 23:58:23 -08:00
2021-09-02 11:38:14 -07:00
2021-09-02 11:38:14 -07:00
2022-12-15 10:00:45 +01:00
2021-09-02 11:38:14 -07:00