Wei Mi
8f20e63a20
[LSR] Recommit: Allow formula containing Reg for SCEVAddRecExpr related with outerloop.
...
The recommit includes some changes of testcases. No functional change to the patch.
In RateRegister of existing LSR, if a formula contains a Reg which is a SCEVAddRecExpr,
and this SCEVAddRecExpr's loop is an outerloop, the formula will be marked as Loser
and dropped.
Suppose we have an IR that %for.body is outerloop and %for.body2 is innerloop. LSR only
handle inner loop now so only %for.body2 will be handled.
Using the logic above, formula like
reg(%array) + reg({1,+, %size}<%for.body>) + 1*reg({0,+,1}<%for.body2>) will be dropped
no matter what because reg({1,+, %size}<%for.body>) is a SCEVAddRecExpr type reg related
with outerloop. Only formula like
reg(%array) + 1*reg({{1,+, %size}<%for.body>,+,1}<nuw><nsw><%for.body2>) will be kept
because the SCEVAddRecExpr related with outerloop is folded into the initial value of the
SCEVAddRecExpr related with current loop.
But in some cases, we do need to share the basic induction variable
reg{0 ,+, 1}<%for.body2> among LSR Uses to reduce the final total number of induction
variables used by LSR, so we don't want to drop the formula like
reg(%array) + reg({1,+, %size}<%for.body>) + 1*reg({0,+,1}<%for.body2>) unconditionally.
From the existing comment, it tries to avoid considering multiple level loops at the same time.
However, existing LSR only handles innermost loop, so for any SCEVAddRecExpr with a loop other
than current loop, it is an invariant and will be simple to handle, and the formula doesn't have
to be dropped.
Differential Revision: https://reviews.llvm.org/D26429
llvm-svn: 294814
2017-02-11 00:50:23 +00:00
..
2017-02-10 07:05:56 +00:00
2016-10-05 17:22:11 +00:00
2016-12-15 16:05:29 +00:00
2016-10-11 13:36:07 +00:00
2017-01-11 19:55:19 +00:00
2016-11-15 13:29:23 +00:00
2016-12-22 00:45:21 +00:00
2016-10-05 22:15:37 +00:00
2017-02-02 18:24:55 +00:00
2016-11-24 21:48:50 +00:00
2017-02-05 18:33:24 +00:00
2017-02-05 18:33:24 +00:00
2017-02-05 18:33:24 +00:00
2016-12-07 13:05:04 +00:00
2016-12-15 16:05:29 +00:00
2017-02-02 18:24:55 +00:00
2016-12-08 19:01:00 +00:00
2016-12-08 19:01:00 +00:00
2017-02-09 22:02:28 +00:00
2016-12-08 19:01:00 +00:00
2017-02-02 00:32:03 +00:00
2016-10-31 23:28:45 +00:00
2017-01-11 19:55:19 +00:00
2017-02-08 00:32:36 +00:00
2016-10-12 23:58:45 +00:00
2016-12-13 01:38:41 +00:00
2017-01-17 19:18:57 +00:00
2017-02-05 18:33:14 +00:00
2017-01-07 20:38:36 +00:00
2016-10-08 18:36:57 +00:00
2017-02-05 18:33:14 +00:00
2016-10-08 18:36:57 +00:00
2016-10-08 18:36:57 +00:00
2017-01-24 16:53:09 +00:00
2016-12-28 10:12:48 +00:00
2016-10-08 18:36:57 +00:00
2016-10-08 18:36:57 +00:00
2016-10-10 06:25:42 +00:00
2017-02-05 18:33:14 +00:00
2017-01-03 05:46:18 +00:00
2017-02-05 18:33:14 +00:00
2016-10-08 18:36:57 +00:00
2017-01-04 08:05:42 +00:00
2016-12-28 10:12:48 +00:00
2017-01-07 22:20:34 +00:00
2017-01-14 07:50:52 +00:00
2016-10-16 04:54:31 +00:00
2017-01-09 02:44:34 +00:00
2017-01-31 23:48:32 +00:00
2017-01-12 06:49:12 +00:00
2017-01-24 02:36:59 +00:00
2017-01-03 05:46:18 +00:00
2016-11-30 23:48:26 +00:00
2016-12-28 10:12:48 +00:00
2017-02-09 07:39:19 +00:00
2017-01-05 01:34:55 +00:00
2017-02-09 11:50:19 +00:00
2016-11-13 14:29:32 +00:00
2017-02-04 23:26:39 +00:00
2016-11-30 23:48:26 +00:00
2017-01-14 07:50:52 +00:00
2017-01-14 07:50:52 +00:00
2017-01-07 22:20:34 +00:00
2017-01-24 02:36:59 +00:00
2016-12-11 14:10:52 +00:00
2017-01-14 07:50:52 +00:00
2016-12-28 10:12:48 +00:00
2017-01-12 06:49:03 +00:00
2017-01-29 22:53:33 +00:00
2017-01-29 13:18:30 +00:00
2017-01-30 06:59:06 +00:00
2017-01-03 05:46:18 +00:00
2016-12-28 10:12:48 +00:00
2017-01-14 07:50:52 +00:00
2016-11-22 04:57:34 +00:00
2016-12-10 23:09:43 +00:00
2016-12-21 10:43:36 +00:00
2017-01-19 07:12:35 +00:00
2017-01-07 22:20:34 +00:00
2017-01-14 07:50:52 +00:00
2016-12-28 10:12:48 +00:00
2017-02-09 11:50:19 +00:00
2017-01-07 22:20:34 +00:00
2017-01-14 07:50:52 +00:00
2017-01-24 02:36:59 +00:00
2017-01-19 02:34:25 +00:00
2017-01-03 05:46:18 +00:00
2017-01-19 02:34:25 +00:00
2016-12-28 10:12:48 +00:00
2016-11-22 04:57:34 +00:00
2016-12-28 10:12:48 +00:00
2016-11-30 23:48:26 +00:00
2017-01-03 05:46:18 +00:00
2017-02-09 11:50:19 +00:00
2016-12-28 10:12:48 +00:00
2017-01-07 22:20:34 +00:00
2016-12-28 10:12:48 +00:00
2017-01-30 06:59:06 +00:00
2017-01-14 07:50:52 +00:00
2016-12-21 20:00:10 +00:00
2017-02-05 22:50:29 +00:00
2017-01-11 09:11:48 +00:00
2016-11-14 01:53:29 +00:00
2016-11-14 01:53:29 +00:00
2017-02-07 04:10:57 +00:00
2016-12-15 16:05:29 +00:00
2016-12-28 10:12:48 +00:00
2016-12-15 16:05:29 +00:00
2017-01-11 19:55:19 +00:00
2017-01-29 13:18:30 +00:00
2017-01-31 05:18:29 +00:00
2017-02-04 23:26:46 +00:00
2016-12-05 18:04:47 +00:00
2016-10-24 18:57:55 +00:00
2016-10-20 18:06:52 +00:00
2017-02-07 19:19:49 +00:00
2016-12-12 23:05:38 +00:00
2017-01-30 23:37:03 +00:00
2016-12-06 12:24:14 +00:00
2016-12-12 13:33:58 +00:00
2017-01-31 23:48:32 +00:00
2017-02-09 11:50:19 +00:00
2017-01-12 19:48:01 +00:00
2017-01-12 19:54:27 +00:00
2017-01-12 19:54:27 +00:00
2016-10-19 17:08:23 +00:00
2017-02-02 18:24:55 +00:00
2017-01-10 23:43:04 +00:00
2017-02-10 14:04:11 +00:00
2017-02-08 05:45:46 +00:00
2016-10-20 18:06:52 +00:00
2017-02-09 04:27:34 +00:00
2016-10-11 20:36:43 +00:00
2017-01-24 16:36:07 +00:00
2017-01-12 19:54:27 +00:00
2016-11-24 13:23:35 +00:00
2016-10-07 11:18:38 +00:00
2016-10-24 18:57:55 +00:00
2016-11-15 18:44:53 +00:00
2017-02-07 13:15:09 +00:00
2016-10-12 13:48:10 +00:00
2016-10-30 18:13:30 +00:00
2017-02-03 17:59:58 +00:00
2016-12-21 20:00:10 +00:00
2016-12-15 18:03:38 +00:00
2016-12-14 15:08:13 +00:00
2016-12-06 19:09:37 +00:00
2017-02-05 18:33:14 +00:00
2016-12-15 18:03:38 +00:00
2016-12-14 15:08:13 +00:00
2016-12-15 18:03:38 +00:00
2016-10-13 12:49:31 +00:00
2016-12-14 15:08:13 +00:00
2016-12-14 15:08:13 +00:00
2017-02-02 18:24:55 +00:00
2017-02-02 18:24:55 +00:00
2017-02-09 21:58:24 +00:00
2017-02-06 22:42:43 +00:00
2016-12-28 10:12:48 +00:00
2016-10-15 18:56:38 +00:00
2017-02-02 18:24:55 +00:00
2017-02-04 02:27:13 +00:00
2017-01-10 06:01:16 +00:00
2017-01-11 19:55:19 +00:00
2017-02-02 18:24:55 +00:00
2017-02-03 12:28:40 +00:00
2017-01-24 16:36:07 +00:00
2016-10-24 18:57:55 +00:00
2016-11-30 23:48:26 +00:00
2016-11-30 23:48:26 +00:00
2016-11-16 14:54:34 +00:00
2016-10-13 23:00:11 +00:00
2017-02-06 14:54:49 +00:00
2016-11-16 14:12:11 +00:00
2017-02-02 18:24:55 +00:00
2017-01-18 16:58:43 +00:00
2017-01-02 18:05:27 +00:00
2016-12-29 14:31:07 +00:00
2017-01-30 06:59:06 +00:00
2016-12-07 12:10:49 +00:00
2017-01-10 22:02:30 +00:00
2017-02-02 18:24:55 +00:00
2016-12-18 14:26:02 +00:00
2016-12-05 05:50:51 +00:00
2016-12-05 04:51:31 +00:00
2016-12-28 10:12:48 +00:00
2016-10-13 00:55:24 +00:00
2017-01-31 17:00:27 +00:00
2016-12-08 14:08:08 +00:00
2016-12-08 14:08:08 +00:00
2017-01-07 22:20:34 +00:00
2016-10-11 20:36:43 +00:00
2016-11-27 21:37:00 +00:00
2017-01-09 20:26:17 +00:00
2016-10-25 14:29:25 +00:00
2016-10-13 22:38:15 +00:00
2017-01-31 06:49:53 +00:00
2016-12-22 00:45:21 +00:00
2017-01-26 23:27:59 +00:00
2016-12-28 10:12:48 +00:00
2016-12-15 16:05:29 +00:00
2016-11-16 17:42:40 +00:00
2016-11-14 01:53:29 +00:00
2017-01-31 23:48:32 +00:00
2016-12-22 00:45:21 +00:00
2017-01-04 12:08:35 +00:00
2017-01-04 12:08:35 +00:00
2016-10-13 20:54:39 +00:00
2016-11-30 23:48:26 +00:00
2016-11-30 11:30:33 +00:00
2017-01-10 22:02:30 +00:00
2017-01-04 08:05:42 +00:00
2017-02-10 16:34:17 +00:00
2017-02-02 18:24:55 +00:00
2017-02-07 19:19:49 +00:00
2017-02-07 19:19:49 +00:00
2016-12-08 00:06:51 +00:00
2017-01-18 09:31:13 +00:00
2016-10-10 05:48:56 +00:00
2016-10-10 11:11:27 +00:00
2016-10-10 05:48:56 +00:00
2016-10-10 11:11:27 +00:00
2016-10-10 05:48:56 +00:00
2016-11-30 13:21:12 +00:00
2016-10-12 13:44:24 +00:00
2017-02-02 22:02:57 +00:00
2017-01-31 23:48:32 +00:00
2017-01-19 22:41:22 +00:00
2017-02-08 00:32:36 +00:00
2016-11-30 23:48:26 +00:00
2017-02-11 00:50:23 +00:00
2017-02-02 18:24:55 +00:00
2017-02-09 15:13:40 +00:00
2016-12-15 16:05:29 +00:00
2016-10-20 18:06:52 +00:00
2016-11-10 22:37:13 +00:00
2016-12-18 14:26:02 +00:00
2017-01-05 15:11:43 +00:00
2017-02-09 14:43:58 +00:00
2017-01-11 19:55:19 +00:00
2016-10-20 18:06:52 +00:00
2016-10-11 17:05:52 +00:00
2017-01-20 07:12:30 +00:00
2017-01-14 07:50:52 +00:00
2017-02-03 11:14:39 +00:00
2017-02-03 19:11:19 +00:00
2017-02-03 19:11:19 +00:00
2017-02-03 19:11:19 +00:00
2016-11-30 23:48:26 +00:00
2017-02-02 18:24:55 +00:00
2017-02-02 18:24:55 +00:00
2017-01-15 16:43:14 +00:00
2017-02-02 18:24:55 +00:00
2017-02-02 18:24:55 +00:00
2016-12-22 00:45:21 +00:00
2016-12-15 16:05:29 +00:00
2016-10-22 07:15:00 +00:00
2016-11-30 23:48:26 +00:00
2016-11-29 00:29:27 +00:00
2017-02-06 16:21:41 +00:00
2016-11-16 01:07:12 +00:00
2016-11-16 01:07:12 +00:00
2017-02-09 17:54:51 +00:00
2017-02-09 17:54:51 +00:00
2016-10-19 16:58:59 +00:00
2016-10-14 14:26:47 +00:00
2016-10-21 20:16:27 +00:00
2017-01-25 06:08:42 +00:00
2017-01-31 06:49:50 +00:00
2016-12-05 15:58:21 +00:00
2016-12-22 00:45:21 +00:00
2016-12-18 14:26:02 +00:00
2016-11-21 14:36:19 +00:00
2016-12-15 18:03:38 +00:00
2016-11-23 18:33:49 +00:00
2016-11-23 18:33:49 +00:00
2016-11-30 23:48:26 +00:00
2017-02-10 17:57:48 +00:00
2017-01-09 21:38:17 +00:00
2017-01-21 06:59:38 +00:00
2016-12-16 20:38:39 +00:00
2016-10-20 18:06:52 +00:00
2016-10-21 15:51:24 +00:00
2017-01-24 11:46:13 +00:00
2017-02-05 18:33:24 +00:00
2016-12-15 16:05:29 +00:00
2016-10-20 18:06:52 +00:00
2016-10-11 20:36:43 +00:00
2016-12-15 16:05:29 +00:00
2016-12-18 07:54:23 +00:00
2017-01-24 16:56:23 +00:00
2017-02-10 17:57:46 +00:00
2017-02-10 17:26:21 +00:00
2017-01-24 16:58:22 +00:00
2017-02-05 18:33:24 +00:00
2017-02-02 18:24:55 +00:00
2017-02-02 17:23:57 +00:00
2016-12-10 17:00:00 +00:00
2016-11-30 23:48:26 +00:00
2017-02-03 17:59:58 +00:00
2016-11-30 23:48:26 +00:00
2016-12-18 14:26:02 +00:00
2016-11-04 15:15:19 +00:00
2016-10-31 11:40:14 +00:00
2016-12-05 20:57:37 +00:00
2016-12-07 19:31:08 +00:00
2016-12-07 19:29:18 +00:00
2016-12-09 17:53:11 +00:00
2017-01-29 13:18:30 +00:00
2017-01-28 01:05:27 +00:00
2017-01-28 01:05:27 +00:00
2017-01-28 01:05:27 +00:00
2017-02-09 11:50:19 +00:00
2016-12-07 12:10:49 +00:00
2017-02-05 18:33:14 +00:00
2016-11-30 23:48:26 +00:00
2016-10-11 20:36:43 +00:00
2016-12-16 20:38:39 +00:00
2017-02-10 14:56:12 +00:00
2017-02-09 14:14:06 +00:00
2017-02-05 18:33:14 +00:00
2016-10-10 14:43:55 +00:00
2016-10-17 21:08:39 +00:00
2017-02-08 19:01:27 +00:00
2016-12-08 20:38:46 +00:00
2016-10-24 19:13:29 +00:00
2017-01-22 20:28:56 +00:00
2017-02-06 13:44:45 +00:00
2017-01-19 13:55:55 +00:00
2016-11-30 23:48:26 +00:00
2017-02-05 18:33:31 +00:00
2017-01-11 19:55:19 +00:00
2016-11-23 16:05:51 +00:00
2016-12-21 20:00:10 +00:00
2017-02-07 20:37:45 +00:00
2017-01-05 16:48:28 +00:00
2017-02-05 18:33:14 +00:00
2017-02-09 11:50:19 +00:00
2017-01-11 19:55:19 +00:00
2017-01-17 19:29:15 +00:00
2017-01-10 06:01:16 +00:00
2017-02-02 18:24:55 +00:00
2016-12-06 04:58:39 +00:00
2016-11-21 15:28:21 +00:00
2017-01-22 17:06:12 +00:00
2016-12-15 16:05:29 +00:00
2017-01-11 09:11:48 +00:00
2016-12-15 16:05:29 +00:00
2016-12-28 10:12:48 +00:00
2016-12-15 16:05:29 +00:00
2017-01-15 16:43:14 +00:00
2016-11-06 02:03:58 +00:00
2017-02-05 18:33:24 +00:00
2017-02-05 18:33:24 +00:00
2016-10-10 06:25:42 +00:00
2017-02-05 18:33:24 +00:00
2016-12-28 10:12:48 +00:00
2016-12-12 05:07:17 +00:00
2017-02-10 01:35:31 +00:00
2016-12-15 16:05:29 +00:00
2017-01-09 02:44:34 +00:00
2016-11-16 05:24:10 +00:00
2016-12-28 10:12:48 +00:00
2017-02-05 18:33:24 +00:00
2016-10-19 11:16:58 +00:00
2017-01-11 19:55:19 +00:00
2016-12-28 10:12:48 +00:00
2016-12-07 15:06:14 +00:00
2016-12-09 05:20:11 +00:00
2017-02-06 03:17:58 +00:00
2017-02-05 18:33:24 +00:00
2016-12-07 15:10:05 +00:00
2017-02-07 07:31:00 +00:00
2017-02-07 07:30:54 +00:00
2017-02-05 18:33:24 +00:00
2016-12-12 20:49:11 +00:00
2016-12-13 01:38:41 +00:00
2016-11-30 23:48:26 +00:00
2016-11-30 23:48:26 +00:00
2016-11-30 23:48:26 +00:00
2016-12-13 01:38:41 +00:00
2016-12-13 01:21:15 +00:00
2016-11-30 23:48:26 +00:00
2016-11-30 23:48:26 +00:00
2017-02-02 18:24:55 +00:00
2017-01-19 02:34:29 +00:00
2016-10-28 17:21:05 +00:00
2016-10-28 17:21:05 +00:00
2016-12-15 18:03:38 +00:00
2016-10-12 20:39:33 +00:00
2016-10-11 20:36:43 +00:00
2017-01-22 20:28:56 +00:00
2017-01-11 19:55:19 +00:00
2016-11-30 23:48:26 +00:00
2016-11-30 23:48:26 +00:00
2016-12-15 16:05:29 +00:00
2016-12-15 16:05:29 +00:00
2016-12-14 00:27:35 +00:00
2017-01-22 20:28:56 +00:00
2016-10-11 20:36:43 +00:00
2016-12-14 15:08:13 +00:00
2016-11-08 15:07:01 +00:00
2017-02-09 11:50:19 +00:00
2016-11-08 14:10:28 +00:00
2016-12-15 16:05:29 +00:00
2016-12-18 14:26:02 +00:00
2016-12-28 10:12:48 +00:00
2017-01-03 05:46:18 +00:00
2016-12-28 10:12:48 +00:00
2016-12-15 16:05:29 +00:00
2017-01-10 22:02:30 +00:00
2016-12-15 16:05:29 +00:00
2016-12-15 16:05:29 +00:00
2017-01-10 22:02:30 +00:00
2017-01-10 22:02:30 +00:00
2016-12-15 16:05:29 +00:00
2017-01-11 09:11:48 +00:00
2017-01-28 23:52:09 +00:00
2017-01-20 22:18:47 +00:00
2017-02-05 18:33:24 +00:00
2017-02-05 18:33:24 +00:00
2016-12-15 16:05:29 +00:00
2016-12-15 16:05:29 +00:00
2016-12-15 16:05:29 +00:00
2016-12-15 16:05:29 +00:00
2017-02-05 18:33:24 +00:00
2017-01-24 11:21:57 +00:00
2016-12-06 12:24:14 +00:00
2016-12-12 07:57:24 +00:00
2016-12-02 13:16:08 +00:00
2016-12-28 10:12:48 +00:00
2016-10-11 13:55:49 +00:00
2017-01-16 13:39:00 +00:00
2017-02-05 18:33:24 +00:00
2017-02-03 17:31:01 +00:00
2017-02-03 17:31:01 +00:00
2017-02-02 18:24:55 +00:00
2017-01-03 05:46:18 +00:00
2017-01-24 11:46:13 +00:00
2016-10-25 14:29:25 +00:00
2016-10-25 14:29:25 +00:00
2017-01-24 11:46:13 +00:00
2016-10-25 14:29:25 +00:00
2016-10-25 14:29:25 +00:00
2017-02-10 14:37:25 +00:00
2017-02-10 14:37:25 +00:00
2016-11-29 14:18:51 +00:00
2016-11-29 14:18:51 +00:00
2017-02-10 18:06:11 +00:00
2017-02-10 18:06:11 +00:00
2017-01-09 02:44:34 +00:00
2017-02-05 18:33:24 +00:00
2017-01-24 11:21:57 +00:00
2017-01-24 11:21:57 +00:00
2017-02-05 18:33:24 +00:00
2017-01-24 11:21:57 +00:00
2017-01-24 11:21:57 +00:00
2017-02-05 18:33:24 +00:00
2017-01-24 11:21:57 +00:00
2017-01-24 11:21:57 +00:00
2016-12-28 10:12:48 +00:00
2017-01-06 15:56:52 +00:00
2017-01-06 15:56:52 +00:00
2017-02-09 11:50:19 +00:00
2017-02-10 19:51:47 +00:00
2017-02-10 19:51:47 +00:00
2017-02-04 23:26:46 +00:00
2017-02-04 23:26:46 +00:00
2017-02-10 19:51:47 +00:00
2017-02-10 19:51:47 +00:00
2017-01-15 16:43:14 +00:00
2017-01-07 15:37:50 +00:00
2017-01-15 16:43:14 +00:00
2017-02-06 13:44:45 +00:00
2016-12-11 21:26:25 +00:00
2016-12-28 10:12:48 +00:00
2016-12-28 10:12:48 +00:00
2016-11-30 16:33:46 +00:00
2017-02-06 13:44:45 +00:00
2017-02-03 17:59:58 +00:00
2016-12-16 11:48:51 +00:00
2017-01-17 06:49:59 +00:00
2016-12-18 14:26:02 +00:00
2017-01-09 02:44:34 +00:00
2017-02-02 18:24:55 +00:00
2017-02-02 18:24:55 +00:00
2017-01-22 21:15:27 +00:00
2017-02-05 18:33:14 +00:00
2017-02-05 18:33:14 +00:00
2017-02-10 14:37:25 +00:00
2017-02-10 14:37:25 +00:00
2016-10-08 18:51:55 +00:00
2017-01-24 02:36:59 +00:00
2016-12-15 16:05:29 +00:00
2017-02-02 18:24:55 +00:00
2016-12-28 10:12:48 +00:00
2016-11-30 16:33:46 +00:00
2017-02-05 18:33:24 +00:00
2017-02-08 15:22:52 +00:00
2017-01-05 15:11:43 +00:00
2017-01-28 23:52:09 +00:00
2017-02-09 11:50:19 +00:00
2016-10-08 19:54:28 +00:00
2016-10-08 19:54:28 +00:00
2016-10-08 19:54:28 +00:00
2017-02-09 11:50:19 +00:00
2017-02-09 11:50:19 +00:00
2016-10-08 19:54:28 +00:00
2016-10-08 19:54:28 +00:00
2016-12-15 16:05:29 +00:00
2016-11-30 16:33:46 +00:00
2016-10-08 19:54:28 +00:00
2017-02-02 18:24:55 +00:00
2016-11-30 23:48:26 +00:00
2016-10-12 22:13:19 +00:00
2016-12-29 17:07:10 +00:00
2016-10-13 15:48:48 +00:00
2016-11-30 23:48:26 +00:00
2016-10-24 18:57:55 +00:00
2017-01-10 06:01:16 +00:00
2016-10-14 18:20:41 +00:00
2017-01-22 20:28:56 +00:00
2017-01-14 18:52:13 +00:00
2016-10-24 18:57:55 +00:00
2016-11-23 02:07:04 +00:00
2016-12-19 09:20:38 +00:00
2016-12-19 09:20:38 +00:00
2016-11-23 02:07:04 +00:00