Tim Northover
dc0c75dcb1
ARM: sink atomic release barrier as far as possible into cmpxchg.
...
DMB instructions can be expensive, so it's best to avoid them if possible. In
atomicrmw operations there will always be an attempted store so a release
barrier is always needed, but in the cmpxchg case we can delay the DMB until we
know we'll definitely try to perform a store (and so need release semantics).
In the strong cmpxchg case this isn't quite free: we must duplicate the LDREX
instructions to skip the barrier on subsequent iterations. The basic outline
becomes:
ldrex rOld, [rAddr]
cmp rOld, rDesired
bne Ldone
dmb
Lloop:
strex rRes, rNew, [rAddr]
cbz rRes Ldone
ldrex rOld, [rAddr]
cmp rOld, rDesired
beq Lloop
Ldone:
So we'll skip this version for strong operations in "minsize" functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261568 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-22 20:55:50 +00:00
..
2016-02-20 00:32:29 +00:00
2015-07-21 01:42: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-04-16 23:24:18 +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-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-11-19 05:56:52 +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-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-06-17 20:52:32 +00:00
2015-08-28 20:26:49 +00:00
2015-04-16 23:24:18 +00:00
2015-08-28 20:26:49 +00:00
2015-04-16 23:24:18 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-04-16 23:24:18 +00:00
2015-09-11 03:22:04 +00:00
2015-08-28 20:26:49 +00:00
2015-09-30 10:56:37 +00:00
2015-06-17 20:52:32 +00:00
2015-06-17 20:52:32 +00:00
2016-01-15 00:46:17 +00:00
2015-04-18 01:21:58 +00:00
2015-11-05 22:03:56 +00:00
2015-11-19 05:56:52 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-06-17 20:52:32 +00:00
2015-08-11 15:48:04 +00:00
2015-11-05 22:03:56 +00:00
2015-09-30 10:56:37 +00:00
2015-04-16 23:24:18 +00:00
2015-11-19 05:56:52 +00:00
2015-11-19 05:56:52 +00:00
2015-06-17 20:52:32 +00:00
2015-09-30 10:56:37 +00:00
2015-11-19 05:56:52 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-09-06 05:42:13 +00:00
2015-04-23 20:31:26 +00:00
2015-04-16 23:24:18 +00:00
2015-04-23 20:31:26 +00:00
2015-07-21 00:18:59 +00:00
2015-07-10 18:08:49 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-06-17 20:52:32 +00:00
2015-07-17 23:18:30 +00:00
2015-09-11 03:22:04 +00:00
2015-08-17 22:36:27 +00:00
2016-01-26 00:03:25 +00:00
2015-10-30 16:29:44 +00:00
2015-04-16 23:24:18 +00:00
2015-04-28 22:03:55 +00:00
2015-04-16 23:24:18 +00:00
2015-11-09 12:40:30 +00:00
2015-12-09 01:19:50 +00:00
2015-07-14 17:17:13 +00:00
2015-12-15 03:28:11 +00:00
2015-10-15 00:41:26 +00:00
2015-06-17 20:52:32 +00:00
2016-02-22 20:55:50 +00:00
2015-09-22 17:22:58 +00:00
2015-09-26 00:14:02 +00:00
2016-02-22 20:55:50 +00:00
2015-09-22 17:22:58 +00:00
2015-07-17 23:18:30 +00:00
2015-11-16 10:49:25 +00:00
2015-06-17 20:52:32 +00:00
2016-01-08 18:43:41 +00:00
2016-01-25 11:26:11 +00:00
2015-12-07 14:22:39 +00:00
2015-12-07 14:22:39 +00:00
2015-12-07 14:22:39 +00:00
2015-12-07 14:22:39 +00:00
2015-12-07 14:22:39 +00:00
2016-02-02 09:28:20 +00:00
2015-04-16 23:24:18 +00:00
2016-01-26 00:03:25 +00:00
2015-07-21 00:18:59 +00:00
2015-04-16 23:24:18 +00:00
2015-11-18 00:40:54 +00:00
2016-01-28 18:59:04 +00:00
2015-10-28 22:56:36 +00:00
2016-02-22 20:55:50 +00:00
2016-02-22 20:55:50 +00:00
2015-11-05 22:03:56 +00:00
2015-09-30 10:56:37 +00:00
2015-04-30 23:57:47 +00:00
2015-12-04 01:53:14 +00:00
2015-04-16 23:24:18 +00:00
2015-12-08 02:37:48 +00:00
2015-11-19 05:56:52 +00:00
2015-06-17 20:52:32 +00:00
2016-01-15 21:56:40 +00:00
2015-07-13 15:37:30 +00:00
2015-07-13 15:37:30 +00:00
2016-01-15 20:24:11 +00:00
2015-09-30 10:56:37 +00:00
2016-01-07 09:03:03 +00:00
2015-06-17 20:52:32 +00:00
2015-11-05 22:03:56 +00:00
2015-12-08 19:59:01 +00:00
2015-11-17 16:01:28 +00:00
2015-12-19 03:32:23 +00:00
2015-11-17 16:01:28 +00:00
2015-11-05 22:03:56 +00:00
2015-11-05 22:03:56 +00:00
2015-11-05 22:03:56 +00:00
2015-11-05 22:03:56 +00:00
2015-11-05 22:03:56 +00:00
2015-11-05 22:03:56 +00:00
2016-01-29 10:23:32 +00:00
2015-05-23 01:14:08 +00:00
2015-06-09 23:33:25 +00:00
2015-08-24 09:17:18 +00:00
2016-02-03 16:10:54 +00:00
2015-06-17 20:52:32 +00:00
2015-11-19 05:56:52 +00:00
2015-06-17 20:52:32 +00:00
2016-01-27 19:32:29 +00:00
2015-06-17 20:52:32 +00:00
2016-01-26 00:03:25 +00:00
2016-01-26 00:03:25 +00:00
2015-06-17 20:52:32 +00:00
2015-07-28 16:24:05 +00:00
2016-01-26 00:03:25 +00:00
2016-01-13 23:56:37 +00:00
2016-01-13 00:03:35 +00:00
2015-07-28 22:44:28 +00:00
2015-07-07 06:54:42 +00:00
2015-09-18 20:08:18 +00:00
2015-11-19 05:56:52 +00:00
2015-07-16 00:58:23 +00:00
2015-10-26 20:49:49 +00:00
2015-05-09 00:51:03 +00:00
2015-05-06 04:14:02 +00:00
2015-05-06 22:09:29 +00:00
2015-07-07 06:54:42 +00:00
2015-05-08 20:46:54 +00:00
2015-05-06 16:39:17 +00:00
2015-04-16 23:24:18 +00:00
2016-01-15 10:26:17 +00:00
2015-04-16 23:24:18 +00:00
2015-07-03 08:21:38 +00:00
2015-11-18 00:40:54 +00:00
2016-01-08 17:46:05 +00:00
2015-11-09 11:03:18 +00:00
2016-01-08 17:46:05 +00:00
2016-01-14 19:45:36 +00:00
2015-08-29 11:50:08 +00:00
2015-08-21 10:48:17 +00:00
2015-04-16 23:24:18 +00:00
2015-08-11 15:48:04 +00:00
2015-05-12 16:47:30 +00:00
2015-08-12 15:05:39 +00:00
2015-06-17 20:52:32 +00:00
2016-01-26 00:03:25 +00:00
2015-06-17 20:52:32 +00:00
2015-05-14 01:00:51 +00:00
2016-02-17 16:35:18 +00:00
2015-04-23 16:45:24 +00:00
2015-09-18 18:19:40 +00:00
2015-11-18 00:40:54 +00:00
2015-11-18 00:40:54 +00:00
2015-11-18 00:40:54 +00:00
2015-12-01 05:29:22 +00:00
2015-12-01 05:29:22 +00:00
2015-06-08 18:50:43 +00:00
2015-05-06 22:51:04 +00:00
2015-12-01 05:29:22 +00:00
2015-05-05 22:09:41 +00:00
2015-04-16 23:24:18 +00:00
2016-01-08 00:34:44 +00:00
2016-01-08 00:34:44 +00:00
2015-11-18 02:49:19 +00:00
2015-04-23 20:31:26 +00:00
2015-06-17 20:52:32 +00:00
2015-05-31 19:22:07 +00:00
2015-09-01 01:42:16 +00:00
2015-05-31 19:22:07 +00:00
2015-10-05 14:49:54 +00:00
2016-02-17 16:35:18 +00:00
2015-10-22 01:48:57 +00:00
2016-01-15 10:26:51 +00:00
2015-09-03 16:49:18 +00:00
2015-10-26 18:23:16 +00:00
2015-10-05 14:49:54 +00:00
2015-08-13 10:48:22 +00:00
2015-11-19 05:56:52 +00:00
2015-08-21 21:52:48 +00:00
2015-11-19 05:56:52 +00:00
2015-10-05 14:49:54 +00:00
2016-01-26 00:03:25 +00:00
2015-11-19 05:56:52 +00:00
2015-08-19 14:11:27 +00:00
2016-01-15 10:25:14 +00:00
2015-06-01 12:02:47 +00:00
2015-06-01 12:02:47 +00:00
2015-08-17 19:37:12 +00:00
2015-09-30 10:56:37 +00:00
2015-11-17 13:21:35 +00:00
2015-07-24 09:31:48 +00:00
2015-04-16 23:24:18 +00:00
2015-03-26 18:29:02 +00:00
2015-07-12 18:16:40 +00:00
2015-03-20 20:00:01 +00:00
2015-05-20 21:40:38 +00:00
2015-05-20 21:40:38 +00:00
2015-04-16 23:24:18 +00:00
2015-09-30 10:56:37 +00:00
2015-10-26 10:04:52 +00:00
2015-12-17 01:29:08 +00:00
2016-02-19 03:13:40 +00:00
2016-01-26 00:03:25 +00:00
2015-03-27 23:41:42 +00:00
2015-11-13 16:05:22 +00:00
2015-09-30 10:56:37 +00:00
2015-04-03 00:18:38 +00:00
2015-10-27 10:25:20 +00:00
2015-12-20 06:41:44 +00:00
2015-03-27 06:10:13 +00:00
2015-07-16 22:34:16 +00:00
2016-01-29 19:18:46 +00:00
2015-09-18 18:19:40 +00:00
2016-01-27 19:32:29 +00:00
2015-08-29 10:49:11 +00:00
2015-06-01 12:02:47 +00:00
2015-08-05 11:02:14 +00:00
2016-01-25 11:25:36 +00:00
2016-01-25 11:25:36 +00:00
2015-06-01 12:02:47 +00:00
2015-09-30 10:56:37 +00:00
2015-12-20 06:41:44 +00:00
2015-12-20 06:41:44 +00:00
2015-03-17 18:20:47 +00:00
2015-11-19 05:56:52 +00:00
2015-04-16 23:24:18 +00:00
2015-03-26 22:11:00 +00:00
2015-11-19 05:56:52 +00:00
2015-07-07 14:45:12 +00:00
2015-07-16 00:58:23 +00:00
2015-04-30 22:15:59 +00:00
2015-05-07 21:48:26 +00:00
2015-12-01 05:29:22 +00:00
2015-12-15 10:10:40 +00:00
2015-09-18 18:19:40 +00:00
2015-11-30 20:37:58 +00:00
2016-02-19 00:18:46 +00:00
2015-08-03 09:24:48 +00:00
2015-04-30 23:14:14 +00:00
2015-08-31 21:10:35 +00:00
2016-01-26 00:03:25 +00:00
2015-05-01 00:45:55 +00:00
2016-01-26 00:03:25 +00:00
2016-01-26 00:03:25 +00:00
2016-01-29 10:23:32 +00:00
2016-02-17 16:35:18 +00:00
2015-04-16 23:24:18 +00:00
2015-10-26 21:32:53 +00:00
2015-07-28 22:44:28 +00:00
2015-12-20 06:41:44 +00:00
2015-12-20 06:41:44 +00:00
2015-10-28 22:56:36 +00:00
2015-10-28 22:51:16 +00:00
2015-10-28 22:51:16 +00:00
2015-04-16 23:24:18 +00:00
2015-09-30 10:56:37 +00:00
2015-09-24 08:36:14 +00:00
2015-10-06 17:54:12 +00:00
2015-03-31 10:20:58 +00:00
2015-10-07 17:28:58 +00:00
2015-09-01 21:56:00 +00:00
2015-09-30 10:56:37 +00:00
2015-07-17 23:18:30 +00:00
2015-04-16 23:24:18 +00:00
2015-07-17 23:18:30 +00:00
2015-09-01 11:12:35 +00:00
2015-05-12 01:26:05 +00:00
2015-10-28 22:56:36 +00:00
2015-11-05 22:03:56 +00:00
2015-04-16 23:24:18 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-08-13 17:28:16 +00:00
2015-08-17 07:13:10 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-01 11:12:35 +00:00
2015-11-17 17:25:15 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-30 10:56:37 +00:00
2015-09-24 08:36:14 +00:00
2015-09-24 08:36:14 +00:00
2015-09-24 08:36:14 +00:00
2015-04-16 23:24:18 +00:00
2015-07-21 00:18:59 +00:00
2016-01-13 00:02:40 +00:00