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 19:10:38 +00:00
2016-04-19 23:51:52 +00:00
2016-04-15 15:57:41 +00:00
2016-06-21 15:16:34 +00:00
2016-07-19 13:35:11 +00:00
2016-05-13 18:00:09 +00:00
2016-07-19 13:35:11 +00:00
2016-06-02 16:22:07 +00:00
2016-10-24 18:57:55 +00:00
2016-08-01 05:56:57 +00:00
2016-08-01 05:56:57 +00:00
2016-07-19 14:12:45 +00:00
2016-06-16 01:42:25 +00:00
2016-08-01 05:56:57 +00:00
2016-04-25 20:54:08 +00:00
2016-07-05 18:02:57 +00:00
2016-08-08 13:13:57 +00:00
2016-09-26 15:34:47 +00:00
2017-01-11 19:55:19 +00:00
2016-04-19 23:51:52 +00:00
2017-02-02 18:24:55 +00:00
2016-12-22 00:45:21 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-05-06 16:34:59 +00:00
2016-07-19 13:35:11 +00:00
2016-10-13 20:23:25 +00:00
2017-02-02 18:24:55 +00:00
2016-07-19 13:35:11 +00:00
2016-08-01 05:56:57 +00:00
2016-08-01 05:56:57 +00:00
2017-01-18 18:57:08 +00:00
2017-02-08 21:41:16 +00:00
2016-04-15 18:09:10 +00:00
2016-07-19 13:35:11 +00:00
2016-07-29 18:09:25 +00:00
2016-08-01 05:56:57 +00:00
2016-10-14 22:18:18 +00:00
2016-09-14 20:22:03 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-08-01 05:56:57 +00:00
2016-07-19 13:35:11 +00:00
2017-01-31 23:48:32 +00:00
2016-08-01 05:56:57 +00:00
2016-08-01 05:56:57 +00:00
2016-08-01 05:56:57 +00:00
2016-07-19 13:35:11 +00:00
2017-01-18 18:57:08 +00:00
2017-01-18 18:57:08 +00:00
2017-02-08 21:41:16 +00:00
2016-07-19 13:35:11 +00:00
2016-09-13 19:27:38 +00:00
2016-07-19 13:35:11 +00:00
2016-08-01 05:56:57 +00:00
2017-01-11 19:55:19 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-01-18 18:57:08 +00:00
2017-01-27 17:16:37 +00:00
2017-01-06 19:22:01 +00:00
2017-01-06 19:22:01 +00:00
2017-01-06 19:22:01 +00:00
2016-07-19 13:35:11 +00:00
2017-01-18 18:57:08 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-08-01 05:56:57 +00:00
2016-08-26 14:01:55 +00:00
2016-09-23 18:28:31 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-02-08 21:41:16 +00:00
2016-08-01 05:56:57 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-01-18 18:57:08 +00:00
2016-10-11 20:36:43 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-01-18 18:57:08 +00:00
2016-05-06 16:34:59 +00:00
2016-06-16 01:42:25 +00:00
2016-06-16 01:42:25 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-05-13 18:00:09 +00:00
2016-07-19 13:35:11 +00:00
2016-09-15 19:55:23 +00:00
2016-12-11 19:39:32 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-04-24 05:14:01 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-08-15 21:46:19 +00:00
2016-10-14 22:18:18 +00:00
2016-07-19 13:35:11 +00:00
2016-08-01 05:56:57 +00:00
2016-06-02 16:22:07 +00:00
2016-07-19 13:35:11 +00:00
2016-12-14 22:59:14 +00:00
2016-12-22 22:27:05 +00:00
2017-02-08 21:41:16 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-01-22 20:28:56 +00:00
2016-05-06 16:34:59 +00:00
2016-09-01 12:58:13 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-04-15 14:58:38 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-02-02 18:24:55 +00:00
2016-11-14 19:39:04 +00:00
2016-09-23 18:28:31 +00:00
2016-09-23 18:28:31 +00:00
2016-08-19 22:31:45 +00:00
2017-01-18 18:57:08 +00:00
2016-07-19 13:35:11 +00:00
2016-11-11 19:25:48 +00:00
2016-05-13 18:00:09 +00:00
2016-10-08 12:30:07 +00:00
2016-08-01 05:56:57 +00:00
2017-02-08 21:41:16 +00:00
2017-01-16 16:28:43 +00:00
2017-01-10 22:02:30 +00:00
2016-11-30 23:48:26 +00:00
2016-06-16 01:42:25 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-08-01 05:56:57 +00:00
2016-07-19 13:35:11 +00:00
2016-06-16 01:42:25 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-12-08 00:16:42 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-01-31 23:48:32 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-02-08 21:41:16 +00:00
2017-02-08 21:41:16 +00:00
2017-01-26 00:39:51 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-09-14 20:22:03 +00:00
2016-08-01 05:56:57 +00:00
2017-02-08 21:41:16 +00:00
2016-10-13 20:23:25 +00:00
2016-10-14 22:18:18 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-20 04:13:01 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-02-08 21:41:16 +00:00
2017-02-08 21:41:16 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-02-08 21:41:16 +00:00
2017-02-02 18:24:55 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-02-08 21:41:16 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-02-08 21:41:16 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-05-06 17:12:38 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-05-13 18:00:09 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-08-01 05:56:57 +00:00
2017-01-04 21:26:23 +00:00
2016-11-16 03:38:27 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2016-08-12 03:33:22 +00:00
2016-11-29 22:28:58 +00:00
2016-06-03 20:11:09 +00:00
2017-01-18 18:57:08 +00:00
2016-04-19 23:51:52 +00:00
2017-02-08 21:41:16 +00:00
2017-01-18 18:57:08 +00:00
2017-02-09 18:28:17 +00:00
2016-09-01 12:58:13 +00:00
2016-10-14 22:18:18 +00:00
2016-08-23 01:30:30 +00:00
2016-08-02 07:41:05 +00:00
2016-08-01 05:56:57 +00:00
2016-05-25 17:52:38 +00:00
2016-08-01 05:56:57 +00:00
2016-07-19 13:35:11 +00:00
2016-12-01 21:31:59 +00:00
2017-01-18 18:57:08 +00:00
2016-07-19 13:35:11 +00:00
2017-01-11 19:55:19 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-02-08 21:41:16 +00:00
2016-10-26 18:49:16 +00:00
2016-06-16 01:42:25 +00:00
2016-12-13 23:31:41 +00:00
2016-11-08 13:34:41 +00:00
2016-06-25 00:23:00 +00:00
2016-06-16 01:42:25 +00:00
2016-11-23 16:05:51 +00:00
2016-08-01 05:56:57 +00:00
2016-07-19 13:35:11 +00:00
2017-02-11 00:50:23 +00:00
2017-01-18 18:57:08 +00:00
2016-08-26 14:01:55 +00:00
2016-07-22 12:54:53 +00:00
2016-07-20 21:12:27 +00:00
2016-08-01 05:56:57 +00:00
2016-06-08 21:30:12 +00:00
2016-08-01 05:56:57 +00:00
2016-08-01 05:56:57 +00:00
2016-08-01 05:56:57 +00:00
2016-08-02 20:22:36 +00:00
2016-06-16 01:42:25 +00:00
2016-08-01 05:56:57 +00:00
2016-08-01 05:56:57 +00:00
2016-05-06 16:34:59 +00:00
2016-10-18 20:41:30 +00:00
2016-06-02 20:01:37 +00:00
2016-05-13 18:00:09 +00:00
2016-08-01 05:56:57 +00:00
2017-02-08 21:41:16 +00:00
2017-02-08 21:41:16 +00:00
2017-02-08 21:41:16 +00:00
2016-05-13 18:00:09 +00:00
2017-02-08 21:41:16 +00:00
2016-07-06 21:39:33 +00:00
2017-01-18 18:57:08 +00:00
2017-01-04 22:11:42 +00:00
2016-04-19 23:51:52 +00:00
2016-06-16 01:42:25 +00:00
2016-08-01 05:56:57 +00:00
2016-11-11 17:50:09 +00:00
2016-11-11 17:50:09 +00:00
2016-11-11 17:50:09 +00:00
2016-08-01 05:56:57 +00:00
2016-11-11 17:50:09 +00:00
2016-11-11 17:50:09 +00:00
2016-11-11 17:50:09 +00:00
2016-05-11 01:26:32 +00:00
2016-05-13 18:00:09 +00:00
2016-09-11 08:24:04 +00:00
2016-06-16 01:42:25 +00:00
2016-05-09 11:10:44 +00:00
2016-05-09 11:10:44 +00:00
2017-01-18 18:57:08 +00:00
2016-07-19 13:35:11 +00:00
2017-01-18 18:57:08 +00:00
2016-08-01 05:56:57 +00:00
2016-12-09 19:08:15 +00:00
2017-02-05 18:28:14 +00:00
2017-01-20 18:04:27 +00:00
2016-11-14 19:39:04 +00:00
2017-02-06 18:07:20 +00:00
2016-07-19 13:35:11 +00:00
2016-08-02 19:04:25 +00:00
2017-01-18 18:57:08 +00:00
2017-01-24 01:12:58 +00:00
2017-02-09 15:13:40 +00:00
2017-02-09 15:13:40 +00:00
2017-01-11 19:55:19 +00:00
2016-06-16 01:42:25 +00:00
2017-01-06 19:22:01 +00:00
2016-07-19 13:35:11 +00:00
2016-11-10 23:46:44 +00:00
2016-10-11 20:36:43 +00:00
2016-12-21 03:37:39 +00:00
2016-12-09 19:08:15 +00:00
2017-01-05 20:01:19 +00:00
2016-12-09 19:08:15 +00:00
2017-02-03 11:14:39 +00:00
2016-10-25 19:53:51 +00:00
2016-07-19 13:35:11 +00:00
2016-07-19 13:35:11 +00:00
2017-02-02 18:24:55 +00:00
2016-10-25 19:53:51 +00:00
2017-02-01 02:54:34 +00:00
2017-02-06 18:07:20 +00:00
2016-12-16 23:55:43 +00:00
2016-06-16 01:42:25 +00:00
2017-01-18 18:57:08 +00:00
2016-11-15 20:16:48 +00:00
2016-12-11 19:39:32 +00:00
2016-11-11 01:34:21 +00:00
2016-11-07 15:42:12 +00:00
2016-04-19 23:51:52 +00:00
2016-04-19 23:51:52 +00:00
2017-01-24 17:34:31 +00:00
2016-07-19 13:35:11 +00:00
2016-05-03 05:21:53 +00:00
2016-09-16 14:07:29 +00:00
2016-05-26 12:42:55 +00:00
2016-07-19 13:35:11 +00:00
2016-07-07 20:02:18 +00:00
2017-01-10 17:20:33 +00:00
2016-11-14 23:29:01 +00:00
2016-08-18 17:58:09 +00:00
2016-07-19 13:35:11 +00:00
2017-02-07 01:59:39 +00:00
2017-01-22 20:28:56 +00:00
2016-07-19 13:35:11 +00:00
2016-12-13 23:31:41 +00:00
2016-09-01 12:58:13 +00:00
2016-11-07 22:39:02 +00:00
2016-11-10 23:46:44 +00:00
2016-12-14 22:59:14 +00:00
2017-01-19 13:55:55 +00:00
2016-08-01 05:56:57 +00:00
2016-10-14 22:18:18 +00:00
2016-08-26 18:52:31 +00:00
2016-07-05 21:23:04 +00:00
2016-12-01 23:43:55 +00:00
2016-11-14 23:29:01 +00:00
2017-01-18 18:57:08 +00:00
2016-04-19 19:40:37 +00:00
2016-04-05 22:41:50 +00:00
2016-07-13 20:36:03 +00:00
2016-09-14 20:22:03 +00:00
2017-01-04 21:21:46 +00:00
2016-11-10 23:46:44 +00:00
2016-10-28 17:21:05 +00:00
2016-08-26 19:28:17 +00:00
2017-02-09 01:52:17 +00:00
2017-02-08 22:30:47 +00:00
2016-09-23 18:28:31 +00:00
2016-04-04 18:56:13 +00:00
2016-08-01 05:56:57 +00:00
2016-08-01 05:56:57 +00:00
2016-07-19 13:35:11 +00:00
2017-01-31 23:48:32 +00:00
2016-08-01 05:56:57 +00:00
2016-06-25 00:23:00 +00:00
2017-02-02 18:24:55 +00:00
2017-02-08 21:41:16 +00:00
2016-11-21 03:01:43 +00:00
2017-01-25 20:21:49 +00:00
2016-12-01 23:43:55 +00:00