Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Reverting lower kernel calls #33

Closed
wants to merge 356 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
356 commits
Select commit Hold shift + click to select a range
377f847
Merge branch amd-master into amd-common
Sep 17, 2016
f392eae
Merge branch amd-master into amd-common
Sep 17, 2016
5cefb53
Merge branch amd-master into amd-common
Sep 18, 2016
ceff0c0
Merge branch amd-master into amd-common
Sep 18, 2016
7c69540
Merge branch amd-master into amd-common
Sep 18, 2016
f99a8ff
Merge branch amd-master into amd-common
Sep 18, 2016
a5b2c44
Merge branch amd-master into amd-common
Sep 18, 2016
40a63f9
Merge branch amd-master into amd-common
Sep 18, 2016
b7083ad
Merge branch amd-master into amd-common
Sep 19, 2016
a9701d5
Merge branch amd-master into amd-common
Sep 19, 2016
d3f033f
Merge branch amd-master into amd-common
Sep 19, 2016
d42cce2
Merge branch amd-master into amd-common
Sep 19, 2016
3964ec7
Merge branch amd-master into amd-common
Sep 19, 2016
60e2cfd
Merge branch amd-master into amd-common
Sep 19, 2016
b4516f4
Merge branch amd-master into amd-common
Sep 20, 2016
a9ae212
Merge branch amd-master into amd-common
Sep 20, 2016
f500a9c
Merge branch amd-master into amd-common
Sep 20, 2016
b788a28
Merge branch amd-master into amd-common
Sep 20, 2016
c827c7f
Merge branch amd-master into amd-common
Sep 21, 2016
b732161
Merge branch amd-master into amd-common
Sep 21, 2016
73b0400
Merge branch amd-master into amd-common
Sep 21, 2016
ef1f988
Merge branch amd-master into amd-common
Sep 21, 2016
c44533e
Merge branch amd-master into amd-common
Sep 21, 2016
72de7cc
Merge branch amd-master into amd-common
Sep 22, 2016
27abb85
Merge branch amd-master into amd-common
Sep 22, 2016
66be79f
Merge branch amd-master into amd-common
Sep 22, 2016
c88332b
AMDGPUOCL12Adapter: Do not set SPIR_FUNC calling convention. (#10)
nhaustov Sep 22, 2016
103d6db
AMDGPUPrintfRuntimeBinding: Do not set SPIR_FUNC calling convention. …
nhaustov Sep 22, 2016
a6a535a
[ValueTracking] Fix crash in GetPointerBaseWithConstantOffset()
tstellarAMD Sep 20, 2016
6860c9e
[Loads] Fix crash in is isDereferenceableAndAlignedPointer()
tstellarAMD Sep 20, 2016
765a13e
Merge branch amd-master into amd-common
Sep 22, 2016
81d8ce9
Merge branch amd-master into amd-common
Sep 23, 2016
90ab192
Merge pull request #12 from RadeonOpenCompute/addrspacecast-fixes
tstellarAMD Sep 23, 2016
649d5b7
Merge branch amd-master into amd-common
Sep 23, 2016
c31bbcb
Merge branch amd-master into amd-common
Sep 23, 2016
624a5af
Merge branch amd-master into amd-common
Sep 23, 2016
9e8ba7f
Merge branch amd-master into amd-common
Sep 23, 2016
4d46022
Merge branch amd-master into amd-common
Sep 23, 2016
22c9f71
Merge branch 'amd-master' into amd-common
kzhuravl Sep 26, 2016
4052505
Purge warnings in in AMDGPUConvertAtomicLibCalls and AMDGPUOCL12Adapter
kzhuravl Sep 26, 2016
0f35c0e
Merge pull request #14 from kzhuravl/kzhuravl-common
kzhuravl Sep 27, 2016
b0bf484
Merge branch amd-master into amd-common
Sep 27, 2016
6fb3ae5
Merge branch amd-master into amd-common
Sep 27, 2016
16831e0
Merge branch amd-master into amd-common
Sep 28, 2016
55a7aa8
Bring AMDGPU memory model related bits in sync with phabricator reviews
kzhuravl Sep 28, 2016
91af6f4
Merge pull request #15 from kzhuravl/kzhuravl-common
kzhuravl Sep 28, 2016
7180520
Resolve merge conflicts: Merge branch 'amd-master' into kzhuravl-common
kzhuravl Sep 29, 2016
0eeff74
Revert "Don't look through addrspacecast in GetPointerBaseWithConstan…
kzhuravl Sep 29, 2016
7cd8c1f
Merge branch amd-master into amd-common
Sep 29, 2016
751b6ae
Merge branch amd-master into amd-common
Sep 29, 2016
079f4cd
Merge branch amd-master into amd-common
Sep 30, 2016
eba6328
Merge branch amd-master into amd-common
Sep 30, 2016
99cd8b9
Merge branch amd-master into amd-common
Sep 30, 2016
3f6b95f
Merge branch amd-master into amd-common
Sep 30, 2016
4ef3b24
Merge branch amd-master into amd-common
Sep 30, 2016
21dbd11
Merge branch 'amd-master' into kzhuravl-common
kzhuravl Oct 3, 2016
c38fe1f
Use StringRef in getPassName (NFC)
kzhuravl Oct 3, 2016
c51b14b
Merge branch amd-master into amd-common
Oct 3, 2016
cc6abf7
Merge branch amd-master into amd-common
Oct 3, 2016
c0e6b4d
Merge branch amd-master into amd-common
Oct 3, 2016
0c4f641
Merge branch amd-master into amd-common
Oct 3, 2016
6d5e780
Resolve merge conflict (10/03/16)
kzhuravl Oct 3, 2016
bd7df68
Merge branch amd-master into amd-common
Oct 4, 2016
4d112b5
Merge branch amd-master into amd-common
Oct 4, 2016
5c54f92
Merge branch amd-master into amd-common
Oct 4, 2016
f085163
Merge branch amd-master into amd-common
Oct 4, 2016
465b1da
Merge branch amd-master into amd-common
Oct 4, 2016
17d3575
Merge branch amd-master into amd-common
Oct 4, 2016
4cacb49
Merge branch amd-master into amd-common
Oct 5, 2016
600533b
Merge branch amd-master into amd-common
Oct 5, 2016
0ddefb0
Merge branch amd-master into amd-common
Oct 5, 2016
2d69635
Merge branch amd-master into amd-common
Oct 6, 2016
196afe4
Merge branch amd-master into amd-common
Oct 6, 2016
42f8979
Merge branch amd-master into amd-common
Oct 6, 2016
9c9768f
Merge branch amd-master into amd-common
Oct 7, 2016
07badef
Merge branch amd-master into amd-common
Oct 7, 2016
98e37f1
Merge branch amd-master into amd-common
Oct 7, 2016
ad78dcf
Merge branch amd-master into amd-common
Oct 7, 2016
5a40c25
Merge branch amd-master into amd-common
Oct 7, 2016
454372d
AMDGPU/SI: Emit long branch when branch size is >= 15 bits
tstellarAMD Oct 7, 2016
290e2ab
Merge pull request #22 from RadeonOpenCompute/amd-common-long-branch
tstellarAMD Oct 7, 2016
fef1054
Merge branch amd-master into amd-common
Oct 8, 2016
46dab39
Merge branch amd-master into amd-common
Oct 8, 2016
bf4d7fa
Merge branch amd-master into amd-common
Oct 8, 2016
08db06f
Merge branch amd-master into amd-common
Oct 8, 2016
64ae056
Merge branch amd-master into amd-common
Oct 9, 2016
fbe891d
Merge branch amd-master into amd-common
Oct 9, 2016
56eadb9
Merge branch amd-master into amd-common
Oct 9, 2016
e60c84c
Merge branch amd-master into amd-common
Oct 9, 2016
a209ba8
Merge branch amd-master into amd-common
Oct 9, 2016
f527c9c
Merge branch amd-master into amd-common
Oct 10, 2016
dac0c22
Merge branch amd-master into amd-common
Oct 10, 2016
a745043
Merge branch amd-master into amd-common
Oct 10, 2016
3af0d9e
Merge branch amd-master into amd-common
Oct 10, 2016
2774777
Merge branch amd-master into amd-common
Oct 10, 2016
e540ace
Merge branch amd-master into amd-common
Oct 11, 2016
d20ac01
Merge branch amd-master into amd-common
Oct 11, 2016
cc8eb58
Merge branch amd-master into amd-common
Oct 11, 2016
311e2e5
Merge branch amd-master into amd-common
Oct 11, 2016
a860421
Merge branch amd-master into amd-common
Oct 12, 2016
e489815
Merge branch amd-master into amd-common
Oct 12, 2016
edd5d11
Merge branch amd-master into amd-common
Oct 12, 2016
6adbb16
Merge branch amd-master into amd-common
Oct 12, 2016
46d94ec
Merge branch amd-master into amd-common
Oct 12, 2016
913b302
Merge branch amd-master into amd-common
Oct 13, 2016
27d8190
Merge branch amd-master into amd-common
Oct 13, 2016
5b890e9
Merge branch amd-master into amd-common
Oct 13, 2016
dca2294
Merge branch amd-master into amd-common
Oct 13, 2016
01649e6
SWDEV-104457 unreachable in conversion test. OCL 1.2 builtin wrapper …
alex-t Oct 13, 2016
1d3883f
Merge branch amd-master into amd-common
Oct 13, 2016
426c039
Merge pull request #23 from alex-t/amd-common
tstellarAMD Oct 14, 2016
40ca6b0
AMDGPU: Fix lit test broken by previous commit
tstellarAMD Oct 14, 2016
8a87ff9
Merge branch amd-master into amd-common
Oct 14, 2016
5b7c598
Merge branch amd-master into amd-common
Oct 14, 2016
8ab6125
Merge branch amd-master into amd-common
Oct 15, 2016
a4e4561
Merge branch amd-master into amd-common
Oct 15, 2016
70a500a
Merge branch amd-master into amd-common
Oct 15, 2016
956508a
Merge branch amd-master into amd-common
Oct 15, 2016
9b6e89d
Merge branch amd-master into amd-common
Oct 15, 2016
e6e34cb
Resolve merge conflict (10/15/16)
kzhuravl Oct 16, 2016
6be428a
Merge branch amd-master into amd-common
Oct 16, 2016
8cd8856
Merge branch amd-master into amd-common
Oct 16, 2016
8f300ee
Merge branch amd-master into amd-common
Oct 17, 2016
2bb42bc
Merge branch amd-master into amd-common
Oct 17, 2016
e6c3dab
Merge branch amd-master into amd-common
Oct 17, 2016
694b76e
Merge branch amd-master into amd-common
Oct 17, 2016
4d35bc9
Merge branch amd-master into amd-common
Oct 17, 2016
98b1ffc
Merge branch amd-master into amd-common
Oct 17, 2016
5ef49b2
Merge branch amd-master into amd-common
Oct 18, 2016
11c6ff0
Merge branch amd-master into amd-common
Oct 18, 2016
596a6fe
Merge branch amd-master into amd-common
Oct 18, 2016
074d151
Merge branch amd-master into amd-common
Oct 18, 2016
f2e7f03
Merge branch amd-master into amd-common
Oct 18, 2016
0ef8a89
Merge branch amd-master into amd-common
Oct 18, 2016
01da8a2
Merge branch amd-master into amd-common
Oct 19, 2016
ef9d604
Merge branch amd-master into amd-common
Oct 19, 2016
ff5b3ce
Merge branch amd-master into amd-common
Oct 19, 2016
1d024c4
Merge branch amd-master into amd-common
Oct 20, 2016
5eced9f
Merge branch amd-master into amd-common
Oct 20, 2016
3de9f44
Merge branch amd-master into amd-common
Oct 20, 2016
74c940b
Merge branch amd-master into amd-common
Oct 20, 2016
f1c21be
Merge branch amd-master into amd-common
Oct 21, 2016
486ab75
Merge branch amd-master into amd-common
Oct 21, 2016
84ea5b5
Merge branch amd-master into amd-common
Oct 21, 2016
32d16b8
[AMDGPU][MemoryModel] Use getOrdering() instead of getSuccessOrdering…
kzhuravl Oct 21, 2016
be87e4f
Merge pull request #26 from kzhuravl/kzhuravl-common
kzhuravl Oct 21, 2016
dd497ec
Merge branch amd-master into amd-common
Oct 21, 2016
d1cfa99
Merge branch amd-master into amd-common
Oct 21, 2016
34aaa59
Merge branch amd-master into amd-common
Oct 21, 2016
f8722ac
Merge branch amd-master into amd-common
Oct 22, 2016
8d0a33e
Merge branch amd-master into amd-common
Oct 22, 2016
44f9dc1
Merge branch amd-master into amd-common
Oct 22, 2016
e7ddd7d
Merge branch amd-master into amd-common
Oct 22, 2016
1aa63f1
Merge branch amd-master into amd-common
Oct 22, 2016
0cda801
Merge branch amd-master into amd-common
Oct 22, 2016
b88217a
Merge branch amd-master into amd-common
Oct 23, 2016
a923842
Merge branch amd-master into amd-common
Oct 23, 2016
bdd9f19
Merge branch amd-master into amd-common
Oct 23, 2016
ea5298f
Merge branch amd-master into amd-common
Oct 24, 2016
e7983cc
Merge branch amd-master into amd-common
Oct 24, 2016
03203cb
Merge branch amd-master into amd-common
Oct 24, 2016
d88d70c
Merge branch amd-master into amd-common
Oct 24, 2016
77f0338
Merge branch amd-master into amd-common
Oct 25, 2016
09a0c9f
Merge branch amd-master into amd-common
Oct 25, 2016
5cf6fbb
Merge branch amd-master into amd-common
Oct 25, 2016
279b6c2
Merge branch amd-master into amd-common
Oct 25, 2016
e915fd7
Merge branch amd-master into amd-common
Oct 25, 2016
e929c87
Merge branch amd-master into amd-common
Oct 26, 2016
a28b31b
Merge branch amd-master into amd-common
Oct 26, 2016
3c72b23
Merge branch amd-master into amd-common
Oct 26, 2016
6c8f60c
Merge branch amd-master into amd-common
Oct 26, 2016
3590fe1
Merge branch amd-master into amd-common
Oct 26, 2016
bb5b46f
Merge branch amd-master into amd-common
Oct 27, 2016
b762286
Merge branch amd-master into amd-common
Oct 27, 2016
95cf1a6
Merge branch amd-master into amd-common
Oct 27, 2016
d253198
Merge branch amd-master into amd-common
Oct 27, 2016
e63092d
Merge branch amd-master into amd-common
Oct 27, 2016
2efb44b
Merge branch amd-master into amd-common
Oct 28, 2016
6176eb5
Merge branch amd-master into amd-common
Oct 28, 2016
dcadb4c
Merge branch amd-master into amd-common
Oct 28, 2016
179d21c
Merge branch 'amd-master' into amd-common
tstellarAMD Oct 31, 2016
0ec0c9e
Merge branch amd-master into amd-common
Oct 31, 2016
78da1a3
Merge branch amd-master into amd-common
Nov 1, 2016
39bb1a2
Merge branch amd-master into amd-common
Nov 1, 2016
5f310ca
Merge branch amd-master into amd-common
Nov 1, 2016
26346f2
Merge branch amd-master into amd-common
Nov 1, 2016
6cbdefc
Merge branch amd-master into amd-common
Nov 2, 2016
9c1b6ea
Merge branch amd-master into amd-common
Nov 2, 2016
566d015
Merge branch amd-master into amd-common
Nov 2, 2016
0035c3a
Merge branch amd-master into amd-common
Nov 2, 2016
6928668
Merge branch amd-master into amd-common
Nov 3, 2016
1cf2370
Merge branch amd-master into amd-common
Nov 3, 2016
3b759e8
Merge branch amd-master into amd-common
Nov 3, 2016
a004f52
Merge branch amd-master into amd-common
Nov 3, 2016
e5ded1b
Merge branch amd-master into amd-common
Nov 3, 2016
c7f7b7f
Merge branch amd-master into amd-common
Nov 4, 2016
e08b732
Merge branch amd-master into amd-common
Nov 4, 2016
3d2f1ea
Merge branch amd-master into amd-common
Nov 4, 2016
99fef37
Merge branch amd-master into amd-common
Nov 5, 2016
8af162a
Merge branch amd-master into amd-common
Nov 5, 2016
16a7e2d
Merge branch amd-master into amd-common
Nov 5, 2016
22e2a6e
Merge branch amd-master into amd-common
Nov 6, 2016
34f05e4
Merge branch amd-master into amd-common
Nov 7, 2016
84a1c32
Code object disassembler (#29)
Nov 7, 2016
5e8e688
Merge branch amd-master into amd-common
Nov 8, 2016
0e8c4cb
Merge branch amd-master into amd-common
Nov 8, 2016
176871c
Merge branch amd-master into amd-common
Nov 8, 2016
477eea3
Merge branch amd-master into amd-common
Nov 9, 2016
592c3be
Merge branch amd-master into amd-common
Nov 9, 2016
76b2577
Merge branch amd-master into amd-common
Nov 9, 2016
cd9e7bc
Merge branch amd-master into amd-common
Nov 9, 2016
0cac489
Merge branch amd-master into amd-common
Nov 10, 2016
8407dc0
Merge branch amd-master into amd-common
Nov 10, 2016
e1a40e8
Merge branch amd-master into amd-common
Nov 10, 2016
0af769f
Merge branch amd-master into amd-common
Nov 10, 2016
ac4dcd4
Merge branch amd-master into amd-common
Nov 11, 2016
a91b89c
Merge branch amd-master into amd-common
Nov 12, 2016
e96b9d9
Merge branch amd-master into amd-common
Nov 12, 2016
60c103f
Merge branch amd-master into amd-common
Nov 12, 2016
57f1189
Merge branch amd-master into amd-common
Nov 12, 2016
a9a4c6b
Merge branch amd-master into amd-common
Nov 12, 2016
145e844
Merge branch amd-master into amd-common
Nov 12, 2016
9e60498
Merge branch amd-master into amd-common
Nov 13, 2016
da1aac8
Merge branch amd-master into amd-common
Nov 13, 2016
5c3e0fd
Merge branch amd-master into amd-common
Nov 13, 2016
6a1943c
Merge branch amd-master into amd-common
Nov 13, 2016
490e39d
Merge branch amd-master into amd-common
Nov 13, 2016
3d78fe0
Merge branch amd-master into amd-common
Nov 14, 2016
2a100dc
Merge branch amd-master into amd-common
Nov 14, 2016
961691c
Merge branch amd-master into amd-common
Nov 15, 2016
0a64d64
Merge branch amd-master into amd-common
Nov 15, 2016
dc1ff52
Merge branch amd-master into amd-common
Nov 16, 2016
93fbfac
Merge branch 'amd-master' into kzhuravl-common
kzhuravl Nov 17, 2016
047be2b
[AMDGPU] Convert `ErrorOr` to `Expected` + needed changes for rL287081
kzhuravl Nov 17, 2016
f51b0be
Merge branch amd-master into amd-common
Nov 17, 2016
74edc19
Merge branch amd-master into amd-common
Nov 17, 2016
3fb6e83
Merge branch amd-master into amd-common
Nov 17, 2016
852c9c5
Merge branch amd-master into amd-common
Nov 18, 2016
3dd1cf2
amdgpu-objdump: Fix executable and shared ELF files disassembling (#31)
Nov 18, 2016
9a24d63
AMDGPU/SI: Don't emit buffer_wbinvl1_vol on SI
tstellarAMD Nov 21, 2016
5c667a6
Merge branch 'amd-master' into amd-common
tstellarAMD Nov 29, 2016
43ecce1
Merge branch amd-master into amd-common
Nov 30, 2016
b5024d8
Merge branch amd-master into amd-common
Nov 30, 2016
a83ff80
Merge branch amd-master into amd-common
Nov 30, 2016
4ec4752
Merge branch amd-master into amd-common
Dec 2, 2016
5487681
Ported lower kernels calls pre-link pass from hsail compiler
dfukalov Dec 2, 2016
8fef8d7
removed declarations processing since the pass should clone kernel fu…
dfukalov Dec 2, 2016
4acced1
Merge pull request #35 from RadeonOpenCompute/LowerKernelCalls
vpykhtin Dec 2, 2016
340b4e9
Revert "removed declarations processing since the pass should clone k…
dfukalov Dec 5, 2016
1b58bab
Revert "Ported lower kernels calls pre-link pass from hsail compiler"
dfukalov Dec 5, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 46 additions & 32 deletions docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2157,10 +2157,23 @@ For a simpler introduction to the ordering constraints, see the

.. _singlethread:

If an atomic operation is marked ``singlethread``, it only *synchronizes
with* or participates in modification and seq\_cst total orderings with
other operations running in the same thread (for example, in signal
handlers).
If an atomic operation is marked ``singlethread``, it only *synchronizes with*,
and only participates in the seq\_cst total orderings of, other operations
running in the same thread (for example, in signal handlers).

.. _syncscope:

If an atomic operation is marked ``syncscope(<n>)``, then it
*synchronizes with*, and participates in the seq\_cst total orderings of, other
atomic operations marked ``syncscope(<n>)``. It is target defined how it
interacts with atomic operations marked ``singlethread``, marked
``syncscope(<m>)`` where ``m != n``, or not marked ``singlethread`` or
``syncscope(<n>)``.

Otherwise, an atomic operation that is not marked ``singlethread`` or
``syncscope(<n>)`` *synchronizes with*, and participates in the global seq\_cst
total orderings of, other operations that are not marked ``singlethread`` or
``syncscope(<n>)``.

.. _fastmath:

Expand Down Expand Up @@ -7016,7 +7029,7 @@ Syntax:
::

<result> = load [volatile] <ty>, <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>][, !invariant.load !<index>][, !invariant.group !<index>][, !nonnull !<index>][, !dereferenceable !<deref_bytes_node>][, !dereferenceable_or_null !<deref_bytes_node>][, !align !<align_node>]
<result> = load atomic [volatile] <ty>, <ty>* <pointer> [singlethread] <ordering>, align <alignment> [, !invariant.group !<index>]
<result> = load atomic [volatile] <ty>, <ty>* <pointer> [singlethread|syncscope(<n>)] <ordering>, align <alignment> [, !invariant.group !<index>]
!<index> = !{ i32 1 }
!<deref_bytes_node> = !{i64 <dereferenceable_bytes>}
!<align_node> = !{ i64 <value_alignment> }
Expand All @@ -7037,14 +7050,14 @@ modify the number or order of execution of this ``load`` with other
:ref:`volatile operations <volatile>`.

If the ``load`` is marked as ``atomic``, it takes an extra :ref:`ordering
<ordering>` and optional ``singlethread`` argument. The ``release`` and
``acq_rel`` orderings are not valid on ``load`` instructions. Atomic loads
produce :ref:`defined <memmodel>` results when they may see multiple atomic
stores. The type of the pointee must be an integer, pointer, or floating-point
type whose bit width is a power of two greater than or equal to eight and less
than or equal to a target-specific size limit. ``align`` must be explicitly
specified on atomic loads, and the load has undefined behavior if the alignment
is not set to a value which is at least the size in bytes of the
<ordering>` and optional ``singlethread`` or ``syncscope(<n>)`` argument. The
``release`` and ``acq_rel`` orderings are not valid on ``load`` instructions.
Atomic loads produce :ref:`defined <memmodel>` results when they may see
multiple atomic stores. The type of the pointee must be an integer, pointer, or
floating-point type whose bit width is a power of two greater than or equal to
eight and less than or equal to a target-specific size limit. ``align`` must be
explicitly specified on atomic loads, and the load has undefined behavior if the
alignment is not set to a value which is at least the size in bytes of the
pointee. ``!nontemporal`` does not have any defined semantics for atomic loads.

The optional constant ``align`` argument specifies the alignment of the
Expand Down Expand Up @@ -7145,7 +7158,7 @@ Syntax:
::

store [volatile] <ty> <value>, <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>][, !invariant.group !<index>] ; yields void
store atomic [volatile] <ty> <value>, <ty>* <pointer> [singlethread] <ordering>, align <alignment> [, !invariant.group !<index>] ; yields void
store atomic [volatile] <ty> <value>, <ty>* <pointer> [singlethread|syncscope(<n>)] <ordering>, align <alignment> [, !invariant.group !<index>] ; yields void

Overview:
"""""""""
Expand All @@ -7165,14 +7178,14 @@ allowed to modify the number or order of execution of this ``store`` with other
structural type <t_opaque>`) can be stored.

If the ``store`` is marked as ``atomic``, it takes an extra :ref:`ordering
<ordering>` and optional ``singlethread`` argument. The ``acquire`` and
``acq_rel`` orderings aren't valid on ``store`` instructions. Atomic loads
produce :ref:`defined <memmodel>` results when they may see multiple atomic
stores. The type of the pointee must be an integer, pointer, or floating-point
type whose bit width is a power of two greater than or equal to eight and less
than or equal to a target-specific size limit. ``align`` must be explicitly
specified on atomic stores, and the store has undefined behavior if the
alignment is not set to a value which is at least the size in bytes of the
<ordering>` and optional ``singlethread`` or ``syncscope(<n>)`` argument. The
``acquire`` and ``acq_rel`` orderings aren't valid on ``store`` instructions.
Atomic loads produce :ref:`defined <memmodel>` results when they may see
multiple atomic stores. The type of the pointee must be an integer, pointer, or
floating-point type whose bit width is a power of two greater than or equal to
eight and less than or equal to a target-specific size limit. ``align`` must be
explicitly specified on atomic stores, and the store has undefined behavior if
the alignment is not set to a value which is at least the size in bytes of the
pointee. ``!nontemporal`` does not have any defined semantics for atomic stores.

The optional constant ``align`` argument specifies the alignment of the
Expand Down Expand Up @@ -7233,7 +7246,7 @@ Syntax:

::

fence [singlethread] <ordering> ; yields void
fence [singlethread|syncscope(<n>)] <ordering> ; yields void

Overview:
"""""""""
Expand Down Expand Up @@ -7267,9 +7280,8 @@ A ``fence`` which has ``seq_cst`` ordering, in addition to having both
``acquire`` and ``release`` semantics specified above, participates in
the global program order of other ``seq_cst`` operations and/or fences.

The optional ":ref:`singlethread <singlethread>`" argument specifies
that the fence only synchronizes with other fences in the same thread.
(This is useful for interacting with signal handlers.)
A ``fence`` instruction can also take an optional
":ref:`singlethread <singlethread>`" or ":ref:`syncscope <syncscope>`" argument.

Example:
""""""""
Expand All @@ -7278,6 +7290,7 @@ Example:

fence acquire ; yields void
fence singlethread seq_cst ; yields void
fence syncscope(2) seq_cst ; yields void

.. _i_cmpxchg:

Expand All @@ -7289,7 +7302,7 @@ Syntax:

::

cmpxchg [weak] [volatile] <ty>* <pointer>, <ty> <cmp>, <ty> <new> [singlethread] <success ordering> <failure ordering> ; yields { ty, i1 }
cmpxchg [weak] [volatile] <ty>* <pointer>, <ty> <cmp>, <ty> <new> [singlethread|syncscope(<n>)] <success ordering> <failure ordering> ; yields { ty, i1 }

Overview:
"""""""""
Expand Down Expand Up @@ -7318,10 +7331,8 @@ must be at least ``monotonic``, the ordering constraint on failure must be no
stronger than that on success, and the failure ordering cannot be either
``release`` or ``acq_rel``.

The optional "``singlethread``" argument declares that the ``cmpxchg``
is only atomic with respect to code (usually signal handlers) running in
the same thread as the ``cmpxchg``. Otherwise the cmpxchg is atomic with
respect to all other code in the system.
A ``cmpxchg`` instruction can also take an optional
":ref:`singlethread <singlethread>`" or ":ref:`syncscope <syncscope>`" argument.

The pointer passed into cmpxchg must have alignment greater than or
equal to the size in memory of the operand.
Expand Down Expand Up @@ -7375,7 +7386,7 @@ Syntax:

::

atomicrmw [volatile] <operation> <ty>* <pointer>, <ty> <value> [singlethread] <ordering> ; yields ty
atomicrmw [volatile] <operation> <ty>* <pointer>, <ty> <value> [singlethread|syncscope(<n>)] <ordering> ; yields ty

Overview:
"""""""""
Expand Down Expand Up @@ -7409,6 +7420,9 @@ be a pointer to that type. If the ``atomicrmw`` is marked as
order of execution of this ``atomicrmw`` with other :ref:`volatile
operations <volatile>`.

A ``atomicrmw`` instruction can also take an optional
":ref:`singlethread <singlethread>`" or ":ref:`syncscope <syncscope>`" argument.

Semantics:
""""""""""

Expand Down
10 changes: 8 additions & 2 deletions include/llvm/Bitcode/LLVMBitCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,15 @@ enum AtomicOrderingCodes {
};

/// Encoded SynchronizationScope values.
enum AtomicSynchScopeCodes {
enum AtomicSynchScopeCodes : uint8_t {
/// Encoded value for SingleThread synchronization scope.
SYNCHSCOPE_SINGLETHREAD = 0,
SYNCHSCOPE_CROSSTHREAD = 1

/// Encoded value for CrossThread synchronization scope.
SYNCHSCOPE_CROSSTHREAD = 1,

/// First encoded value for target specific synchronization scope.
SYNCHSCOPE_FIRSTTARGETSPECIFIC = 2
};

/// Markers and flags for call instruction.
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/MachineMemOperand.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MachineMemOperand {
/// Atomic information for this memory operation.
struct MachineAtomicInfo {
/// Synchronization scope for this memory operation.
unsigned SynchScope : 1; // enum SynchronizationScope
unsigned SynchScope : 8; // enum SynchronizationScope
/// Atomic ordering requirements for this memory operation. For cmpxchg
/// atomic operations, atomic ordering requirements when store occurs.
unsigned Ordering : 4; // enum AtomicOrdering
Expand Down
Loading