Florian Hahn
cd0ba9dc58
[LoopPeel] Peel if it turns invariant loads dereferenceable.
...
This patch adds a new cost heuristic that allows peeling a single
iteration off read-only loops, if the loop contains a load that
1. is feeding an exit condition,
2. dominates the latch,
3. is not already known to be dereferenceable,
4. and has a loop invariant address.
If all non-latch exits are terminated with unreachable, such loads
in the loop are guaranteed to be dereferenceable after peeling,
enabling hoisting/CSE'ing them.
This enables vectorization of loops with certain runtime-checks, like
multiple calls to `std::vector::at` if the vector is passed as pointer.
Reviewed By: mkazantsev
Differential Revision: https://reviews.llvm.org/D108114
2021-10-12 11:42:28 +01:00
..
2021-08-20 11:25:38 +01:00
2021-04-10 09:20:24 +03:00
2021-06-24 13:15:39 +03:00
2021-08-31 09:29:36 -07:00
2021-02-20 06:18:48 +01:00
2021-08-03 00:57:26 +03:00
2019-04-17 04:52:47 +00:00
2020-12-17 01:03:49 +03:00
2021-02-15 15:24:20 -05:00
2020-06-26 09:28:32 -07:00
2019-07-15 21:16:29 +00:00
2021-05-19 10:25:31 -07:00
2019-04-17 04:52:47 +00:00
2019-04-17 04:52:47 +00:00
2019-04-17 04:52:47 +00:00
2019-04-17 04:52:47 +00:00
2019-04-17 04:52:47 +00:00
2019-04-17 04:52:47 +00:00
2021-05-19 10:25:31 -07:00
2021-06-20 20:58:26 +02:00
2020-09-17 15:56:13 -07:00
2019-04-17 04:52:47 +00:00
2021-06-18 23:47:03 +02:00
2019-04-17 04:52:47 +00:00
2021-06-20 20:58:26 +02:00
2021-01-24 13:48:20 +01:00
2021-06-17 20:58:34 +02:00
2021-01-12 11:04:40 -08:00
2021-05-19 10:25:31 -07:00
2021-06-20 20:58:26 +02:00
2019-04-17 04:52:47 +00:00
2021-06-05 10:32:00 +02:00
2021-01-20 11:01:16 -05:00
2021-09-09 12:28:09 +03:00
2020-04-06 09:59:08 -06:00
2021-02-01 10:01:17 +01:00
2021-08-25 13:26:40 +01:00
2021-08-25 13:26:40 +01:00
2021-08-25 13:26:40 +01:00
2021-07-09 09:47:03 +02:00
2021-10-08 10:53:23 -07:00
2021-10-12 11:42:28 +01:00
2020-07-28 14:00:11 +00:00
2021-04-17 20:59:20 +02:00
2021-06-05 10:32:00 +02:00
2021-06-05 10:32:00 +02:00
2021-05-24 17:26:07 +02:00
2021-10-09 14:32:46 +07:00
2021-08-31 09:29:36 -07:00
2021-05-24 19:43:40 +02:00
2021-04-17 20:59:20 +02:00
2021-08-31 09:29:36 -07:00
2020-06-26 09:28:32 -07:00
2020-06-26 09:28:32 -07:00
2019-04-17 04:52:47 +00:00
2021-06-07 21:08:42 +02:00
2021-03-07 23:48:00 +00:00
2020-10-31 00:25:32 -07:00
2021-06-20 20:58:26 +02:00
2021-06-30 11:47:36 -07:00
2021-09-02 16:29:20 -07:00
2019-04-17 04:52:47 +00:00
2020-06-26 09:28:32 -07:00
2021-03-07 23:51:09 +00:00
2021-06-07 21:08:42 +02:00
2021-08-31 09:29:36 -07:00
2021-06-20 20:58:26 +02:00
2021-05-24 17:26:07 +02:00
2021-06-20 20:58:26 +02:00
2021-01-11 10:19:26 +07:00
2021-05-26 08:41:25 -07:00
2021-06-20 20:58:26 +02:00
2021-05-19 10:25:31 -07:00
2021-05-07 21:51:47 -07:00
2021-01-07 10:10:31 -08:00
2021-05-28 22:49:23 +02:00
2021-06-05 10:32:00 +02:00