Evan Cheng
48575f6ea7
Making use of VFP / NEON floating point multiply-accumulate / subtraction is
...
difficult on current ARM implementations for a few reasons.
1. Even though a single vmla has latency that is one cycle shorter than a pair
of vmul + vadd, a RAW hazard during the first (4? on Cortex-a8) can cause
additional pipeline stall. So it's frequently better to single codegen
vmul + vadd.
2. A vmla folowed by a vmul, vmadd, or vsub causes the second fp instruction to
stall for 4 cycles. We need to schedule them apart.
3. A vmla followed vmla is a special case. Obvious issuing back to back RAW
vmla + vmla is very bad. But this isn't ideal either:
vmul
vadd
vmla
Instead, we want to expand the second vmla:
vmla
vmul
vadd
Even with the 4 cycle vmul stall, the second sequence is still 2 cycles
faster.
Up to now, isel simply avoid codegen'ing fp vmla / vmls. This works well enough
but it isn't the optimial solution. This patch attempts to make it possible to
use vmla / vmls in cases where it is profitable.
A. Add missing isel predicates which cause vmla to be codegen'ed.
B. Make sure the fmul in (fadd (fmul)) has a single use. We don't want to
compute a fmul and a fmla.
C. Add additional isel checks for vmla, avoid cases where vmla is feeding into
fp instructions (except for the #3 exceptional case).
D. Add ARM hazard recognizer to model the vmla / vmls hazards.
E. Add a special pre-regalloc case to expand vmla / vmls when it's likely the
vmla / vmls will trigger one of the special hazards.
Work in progress, only A+B are enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120960 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-05 22:04:16 +00:00
..
2010-11-03 18:21:33 +00:00
2010-08-30 10:48:29 +00:00
2010-05-02 15:36:26 +00:00
2010-05-02 15:36:26 +00:00
2010-05-02 15:36:26 +00:00
2010-08-30 10:48:29 +00:00
2010-06-15 21:58:33 +00:00
2010-06-15 21:58:33 +00:00
2010-05-07 17:03:48 +00:00
2010-06-15 21:58:33 +00:00
2009-10-13 20:50:28 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-15 20:42:00 +00:00
2010-06-15 20:42:00 +00:00
2010-06-15 20:42:00 +00:00
2010-06-15 20:42:00 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-07-01 21:55:59 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2009-11-09 00:11:35 +00:00
2009-09-13 00:59:43 +00:00
2009-09-15 17:53:11 +00:00
2009-09-21 04:32:32 +00:00
2009-09-22 08:34:46 +00:00
2009-09-23 06:28:31 +00:00
2009-09-24 02:27:09 +00:00
2010-06-17 15:18:27 +00:00
2009-09-28 05:28:43 +00:00
2010-09-28 21:39:26 +00:00
2009-11-03 05:52:54 +00:00
2009-10-20 21:37:45 +00:00
2010-06-15 19:04:29 +00:00
2010-03-17 17:52:21 +00:00
2010-06-15 05:56:31 +00:00
2010-11-27 06:35:16 +00:00
2009-11-23 21:08:25 +00:00
2009-11-13 20:36:40 +00:00
2009-11-14 02:09:09 +00:00
2009-11-13 23:16:41 +00:00
2009-11-14 02:11:32 +00:00
2009-12-01 00:44:45 +00:00
2010-08-16 23:44:29 +00:00
2010-03-04 21:42:36 +00:00
2010-03-04 21:04:38 +00:00
2010-03-20 22:20:40 +00:00
2010-04-07 20:43:35 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-05-15 02:18:07 +00:00
2010-05-18 00:03:40 +00:00
2010-05-17 17:18:59 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-05-20 18:39:53 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-08-27 17:13:24 +00:00
2010-06-21 21:21:14 +00:00
2010-08-13 22:43:33 +00:00
2010-06-25 23:14:54 +00:00
2010-06-28 23:40:25 +00:00
2010-10-08 06:15:13 +00:00
2010-06-29 18:42:49 +00:00
2010-07-26 18:45:39 +00:00
2010-08-04 21:56:30 +00:00
2010-09-17 22:59:05 +00:00
2010-09-21 23:49:07 +00:00
2010-09-30 02:45:56 +00:00
2010-11-08 19:17:22 +00:00
2010-11-18 19:40:05 +00:00
2010-11-16 00:40:59 +00:00
2010-11-18 22:06:46 +00:00
2010-11-29 22:43:27 +00:00
2010-12-01 02:40:06 +00:00
2010-01-26 21:53:08 +00:00
2010-09-29 17:54:10 +00:00
2010-07-09 20:27:06 +00:00
2010-04-17 21:29:25 +00:00
2010-04-17 21:29:25 +00:00
2009-11-09 00:11:35 +00:00
2010-10-06 06:27:31 +00:00
2010-11-17 20:13:28 +00:00
2010-06-15 19:04:29 +00:00
2010-03-17 17:52:21 +00:00
2010-06-22 22:04:24 +00:00
2010-06-15 19:04:29 +00:00
2009-10-27 05:50:28 +00:00
2010-09-17 21:58:46 +00:00
2010-04-22 23:24:18 +00:00
2009-11-22 13:09:48 +00:00
2010-09-17 21:46:16 +00:00
2010-11-30 23:55:39 +00:00
2010-06-04 01:01:04 +00:00
2009-10-27 05:50:28 +00:00
2010-10-22 21:55:03 +00:00
2010-09-27 18:43:43 +00:00
2009-11-09 00:11:35 +00:00
2010-10-22 23:46:04 +00:00
2010-06-18 20:59:25 +00:00
2010-10-09 00:29:04 +00:00
2010-01-19 00:35:20 +00:00
2010-11-17 21:57:32 +00:00
2010-10-28 06:47:08 +00:00
2010-10-28 06:47:08 +00:00
2010-11-15 21:11:06 +00:00
2009-11-09 00:11:35 +00:00
2010-10-28 06:47:08 +00:00
2009-11-09 00:11:35 +00:00
2010-06-24 22:00:37 +00:00
2010-11-12 20:32:20 +00:00
2010-11-12 20:32:20 +00:00
2010-10-28 06:47:08 +00:00
2010-03-25 23:47:34 +00:00
2010-11-12 20:32:20 +00:00
2010-11-12 20:32:20 +00:00
2009-11-09 00:11:35 +00:00
2010-09-02 20:19:24 +00:00
2010-03-14 18:42:52 +00:00
2010-03-25 23:47:34 +00:00
2010-09-17 20:21:03 +00:00
2009-11-09 00:11:35 +00:00
2010-11-17 21:57:32 +00:00
2010-07-15 22:07:12 +00:00
2009-11-09 00:11:35 +00:00
2010-10-08 06:15:13 +00:00
2010-11-17 21:57:32 +00:00
2009-11-09 00:11:35 +00:00
2010-08-30 10:48:29 +00:00
2009-11-22 12:50:05 +00:00
2010-03-25 23:47:34 +00:00
2010-11-17 21:25:39 +00:00
2010-04-17 16:29:15 +00:00
2010-11-22 18:12:04 +00:00
2010-04-17 16:29:15 +00:00
2010-02-08 23:47:34 +00:00
2010-06-18 23:09:54 +00:00
2010-05-03 14:35:47 +00:00
2010-06-23 18:56:06 +00:00
2010-03-16 16:19:07 +00:00
2010-03-16 16:19:07 +00:00
2010-11-03 00:45:17 +00:00
2010-11-03 00:45:17 +00:00
2010-06-17 15:18:27 +00:00
2010-10-08 06:15:13 +00:00
2010-05-27 22:08:38 +00:00
2010-06-04 01:01:24 +00:00
2010-09-17 21:58:46 +00:00
2010-06-04 01:01:24 +00:00
2009-10-27 06:16:45 +00:00
2010-03-17 17:52:21 +00:00
2010-11-01 20:41:43 +00:00
2010-09-17 20:27:26 +00:00
2010-11-02 17:35:25 +00:00
2010-11-12 20:32:20 +00:00
2010-06-04 23:28:13 +00:00
2009-11-22 11:45:44 +00:00
2009-11-24 00:44:37 +00:00
2009-10-21 08:15:52 +00:00
2010-09-17 21:58:46 +00:00
2010-11-02 23:01:44 +00:00
2009-11-09 00:11:35 +00:00
2009-11-09 00:11:35 +00:00
2010-02-24 22:15:53 +00:00
2010-10-22 22:04:28 +00:00
2010-11-04 05:19:35 +00:00
2010-01-05 17:55:26 +00:00
2010-12-05 22:04:16 +00:00
2010-10-22 21:55:03 +00:00
2010-04-15 05:28:43 +00:00
2010-11-17 20:13:28 +00:00
2010-11-13 02:25:14 +00:00
2010-11-17 21:57:32 +00:00
2010-10-28 06:47:08 +00:00
2010-10-08 06:15:13 +00:00
2010-09-17 22:36:38 +00:00
2009-10-27 06:16:45 +00:00
2010-11-18 19:40:05 +00:00
2010-07-14 17:45:16 +00:00
2010-08-30 23:41:49 +00:00
2010-01-05 17:55:26 +00:00
2010-03-17 17:52:21 +00:00
2010-06-17 15:18:27 +00:00
2010-09-28 04:09:35 +00:00
2010-07-11 04:01:49 +00:00
2010-09-03 01:35:08 +00:00
2010-09-03 01:35:08 +00:00
2009-10-09 20:20:54 +00:00
2010-08-29 05:57:34 +00:00
2009-09-24 20:23:02 +00:00
2010-11-29 22:39:38 +00:00
2010-11-08 23:21:22 +00:00
2010-11-08 23:21:22 +00:00
2010-11-08 23:21:22 +00:00
2009-10-09 20:20:54 +00:00
2009-10-09 20:20:54 +00:00
2010-07-14 01:22:12 +00:00
2010-08-17 05:54:34 +00:00
2009-09-15 20:58:02 +00:00
2009-11-09 00:11:35 +00:00
2010-11-03 16:24:53 +00:00
2009-10-09 20:20:54 +00:00
2009-09-15 20:58:02 +00:00
2009-10-07 20:51:42 +00:00
2010-10-08 06:15:13 +00:00
2010-10-08 06:15:13 +00:00
2010-10-08 06:15:13 +00:00
2010-10-08 06:15:13 +00:00
2010-11-30 00:00:35 +00:00
2010-11-03 16:24:53 +00:00
2009-10-09 20:20:54 +00:00
2010-10-29 22:03:02 +00:00
2010-09-01 23:50:19 +00:00
2010-11-01 18:31:39 +00:00
2010-11-23 19:38:38 +00:00
2010-05-03 22:36:46 +00:00
2009-10-08 06:02:10 +00:00
2009-10-09 20:20:54 +00:00
2009-10-09 20:20:54 +00:00
2009-10-08 22:33:53 +00:00
2009-10-09 20:20:54 +00:00
2009-10-09 20:20:54 +00:00
2009-10-09 20:20:54 +00:00
2009-10-08 22:33:53 +00:00
2009-10-09 20:20:54 +00:00
2010-10-27 20:38:28 +00:00
2009-10-09 20:20:54 +00:00
2009-10-09 05:14:48 +00:00
2009-10-09 20:20:54 +00:00
2009-10-09 05:14:48 +00:00
2009-10-09 20:20:54 +00:00
2009-10-09 05:14:48 +00:00
2010-10-08 06:15:13 +00:00
2010-10-08 06:15:13 +00:00
2010-09-23 23:42:37 +00:00
2010-10-08 06:15:13 +00:00
2010-11-03 16:24:53 +00:00
2010-08-29 05:57:34 +00:00
2009-10-06 21:16:19 +00:00
2010-08-17 05:54:34 +00:00
2010-08-17 05:54:34 +00:00
2010-08-17 05:54:34 +00:00