James Molloy
bd7c3fb3bf
[LSR] Don't try and create post-inc expressions on non-rotated loops
...
If a loop is not rotated (for example when optimizing for size), the latch is not the backedge. If we promote an expression to post-inc form, we not only increase register pressure and add a COPY for that IV expression but for all IVs!
Motivating testcase:
void f(float *a, float *b, float *c, int n) {
while (n-- > 0)
*c++ = *a++ + *b++;
}
It's imperative that the pointer increments be located in the latch block and not the header block; if not, we cannot use post-increment loads and stores and we have to keep both the post-inc and pre-inc values around until the end of the latch which bloats register usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278658 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 07:53:03 +00:00
..
2016-06-06 19:10:46 +00:00
2016-06-15 00:11:01 +00:00
2015-09-30 10:56:37 +00:00
2015-08-20 20:59:02 +00:00
2016-08-11 21:05:17 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-03-04 18:43:29 +00:00
2015-06-24 19:28:40 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2013-07-14 01:42:54 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-04 18:43:29 +00:00
2015-04-16 23:24:18 +00:00
2015-06-17 20:52:32 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-03-04 18:43:29 +00:00
2015-02-27 19:29:02 +00:00
2015-07-13 03:28:53 +00:00
2012-12-30 01:28:40 +00:00
2016-02-03 21:30:34 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2016-07-18 21:41:50 +00:00
2014-01-11 21:06:00 +00:00
2015-05-08 18:07:24 +00:00
2015-03-04 18:43:29 +00:00
2010-03-02 01:59:21 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2016-02-04 01:27:38 +00:00
2016-08-15 07:53:03 +00:00
2010-04-07 22:53:17 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-08-28 20:26:49 +00:00
2015-02-27 19:29:02 +00:00
2015-03-04 18:43:29 +00:00
2015-04-16 23:24:18 +00:00
2015-12-12 05:38:55 +00:00
2016-03-24 21:40:22 +00:00
2015-02-27 19:29:02 +00:00
2016-08-03 03:21:41 +00:00
2015-02-27 19:29:02 +00:00
2015-03-04 18:43:29 +00:00
2015-02-27 19:29:02 +00:00
2016-06-06 19:10:46 +00:00
2015-08-14 22:45:26 +00:00
2015-02-27 21:17:42 +00:00
2015-06-24 19:28:40 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-03-04 18:43:29 +00:00