<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/CodeGen/CodeGenModule.cpp, branch users/vitalybuka/spr/main.asandarwin-simplify-test</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>[clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (#98138)</title>
<updated>2024-08-21T05:22:31+00:00</updated>
<author>
<name>Vassil Vassilev</name>
<email>v.g.vassilev@gmail.com</email>
</author>
<published>2024-08-21T05:22:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6c62ad446b2441b78ae524d9e700e351d5a76394'/>
<id>6c62ad446b2441b78ae524d9e700e351d5a76394</id>
<content type='text'>
In incremental compilation clang works with multiple `llvm::Module`s.
Our current approach is to create a CodeGenModule entity for every new
module request (via StartModule). However, some of the state such as the
mangle context needs to be preserved to keep the original semantics in
the ever-growing TU.

Fixes: llvm/llvm-project#95581.

cc: @jeaye</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In incremental compilation clang works with multiple `llvm::Module`s.
Our current approach is to create a CodeGenModule entity for every new
module request (via StartModule). However, some of the state such as the
mangle context needs to be preserved to keep the original semantics in
the ever-growing TU.

Fixes: llvm/llvm-project#95581.

cc: @jeaye</pre>
</div>
</content>
</entry>
<entry>
<title>Fix KCFI types for generated functions with integer normalization (#104826)</title>
<updated>2024-08-20T23:51:16+00:00</updated>
<author>
<name>Sami Tolvanen</name>
<email>samitolvanen@users.noreply.github.com</email>
</author>
<published>2024-08-20T23:51:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e1c36bde0551977d4b2efae032af6dfc4b2b3936'/>
<id>e1c36bde0551977d4b2efae032af6dfc4b2b3936</id>
<content type='text'>
With -fsanitize-cfi-icall-experimental-normalize-integers, Clang
appends ".normalized" to KCFI types in CodeGenModule::CreateKCFITypeId,
which changes type hashes also for functions that don't have integer
types in their signatures. However, llvm::setKCFIType does not take
integer normalization into account, which means LLVM generated
functions with KCFI types, e.g. sanitizer constructors, will fail KCFI
checks when integer normalization is enabled in Clang.

Add a cfi-normalize-integers module flag to indicate integer
normalization is used, and append ".normalized" to KCFI types also in
llvm::setKCFIType to fix the type mismatch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With -fsanitize-cfi-icall-experimental-normalize-integers, Clang
appends ".normalized" to KCFI types in CodeGenModule::CreateKCFITypeId,
which changes type hashes also for functions that don't have integer
types in their signatures. However, llvm::setKCFIType does not take
integer normalization into account, which means LLVM generated
functions with KCFI types, e.g. sanitizer constructors, will fail KCFI
checks when integer normalization is enabled in Clang.

Add a cfi-normalize-integers module flag to indicate integer
normalization is used, and append ".normalized" to KCFI types also in
llvm::setKCFIType to fix the type mismatch.</pre>
</div>
</content>
</entry>
<entry>
<title>[PAC][ELF][AArch64] Encode several ptrauth features in PAuth core info (#102508)</title>
<updated>2024-08-19T09:53:43+00:00</updated>
<author>
<name>Daniil Kovalev</name>
<email>dkovalev@accesssoftek.com</email>
</author>
<published>2024-08-19T09:53:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=de5deb7b07db39810c4b07870c75ccc8dccc5fe9'/>
<id>de5deb7b07db39810c4b07870c75ccc8dccc5fe9</id>
<content type='text'>
For llvm_linux platform, define the following meaning for bits 9, 10,
11:

- bit 9: set if indirect gotos signing is enabled;
- bit 10: set if type info vtable pointer discrimination is enabled;
- bit 11: set if function pointer type discrimination is enabled.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For llvm_linux platform, define the following meaning for bits 9, 10,
11:

- bit 9: set if indirect gotos signing is enabled;
- bit 10: set if type info vtable pointer discrimination is enabled;
- bit 11: set if function pointer type discrimination is enabled.</pre>
</div>
</content>
</entry>
<entry>
<title>[DebugInfo][RemoveDIs] Use iterator-inserters in clang (#102006)</title>
<updated>2024-08-09T09:17:48+00:00</updated>
<author>
<name>Jeremy Morse</name>
<email>jeremy.morse@sony.com</email>
</author>
<published>2024-08-09T09:17:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=92aec5192ce752c984837a93227200b54faa8679'/>
<id>92aec5192ce752c984837a93227200b54faa8679</id>
<content type='text'>
As part of the LLVM effort to eliminate debug-info intrinsics, we're
moving to a world where only iterators should be used to insert
instructions. This isn't a problem in clang when instructions get
generated before any debug-info is inserted, however we're planning on
deprecating and removing the instruction-pointer insertion routines.

Scatter some calls to getIterator in a few places, remove a
deref-then-addrof on another iterator, and add an overload for the
createLoadInstBefore utility. Some callers passes a null insertion
point, which we need to handle explicitly now.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of the LLVM effort to eliminate debug-info intrinsics, we're
moving to a world where only iterators should be used to insert
instructions. This isn't a problem in clang when instructions get
generated before any debug-info is inserted, however we're planning on
deprecating and removing the instruction-pointer insertion routines.

Scatter some calls to getIterator in a few places, remove a
deref-then-addrof on another iterator, and add an overload for the
createLoadInstBefore utility. Some callers passes a null insertion
point, which we need to handle explicitly now.</pre>
</div>
</content>
</entry>
<entry>
<title>[PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (#96159)</title>
<updated>2024-08-06T15:24:01+00:00</updated>
<author>
<name>Daniil Kovalev</name>
<email>dkovalev@accesssoftek.com</email>
</author>
<published>2024-08-06T15:24:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=15d4a84e7977725dc0661995963a12ff8605b03c'/>
<id>15d4a84e7977725dc0661995963a12ff8605b03c</id>
<content type='text'>
Treat 8th bit of version value for llvm_linux platform as signed GOT
flag.

- clang: define `PointerAuthELFGOT` LangOption and set 8th bit of
  `aarch64-elf-pauthabi-version` LLVM module flag correspondingly;

- llvm-readobj: print `PointerAuthELFGOT` or `!PointerAuthELFGOT` in
  version description of llvm_linux platform depending on whether the flag
  is set.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Treat 8th bit of version value for llvm_linux platform as signed GOT
flag.

- clang: define `PointerAuthELFGOT` LangOption and set 8th bit of
  `aarch64-elf-pauthabi-version` LLVM module flag correspondingly;

- llvm-readobj: print `PointerAuthELFGOT` or `!PointerAuthELFGOT` in
  version description of llvm_linux platform depending on whether the flag
  is set.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "Finish deleting the le32/le64 targets" (#99079) (#101983)</title>
<updated>2024-08-06T12:35:56+00:00</updated>
<author>
<name>Aaron Ballman</name>
<email>aaron@aaronballman.com</email>
</author>
<published>2024-08-06T12:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=617cf8a72d2ab568bf0e84452faf4e35a322b32f'/>
<id>617cf8a72d2ab568bf0e84452faf4e35a322b32f</id>
<content type='text'>
This reverts commit d3f8105c65046173e20c4c59394b4a7f1bbe7627.

Halide no longer relies on this target:
https://github.com/llvm/llvm-project/pull/98497#issuecomment-2253358685</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d3f8105c65046173e20c4c59394b4a7f1bbe7627.

Halide no longer relies on this target:
https://github.com/llvm/llvm-project/pull/98497#issuecomment-2253358685</pre>
</div>
</content>
</entry>
<entry>
<title>[PAC][AArch64] Support init/fini array signing (#96478)</title>
<updated>2024-08-06T05:02:13+00:00</updated>
<author>
<name>Daniil Kovalev</name>
<email>dkovalev@accesssoftek.com</email>
</author>
<published>2024-08-06T05:02:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6e45fa95be9db5318ac7037c673c9b18a48ac5b1'/>
<id>6e45fa95be9db5318ac7037c673c9b18a48ac5b1</id>
<content type='text'>
If both `-fptrauth-init-fini` and `-fptrauth-calls` are passed, sign
function pointers in `llvm.global_ctors` and `llvm.global_dtors` with
constant discriminator 0xD9D4
(`ptrauth_string_discriminator("init_fini")`). Additionally, if
`-fptrauth-init-fini-address-discrimination` is passed, address
discrimination is used for signing (otherwise, just constant
discriminator is used).

For address discrimination, we use it's special form since uses of
`llvm.global_{c|d}tors` are disallowed (see
`Verifier::visitGlobalVariable`) and we can't emit `getelementptr`
expressions referencing these special arrays. A signed ctor/dtor pointer
with special address discrimination applied looks like the following:

```
ptr ptrauth (ptr @foo, i32 0, i64 55764, ptr inttoptr (i64 1 to ptr))
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If both `-fptrauth-init-fini` and `-fptrauth-calls` are passed, sign
function pointers in `llvm.global_ctors` and `llvm.global_dtors` with
constant discriminator 0xD9D4
(`ptrauth_string_discriminator("init_fini")`). Additionally, if
`-fptrauth-init-fini-address-discrimination` is passed, address
discrimination is used for signing (otherwise, just constant
discriminator is used).

For address discrimination, we use it's special form since uses of
`llvm.global_{c|d}tors` are disallowed (see
`Verifier::visitGlobalVariable`) and we can't emit `getelementptr`
expressions referencing these special arrays. A signed ctor/dtor pointer
with special address discrimination applied looks like the following:

```
ptr ptrauth (ptr @foo, i32 0, i64 55764, ptr inttoptr (i64 1 to ptr))
```</pre>
</div>
</content>
</entry>
<entry>
<title>[C++20] [Modules] Always emit the inline builtins (#101278)</title>
<updated>2024-08-01T06:45:21+00:00</updated>
<author>
<name>Chuanqi Xu</name>
<email>yedeng.yd@linux.alibaba.com</email>
</author>
<published>2024-08-01T06:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e167f753bd4679329ebcf0232f72be9c63d9b671'/>
<id>e167f753bd4679329ebcf0232f72be9c63d9b671</id>
<content type='text'>
See the attached test for the motivation example. If we're too greedy to
not emit the definition for inline builtins, we may meet a middle end
crash. And it should be good to emit inline builtins always.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See the attached test for the motivation example. If we're too greedy to
not emit the definition for inline builtins, we may meet a middle end
crash. And it should be good to emit inline builtins always.</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] [NFC] Fix potential dereferencing of nullptr (#101405)</title>
<updated>2024-07-31T22:36:21+00:00</updated>
<author>
<name>smanna12</name>
<email>soumi.manna@intel.com</email>
</author>
<published>2024-07-31T22:36:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cf79aba99db4909437b8977a59c51bc8899ddb9c'/>
<id>cf79aba99db4909437b8977a59c51bc8899ddb9c</id>
<content type='text'>
This patch replaces getAs with castAs and dyn_cast with cast to ensure
type safety and prevents potential null pointer dereferences. These
changes enforce compile-time checks for correct type casting in
ASTContext and CodeGenModule.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces getAs with castAs and dyn_cast with cast to ensure
type safety and prevents potential null pointer dereferences. These
changes enforce compile-time checks for correct type casting in
ASTContext and CodeGenModule.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[C++20] [Modules] Always emit the inline builtins"</title>
<updated>2024-07-30T19:27:58+00:00</updated>
<author>
<name>Haowei Wu</name>
<email>haowei@google.com</email>
</author>
<published>2024-07-30T19:14:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f86ce8675f74a6b8937f99e3562fbcae51fd1f2f'/>
<id>f86ce8675f74a6b8937f99e3562fbcae51fd1f2f</id>
<content type='text'>
This reverts commit ca8a4111f796fe8533e0af95557875b15becff06.
This patch broke clang test on Windows x64 msvc
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ca8a4111f796fe8533e0af95557875b15becff06.
This patch broke clang test on Windows x64 msvc
</pre>
</div>
</content>
</entry>
</feed>
