<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/CodeGen/CGAtomic.cpp, branch users/nico/python-1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[KeyInstr][Clang] Atomic ops atoms (#141624)</title>
<updated>2025-06-24T11:20:44+00:00</updated>
<author>
<name>Orlando Cazalet-Hyams</name>
<email>orlando.hyams@sony.com</email>
</author>
<published>2025-06-24T11:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ddecfa696c4929ac364053f3eef66fefe4873448'/>
<id>ddecfa696c4929ac364053f3eef66fefe4873448</id>
<content type='text'>
This patch is part of a stack that teaches Clang to generate Key
Instructions metadata for C and C++.

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be
removed.

RFC:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is part of a stack that teaches Clang to generate Key
Instructions metadata for C and C++.

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be
removed.

RFC:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668</pre>
</div>
</content>
</entry>
<entry>
<title>clang: Remove dest LangAS argument from performAddrSpaceCast (#138866)</title>
<updated>2025-05-09T12:24:54+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-05-09T12:24:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5ae2aed218470783e6c7a2d255c7946f4549cb46'/>
<id>5ae2aed218470783e6c7a2d255c7946f4549cb46</id>
<content type='text'>
It isn't used and is redundant with the result pointer type argument.
A more reasonable API would only have LangAS parameters, or IR parameters,
not both. Not all values have a meaningful value for this. I'm also
not sure why we have this at all, it's not overridden by any targets and
further simplification is possible.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It isn't used and is redundant with the result pointer type argument.
A more reasonable API would only have LangAS parameters, or IR parameters,
not both. Not all values have a meaningful value for this. I'm also
not sure why we have this at all, it's not overridden by any targets and
further simplification is possible.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][CodeGen] Add range metadata for atomic load of boolean type. #131476 (#133546)</title>
<updated>2025-04-14T21:26:10+00:00</updated>
<author>
<name>Jan Górski</name>
<email>jan.a.gorski@wp.pl</email>
</author>
<published>2025-04-14T21:26:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ff687af04f5b0e85305250587b524cb0b3849aa0'/>
<id>ff687af04f5b0e85305250587b524cb0b3849aa0</id>
<content type='text'>
Fixes #131476.

For `x86_64` it folds
```
movzbl	t1(%rip), %eax
andb	$1, %al
```
into
```
movzbl	t1(%rip), %eax
```
when run: `clang -S atomic-ops-load.c -o atomic-ops-load.s -O1
--target=x86_64`.

But for riscv replaces:
```
lb	a0, %lo(t1)(a0)
andi	a0, a0, 1
```
with
```
lb	a0, %lo(t1)(a0)
zext.b	a0, a0
``` 
when run: `clang -S atomic-ops-load.c -o atomic-ops-load.s -O1
--target=riscv64`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #131476.

For `x86_64` it folds
```
movzbl	t1(%rip), %eax
andb	$1, %al
```
into
```
movzbl	t1(%rip), %eax
```
when run: `clang -S atomic-ops-load.c -o atomic-ops-load.s -O1
--target=x86_64`.

But for riscv replaces:
```
lb	a0, %lo(t1)(a0)
andi	a0, a0, 1
```
with
```
lb	a0, %lo(t1)(a0)
zext.b	a0, a0
``` 
when run: `clang -S atomic-ops-load.c -o atomic-ops-load.s -O1
--target=riscv64`.</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Use "syncscope" instead of "synchscope". NFC. (#134616)</title>
<updated>2025-04-07T12:32:36+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2025-04-07T12:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e2fe78797fa39e22ebb3c65383d1bd30490535e5'/>
<id>e2fe78797fa39e22ebb3c65383d1bd30490535e5</id>
<content type='text'>
This matches the spelling of the keyword in LLVM IR.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This matches the spelling of the keyword in LLVM IR.</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Re-write codegen for atomic_test_and_set and atomic_clear (#121943)</title>
<updated>2025-01-22T10:48:04+00:00</updated>
<author>
<name>Oliver Stannard</name>
<email>oliver.stannard@arm.com</email>
</author>
<published>2025-01-22T10:48:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c4ef805b0bda16f734276086b0984583c2e21db6'/>
<id>c4ef805b0bda16f734276086b0984583c2e21db6</id>
<content type='text'>
Re-write the sema and codegen for the atomic_test_and_set and
atomic_clear builtin functions to go via AtomicExpr, like the other
atomic builtins do. This simplifies the code, because AtomicExpr already
handles things like generating code for to dynamically select the memory
ordering, which was duplicated for these builtins. This also fixes a few
crash bugs, one when passing an integer to the pointer argument, and one
when using an array.

This also adds diagnostics for the memory orderings which are not valid
for atomic_clear according to
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html, which
were missing before.

Fixes https://github.com/llvm/llvm-project/issues/111293.

This is a re-land of #120449, modified to allow any non-const pointer
type for the first argument.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Re-write the sema and codegen for the atomic_test_and_set and
atomic_clear builtin functions to go via AtomicExpr, like the other
atomic builtins do. This simplifies the code, because AtomicExpr already
handles things like generating code for to dynamically select the memory
ordering, which was duplicated for these builtins. This also fixes a few
crash bugs, one when passing an integer to the pointer argument, and one
when using an array.

This also adds diagnostics for the memory orderings which are not valid
for atomic_clear according to
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html, which
were missing before.

Fixes https://github.com/llvm/llvm-project/issues/111293.

This is a re-land of #120449, modified to allow any non-const pointer
type for the first argument.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Clang] Re-write codegen for atomic_test_and_set and atomic_clear (#120449)"</title>
<updated>2024-12-20T07:14:26+00:00</updated>
<author>
<name>Mikhail Goncharov</name>
<email>goncharov.mikhail@gmail.com</email>
</author>
<published>2024-12-20T07:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=93743ee566694d2fcafa3243c03330e86bf9c806'/>
<id>93743ee566694d2fcafa3243c03330e86bf9c806</id>
<content type='text'>
This reverts commit 9fc2fadbfcb34df5f72bdaed28a7874bf584eed7.

See https://github.com/llvm/llvm-project/pull/120449#issuecomment-2556089016
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9fc2fadbfcb34df5f72bdaed28a7874bf584eed7.

See https://github.com/llvm/llvm-project/pull/120449#issuecomment-2556089016
</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Re-write codegen for atomic_test_and_set and atomic_clear (#120449)</title>
<updated>2024-12-19T09:12:19+00:00</updated>
<author>
<name>Oliver Stannard</name>
<email>oliver.stannard@arm.com</email>
</author>
<published>2024-12-19T09:12:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9fc2fadbfcb34df5f72bdaed28a7874bf584eed7'/>
<id>9fc2fadbfcb34df5f72bdaed28a7874bf584eed7</id>
<content type='text'>
Re-write the sema and codegen for the atomic_test_and_set and
atomic_clear builtin functions to go via AtomicExpr, like the other
atomic builtins do. This simplifies the code, because AtomicExpr already
handles things like generating code for to dynamically select the memory
ordering, which was duplicated for these builtins. This also fixes a few
crash bugs, one when passing an integer to the pointer argument, and one
when using an array.

This also adds diagnostics for the memory orderings which are not valid
for atomic_clear according to
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html, which
were missing before.

Fixes #111293.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Re-write the sema and codegen for the atomic_test_and_set and
atomic_clear builtin functions to go via AtomicExpr, like the other
atomic builtins do. This simplifies the code, because AtomicExpr already
handles things like generating code for to dynamically select the memory
ordering, which was duplicated for these builtins. This also fixes a few
crash bugs, one when passing an integer to the pointer argument, and one
when using an array.

This also adds diagnostics for the memory orderings which are not valid
for atomic_clear according to
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html, which
were missing before.

Fixes #111293.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Remove unused includes (NFC) (#116459)</title>
<updated>2024-11-16T15:37:13+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-16T15:37:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e8a6624325e0c628ec23e5f124f1d2002f138dd5'/>
<id>e8a6624325e0c628ec23e5f124f1d2002f138dd5</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>clang/AMDGPU: Set noalias.addrspace metadata on atomicrmw (#102462)</title>
<updated>2024-10-17T13:10:45+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2024-10-17T13:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=51b4ada4588ecb3044b57c325a59aedcc19d7084'/>
<id>51b4ada4588ecb3044b57c325a59aedcc19d7084</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[SPIRV][RFC] Rework / extend support for memory scopes (#106429)</title>
<updated>2024-09-24T23:44:57+00:00</updated>
<author>
<name>Alex Voicu</name>
<email>alexandru.voicu@amd.com</email>
</author>
<published>2024-09-24T23:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3cfd0c0d36975504099034ce11f4df07c5a7eba7'/>
<id>3cfd0c0d36975504099034ce11f4df07c5a7eba7</id>
<content type='text'>
This change adds support for correctly lowering the `__scoped` Clang
builtins, and corresponding scoped LLVM instructions. These were
previously unconditionally lowered to Device scope, which is possibly incorrect. 
Furthermore, the default / implicit scope is changed from Device (an 
OpenCL assumption) to AllSvmDevices (aka System), since the SPIR-V BE is not 
OpenCL specific / can ingest IR coming from other language front-ends. OpenCL 
defaulting to Device scope is now reflected in the front-end handling of atomic 
ops, which seems preferable.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change adds support for correctly lowering the `__scoped` Clang
builtins, and corresponding scoped LLVM instructions. These were
previously unconditionally lowered to Device scope, which is possibly incorrect. 
Furthermore, the default / implicit scope is changed from Device (an 
OpenCL assumption) to AllSvmDevices (aka System), since the SPIR-V BE is not 
OpenCL specific / can ingest IR coming from other language front-ends. OpenCL 
defaulting to Device scope is now reflected in the front-end handling of atomic 
ops, which seems preferable.</pre>
</div>
</content>
</entry>
</feed>
