Chris Lattner
5eecb7f164
This adds in some code (currently disabled unless you pass
...
-enable-smarter-addr-folding to llc) that gives CGP a better
cost model for when to sink computations into addressing modes.
The basic observation is that sinking increases register
pressure when part of the addr computation has to be available
for other reasons, such as having a use that is a non-memory
operation. In cases where it works, it can substantially reduce
register pressure.
This code is currently an overall win on 403.gcc and 255.vortex
(the two things I've been looking at), but there are several
things I want to do before enabling it by default:
1. This isn't doing any caching of results, so it is much slower
than it could be. It currently slows down release-asserts llc
by 1.7% on 176.gcc: 27.12s -> 27.60s.
2. This doesn't think about inline asm memory operands yet.
3. The cost model botches the case when the needed value is live
across the computation for other reasons.
I'll continue poking at this, and eventually turn it on as llcbeta.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60074 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 02:00:14 +00:00
..
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-08-21 21:00:15 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-14 17:56:54 +00:00
2008-06-10 00:36:41 +00:00
2008-04-14 17:56:54 +00:00
2008-04-14 17:56:54 +00:00
2008-06-21 06:45:54 +00:00
2008-05-07 22:59:08 +00:00
2008-06-10 00:36:41 +00:00
2008-07-30 18:23:34 +00:00
2008-06-27 03:14:20 +00:00
2008-06-10 00:36:41 +00:00
2008-04-10 02:32:10 +00:00
2008-06-10 15:11:36 +00:00
2008-06-10 15:11:36 +00:00
2008-06-10 15:11:36 +00:00
2008-05-06 07:23:50 +00:00
2008-09-04 22:59:58 +00:00
2008-04-14 17:56:54 +00:00
2008-05-27 17:55:57 +00:00
2008-08-04 23:55:29 +00:00
2008-08-05 18:03:01 +00:00
2008-08-05 18:05:58 +00:00
2008-07-01 21:50:49 +00:00
2008-09-04 22:59:58 +00:00
2008-06-21 06:45:54 +00:00
2008-04-09 01:30:15 +00:00
2008-04-10 02:32:10 +00:00
2008-04-16 18:21:55 +00:00
2008-04-17 00:06:42 +00:00
2008-04-16 23:44:44 +00:00
2008-08-05 18:19:14 +00:00
2008-04-25 00:26:43 +00:00
2008-04-25 05:13:01 +00:00
2008-04-27 00:37:18 +00:00
2008-06-10 00:36:41 +00:00
2008-04-28 23:31:41 +00:00
2008-05-02 15:11:58 +00:00
2008-08-05 18:19:14 +00:00
2008-05-10 00:17:50 +00:00
2008-05-10 06:46:49 +00:00
2008-05-12 22:59:44 +00:00
2008-10-07 23:00:56 +00:00
2008-05-23 00:37:07 +00:00
2008-05-28 17:40:10 +00:00
2008-05-28 17:22:32 +00:00
2008-06-04 23:37:54 +00:00
2008-06-13 19:07:40 +00:00
2008-06-23 06:16:31 +00:00
2008-06-16 22:52:53 +00:00
2008-06-19 06:09:51 +00:00
2008-06-25 20:52:59 +00:00
2008-07-07 19:51:32 +00:00
2008-07-09 14:09:41 +00:00
2008-07-11 16:54:57 +00:00
2008-07-12 01:56:02 +00:00
2008-07-17 19:48:53 +00:00
2008-07-31 20:16:33 +00:00
2008-07-22 20:42:56 +00:00
2008-07-22 23:54:03 +00:00
2008-08-05 07:10:38 +00:00
2008-08-05 21:51:46 +00:00
2008-08-17 19:22:34 +00:00
2008-08-19 23:09:18 +00:00
2008-08-23 15:53:47 +00:00
2008-08-30 09:09:33 +00:00
2008-08-30 09:09:33 +00:00
2008-10-04 11:09:36 +00:00
2008-10-04 11:09:36 +00:00
2008-09-05 23:07:03 +00:00
2008-09-09 20:22:01 +00:00
2008-09-11 01:02:12 +00:00
2008-09-11 20:07:10 +00:00
2008-09-11 18:40:32 +00:00
2008-09-24 23:13:09 +00:00
2008-09-24 23:13:09 +00:00
2008-09-20 01:28:05 +00:00
2008-09-25 20:47:45 +00:00
2008-09-27 01:56:22 +00:00
2008-09-30 15:44:16 +00:00
2008-09-29 17:26:18 +00:00
2008-10-02 18:53:47 +00:00
2008-10-06 21:13:08 +00:00
2008-10-06 22:59:10 +00:00
2008-10-06 22:59:10 +00:00
2008-10-07 16:14:11 +00:00
2008-10-11 22:08:30 +00:00
2008-10-13 18:35:52 +00:00
2008-11-26 00:26:16 +00:00
2008-10-27 08:42:46 +00:00
2008-10-17 17:59:52 +00:00
2008-10-21 00:45:36 +00:00
2008-10-27 08:42:46 +00:00
2008-10-27 23:21:01 +00:00
2008-10-28 05:49:35 +00:00
2008-10-29 14:25:28 +00:00
2008-11-03 11:51:11 +00:00
2008-11-12 02:00:35 +00:00
2008-11-13 22:17:10 +00:00
2008-10-17 01:33:43 +00:00
2008-10-17 01:33:43 +00:00
2008-05-16 00:52:30 +00:00
2008-10-01 15:07:14 +00:00
2008-08-29 22:59:13 +00:00
2008-05-22 04:45:22 +00:00
2008-08-19 18:47:28 +00:00
2008-08-22 22:39:21 +00:00
2008-08-22 22:39:21 +00:00
2008-11-25 00:52:40 +00:00
2008-04-12 04:36:06 +00:00
2008-08-21 21:00:15 +00:00
2008-08-21 21:00:15 +00:00
2008-08-21 21:00:15 +00:00
2008-04-12 04:36:06 +00:00
2008-08-29 23:22:12 +00:00
2008-09-04 22:59:58 +00:00
2008-09-19 17:38:47 +00:00
2008-09-04 22:59:58 +00:00
2008-06-16 20:29:38 +00:00
2008-04-19 22:29:10 +00:00
2008-10-13 18:13:07 +00:00
2008-09-05 17:24:07 +00:00
2008-05-06 23:09:29 +00:00
2008-10-01 01:02:18 +00:00
2008-09-20 00:13:45 +00:00
2008-05-20 21:00:03 +00:00
2008-06-12 21:23:38 +00:00
2008-05-13 08:35:03 +00:00
2008-05-13 08:35:03 +00:00
2008-10-31 00:57:24 +00:00
2008-09-04 01:04:15 +00:00
2008-09-08 17:15:42 +00:00
2008-09-19 22:16:54 +00:00
2008-09-08 08:39:33 +00:00
2008-09-07 08:47:42 +00:00
2008-09-04 06:18:33 +00:00
2008-09-05 17:24:07 +00:00
2008-09-10 18:25:29 +00:00
2008-09-05 20:04:37 +00:00
2008-08-25 21:27:18 +00:00
2008-05-29 21:50:34 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-10-18 02:06:02 +00:00
2008-11-03 17:56:27 +00:00
2008-10-01 19:46:30 +00:00
2008-10-07 20:39:12 +00:00
2008-04-14 17:56:54 +00:00
2008-04-29 04:48:56 +00:00
2008-09-24 00:05:32 +00:00
2008-09-22 23:57:37 +00:00
2008-04-09 20:57:25 +00:00
2008-04-09 20:57:25 +00:00
2008-08-05 18:19:14 +00:00
2008-11-26 00:26:16 +00:00
2008-11-26 02:00:14 +00:00
2008-10-24 21:20:25 +00:00
2008-05-20 19:52:04 +00:00
2008-05-20 19:52:04 +00:00
2008-11-13 23:24:17 +00:00
2008-08-28 23:48:31 +00:00
2008-04-15 01:22:18 +00:00
2008-06-10 16:10:32 +00:00
2008-11-26 00:03:26 +00:00
2008-05-26 20:18:56 +00:00
2008-05-29 19:42:22 +00:00
2008-08-21 21:00:15 +00:00
2008-08-21 21:00:15 +00:00
2008-05-26 20:18:56 +00:00
2008-06-26 01:55:32 +00:00
2008-04-25 20:13:47 +00:00
2008-04-25 20:13:47 +00:00
2008-04-15 23:55:07 +00:00
2008-05-29 08:22:04 +00:00
2008-07-20 02:32:23 +00:00
2008-07-22 18:39:19 +00:00
2008-05-04 09:15:50 +00:00
2008-11-05 06:04:51 +00:00
2008-06-10 00:36:41 +00:00
2008-09-15 21:22:06 +00:00
2008-04-14 17:56:54 +00:00
2008-06-10 00:36:41 +00:00
2008-05-27 17:44:23 +00:00
2008-05-14 18:17:09 +00:00
2008-08-04 23:42:46 +00:00
2008-08-21 21:26:06 +00:00
2008-10-13 20:52:04 +00:00
2008-10-21 20:00:42 +00:00
2008-11-03 23:43:55 +00:00
2008-10-24 02:05:00 +00:00
2008-11-19 04:28:29 +00:00
2008-10-29 08:39:34 +00:00
2008-10-25 00:52:41 +00:00
2008-10-25 23:49:39 +00:00
2008-10-26 07:49:03 +00:00
2008-10-27 07:14:50 +00:00
2008-10-28 00:47:49 +00:00
2008-10-28 00:47:49 +00:00
2008-10-29 08:39:34 +00:00
2008-06-10 00:36:41 +00:00
2008-07-25 15:25:32 +00:00
2008-11-26 00:12:08 +00:00
2008-10-21 03:49:19 +00:00
2008-10-17 01:23:35 +00:00
2008-10-17 01:23:35 +00:00
2008-10-17 01:23:35 +00:00
2008-06-10 17:57:58 +00:00
2008-04-14 17:56:54 +00:00
2008-10-15 02:05:31 +00:00
2008-04-14 17:56:54 +00:00
2008-07-31 00:50:31 +00:00
2008-08-30 02:03:58 +00:00
2008-04-19 22:29:10 +00:00
2008-04-12 04:36:06 +00:00
2008-06-24 22:03:36 +00:00
2008-09-10 18:25:29 +00:00
2008-04-16 02:32:24 +00:00
2008-04-16 02:32:24 +00:00
2008-10-01 00:25:38 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-06-10 00:36:41 +00:00
2008-06-19 01:50:24 +00:00
2008-08-07 02:54:50 +00:00
2008-08-07 02:54:50 +00:00
2008-09-22 14:50:07 +00:00
2008-04-12 18:11:06 +00:00
2008-09-22 14:50:07 +00:00
2008-09-22 14:50:07 +00:00
2008-09-11 22:24:28 +00:00
2008-04-30 09:19:47 +00:00
2008-11-10 17:28:30 +00:00
2008-06-25 01:16:38 +00:00
2008-06-26 00:16:49 +00:00
2008-04-12 04:36:06 +00:00
2008-06-02 17:40:38 +00:00
2008-06-10 15:11:36 +00:00
2008-05-07 22:59:08 +00:00
2008-05-29 08:22:04 +00:00
2008-05-29 07:09:24 +00:00
2008-05-13 08:35:03 +00:00
2008-09-26 23:41:32 +00:00
2008-06-10 15:11:36 +00:00
2008-04-25 21:47:35 +00:00
2008-07-23 00:22:17 +00:00
2008-05-29 08:22:04 +00:00
2008-06-10 00:36:41 +00:00
2008-07-24 18:08:01 +00:00
2008-07-25 19:08:59 +00:00
2008-05-24 00:10:02 +00:00
2008-06-10 00:36:41 +00:00
2008-06-10 00:36:41 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-08 00:57:18 +00:00
2008-05-08 00:57:18 +00:00
2008-05-07 22:59:08 +00:00
2008-09-25 23:35:16 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-09 21:53:03 +00:00
2008-05-08 00:57:18 +00:00
2008-05-09 19:56:32 +00:00
2008-05-09 21:53:03 +00:00
2008-05-09 23:37:55 +00:00
2008-05-13 00:54:02 +00:00
2008-05-22 18:56:56 +00:00
2008-07-10 01:08:23 +00:00
2008-05-07 22:59:08 +00:00
2008-05-04 09:15:50 +00:00
2008-05-10 02:22:25 +00:00
2008-07-17 19:48:04 +00:00
2008-06-10 00:36:41 +00:00
2008-06-10 00:36:41 +00:00
2008-05-06 23:09:29 +00:00
2008-04-20 05:52:46 +00:00
2008-05-26 20:18:56 +00:00
2008-07-24 18:08:01 +00:00
2008-07-24 18:08:01 +00:00
2008-08-21 23:04:49 +00:00
2008-09-25 20:50:48 +00:00
2008-10-01 23:18:38 +00:00
2008-10-01 23:18:38 +00:00
2008-11-16 05:06:27 +00:00
2008-11-16 05:06:27 +00:00
2008-11-16 05:06:27 +00:00
2008-05-07 22:59:08 +00:00
2008-08-13 21:51:37 +00:00
2008-08-05 22:19:15 +00:00
2008-10-02 15:04:30 +00:00
2008-05-20 00:54:39 +00:00
2008-10-21 03:38:42 +00:00
2008-09-27 01:56:22 +00:00
2008-04-08 00:14:17 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-06-09 09:52:31 +00:00
2008-04-21 23:59:07 +00:00
2008-09-27 01:56:22 +00:00
2008-09-27 01:56:22 +00:00
2008-05-05 00:28:39 +00:00
2008-04-14 17:56:54 +00:00
2008-08-06 18:27:21 +00:00
2008-08-07 02:23:06 +00:00