History log of /llvm-project/clang/lib/CodeGen/CodeGenModule.cpp (Results 1 – 25 of 2157)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# abc8812d 29-Jan-2025 Jason Rice <ricejasonf@gmail.com>

[Clang][P1061] Add stuctured binding packs (#121417)

This is an implementation of P1061 Structure Bindings Introduce a Pack
without the ability to use packs outside of templates. There is a couple
o

[Clang][P1061] Add stuctured binding packs (#121417)

This is an implementation of P1061 Structure Bindings Introduce a Pack
without the ability to use packs outside of templates. There is a couple
of ways the AST could have been sliced so let me know what you think.
The only part of this change that I am unsure of is the
serialization/deserialization stuff. I followed the implementation of
other Exprs, but I do not really know how it is tested. Thank you for
your time considering this.

---------

Co-authored-by: Yanzuo Liu <zwuis@outlook.com>

show more ...


Revision tags: llvmorg-21-init
# 71d6287f 20-Jan-2025 Hervé Poussineau <hpoussin@reactos.org>

[Clang][MIPS] Create correct linker arguments for Windows toolchains (#121041)


Revision tags: llvmorg-19.1.7
# b93ffa8e 10-Jan-2025 Alexandros Lamprineas <alexandros.lamprineas@arm.com>

[FMV][AArch64] Changes in fmv-features metadata. (#122192)

* We want the default version to have this attribute too otherwise it
becomes indistinguishable from non-versioned functions.

* We don'

[FMV][AArch64] Changes in fmv-features metadata. (#122192)

* We want the default version to have this attribute too otherwise it
becomes indistinguishable from non-versioned functions.

* We don't need the '+' unlike target-features which can negate. This
will allow using the parsing API of target_version/clones for the
metadata too.

show more ...


# 8e659401 08-Jan-2025 Alexandros Lamprineas <alexandros.lamprineas@arm.com>

[FMV][AArch64] Simplify version selection according to ACLE. (#121921)

Currently, the more features a version has, the higher its priority is.
We are changing ACLE https://github.com/ARM-software/a

[FMV][AArch64] Simplify version selection according to ACLE. (#121921)

Currently, the more features a version has, the higher its priority is.
We are changing ACLE https://github.com/ARM-software/acle/pull/370 as
follows:

"Among any two versions, the higher priority version is determined by
identifying the highest priority feature that is specified in exactly
one of the versions, and selecting that version."

show more ...


# 93011fe2 07-Jan-2025 Alexandros Lamprineas <alexandros.lamprineas@arm.com>

[FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (#118544)

We need to be able to propagate information about FMV attribute strings
from C/C++ source to LLVM IR. This is necessary so tha

[FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (#118544)

We need to be able to propagate information about FMV attribute strings
from C/C++ source to LLVM IR. This is necessary so that we can
distinguish which target-features are coming from the cmdline, which are
coming from the target attribute, and which are coming from feature
dependency expansion. We need this for static resolution of calls in
LLVM. Here's a motivating example:

Suppose you have target_version("i8mm+dotprod") and
target_version("fcma"). The first version clearly has higher priority.
Now suppose you specify -march=armv8-a+i8mm on the command line. Then
the versions would have target-features "+i8mm,+dotprod" and
"+i8mm,+fcma" respectively. If you are using those to deduce version
priority, then you would incorrectly deduce that the second version was
higher priority than the first.

show more ...


# 6586c676 19-Dec-2024 Alexandros Lamprineas <alexandros.lamprineas@arm.com>

[FMV][AArch64] Emit mangled default version if explicitly specified. (#120022)

Currently we need at least one more version other than the default to
trigger FMV. However we would like a header file

[FMV][AArch64] Emit mangled default version if explicitly specified. (#120022)

Currently we need at least one more version other than the default to
trigger FMV. However we would like a header file declaration

__attribute__((target_version("default"))) void f(void);

to guarantee that there will be f.default

show more ...


# c135f6ff 17-Dec-2024 Florian Hahn <flo@fhahn.com>

[TySan] Add initial Type Sanitizer support to Clang) (#76260)

This patch introduces the Clang components of type sanitizer: a
sanitizer for type-based aliasing violations.

It is based on Hal Fin

[TySan] Add initial Type Sanitizer support to Clang) (#76260)

This patch introduces the Clang components of type sanitizer: a
sanitizer for type-based aliasing violations.

It is based on Hal Finkel's https://reviews.llvm.org/D32198.

The Clang changes are mostly formulaic, the one specific change being
that when the TBAA sanitizer is enabled, TBAA is always generated, even
at -O0.

It goes together with the corresponding LLVM changes
(https://github.com/llvm/llvm-project/pull/76259) and compiler-rt
changes (https://github.com/llvm/llvm-project/pull/76261)

PR: https://github.com/llvm/llvm-project/pull/76260

show more ...


Revision tags: llvmorg-19.1.6
# f65a21a4 16-Dec-2024 Daniil Kovalev <dkovalev@accesssoftek.com>

[PAC][ELF][AArch64] Support signed personality function pointer (#119361)

Re-apply #113148 after revert in #119331

If function pointer signing is enabled, sign personality function
pointer store

[PAC][ELF][AArch64] Support signed personality function pointer (#119361)

Re-apply #113148 after revert in #119331

If function pointer signing is enabled, sign personality function
pointer stored in `.DW.ref.__gxx_personality_v0` section with IA key,
0x7EAD = `ptrauth_string_discriminator("personality")` constant
discriminator and address diversity enabled.

show more ...


# ef2e590e 10-Dec-2024 Daniil Kovalev <dkovalev@accesssoftek.com>

Revert "[PAC][ELF][AArch64] Support signed personality function pointer" (#119331)

Reverts llvm/llvm-project#113148

See buildbot failure
https://lab.llvm.org/buildbot/#/builders/190/builds/11048


# 4fb1cda6 10-Dec-2024 Daniil Kovalev <dkovalev@accesssoftek.com>

[PAC][ELF][AArch64] Support signed personality function pointer (#113148)

If function pointer signing is enabled, sign personality function
pointer stored in `.DW.ref.__gxx_personality_v0` section

[PAC][ELF][AArch64] Support signed personality function pointer (#113148)

If function pointer signing is enabled, sign personality function
pointer stored in `.DW.ref.__gxx_personality_v0` section with IA key,
0x7EAD = `ptrauth_string_discriminator("personality")` constant
discriminator and address diversity enabled.

show more ...


Revision tags: llvmorg-19.1.5
# 071da926 02-Dec-2024 Oleksandr T. <oleksandr.tarasiuk@outlook.com>

[Clang] ensure mangled names are valid identifiers before being suggested in ifunc/alias attributes notes (#118170)

Fixes #112205

---

Commit that introduced this feature -
https://github.com

[Clang] ensure mangled names are valid identifiers before being suggested in ifunc/alias attributes notes (#118170)

Fixes #112205

---

Commit that introduced this feature -
https://github.com/llvm/llvm-project/commit/9306ef9750b7a319d59f6d3e4977e01e39b8f161

show more ...


# 88c2af80 28-Nov-2024 Alexandros Lamprineas <alexandros.lamprineas@arm.com>

[NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (#116257)

Currently we have code with target hooks in CodeGenModule shared between
X86 and AArch64 for sorting MultiVersionResol

[NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (#116257)

Currently we have code with target hooks in CodeGenModule shared between
X86 and AArch64 for sorting MultiVersionResolverOptions. Those are used
when generating IFunc resolvers for FMV. The RISCV target has different
criteria for sorting, therefore it repeats sorting after calling
CodeGenFunction::EmitMultiVersionResolver.

I am moving the FMV priority logic in TargetInfo, so that it can be
implemented by the TargetParser which then makes it possible to query it
from llvm. Here is an example why this is handy:
https://github.com/llvm/llvm-project/pull/87939

show more ...


# 56eb559b 26-Nov-2024 Alexandros Lamprineas <alexandros.lamprineas@arm.com>

[clang][FMV] Fix crash with cpu_specific attribute. (#115762)

When dealing with cpu_specific GlobalDecl,
GetOrCreateMultiVersionResolver should immediately return the already
created llvm function

[clang][FMV] Fix crash with cpu_specific attribute. (#115762)

When dealing with cpu_specific GlobalDecl,
GetOrCreateMultiVersionResolver should immediately return the already
created llvm function if it exists.

Fixes https://github.com/llvm/llvm-project/issues/115299.

show more ...


# 3de21477 25-Nov-2024 Viktoriia Bakalova <115406782+VitaNuo@users.noreply.github.com>

[clang][codegen] Mention the invariant that LLVM demangler should be … (#117346)

…able to handle mangled names generated by clang.


https://discourse.llvm.org/t/rfc-clang-diagnostic-for-demangli

[clang][codegen] Mention the invariant that LLVM demangler should be … (#117346)

…able to handle mangled names generated by clang.


https://discourse.llvm.org/t/rfc-clang-diagnostic-for-demangling-failures/82835/8

Since we're putting the work on the above RFC on hold, let's leave a
comment in the source code pointing to prior efforts and the suggestion
of further steps.

show more ...


# b0afa6ba 19-Nov-2024 Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt>

[clang] Change some placeholders from undef to poison [NFC]


Revision tags: llvmorg-19.1.4
# 3b162f73 19-Nov-2024 Daniil Kovalev <dkovalev@accesssoftek.com>

[PAC][clang] Add signed GOT cc1 flag (#96160)

Add `-fptrauth-elf-got` clang cc1 flag and set `ptrauth_elf_got`
preprocessor feature and `PointerAuthELFGOT` LangOption correspondingly.
No additiona

[PAC][clang] Add signed GOT cc1 flag (#96160)

Add `-fptrauth-elf-got` clang cc1 flag and set `ptrauth_elf_got`
preprocessor feature and `PointerAuthELFGOT` LangOption correspondingly.
No additional checks like ensuring OS binary format is ELF are
performed: it should be done on clang driver level when a pauth-enabled
environment implying signed GOT enabled is requested.

If the cc1 flag is passed, "ptrauth-elf-got" IR module flag is set.

show more ...


# e8a66243 16-Nov-2024 Kazu Hirata <kazu@google.com>

[CodeGen] Remove unused includes (NFC) (#116459)

Identified with misc-include-cleaner.


# 6bd3f2e8 14-Nov-2024 Eli Friedman <efriedma@quicinc.com>

[clang codegen] Add CreateRuntimeFunction overload that takes a clang type. (#113506)

Correctly computing the LLVM types/attributes is complicated in general,
so add a variant which does that for y

[clang codegen] Add CreateRuntimeFunction overload that takes a clang type. (#113506)

Correctly computing the LLVM types/attributes is complicated in general,
so add a variant which does that for you.

show more ...


# 259eaa68 30-Oct-2024 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Modules] Fix the duplicated static initializer problem (#114193)

Reproducer:

```
//--- a.cppm
export module a;
int func();
static int a = func();

//--- a.cpp
import a;
```

Th

[C++20] [Modules] Fix the duplicated static initializer problem (#114193)

Reproducer:

```
//--- a.cppm
export module a;
int func();
static int a = func();

//--- a.cpp
import a;
```

The `func()` should only execute once. However, before this patch we
will somehow import `static int a` from a.cppm incorrectly and
initialize that again.

This is super bad and can introduce serious runtime behaviors.

And also surprisingly, it looks like the root cause of the problem is
simply some oversight choosing APIs.

show more ...


Revision tags: llvmorg-19.1.3
# bd6c430d 23-Oct-2024 Congcong Cai <congcongcai0907@163.com>

[clang codegen] avoid to crash when emit init func for global variable with flexible array init (#113336)

Fixes: #113187
Avoid to create init function since clang does not support global
variable

[clang codegen] avoid to crash when emit init func for global variable with flexible array init (#113336)

Fixes: #113187
Avoid to create init function since clang does not support global
variable with flexible array init.
It will cause assertion failure later.

show more ...


# 09cc75e2 18-Oct-2024 Boaz Brickner <brickner@google.com>

[clang] Deduplicate the logic that only warns once when stack is almost full (#112552)

Zero diff in behavior.


# 7dbfa7b9 18-Oct-2024 Helena Kotas <hekotas@microsoft.com>

[HLSL] Add handle initialization for simple resource declarations (#111207)

Adds `@_init_resource_bindings()` function to module initialization that
includes `handle.fromBinding` intrinsic calls fo

[HLSL] Add handle initialization for simple resource declarations (#111207)

Adds `@_init_resource_bindings()` function to module initialization that
includes `handle.fromBinding` intrinsic calls for simple resource
declarations. Arrays of resources or resources inside user defined types
are not supported yet.

While this unblocks our progress on [Compile a runnable shader from
clang](https://github.com/llvm/wg-hlsl/issues/7) milestone, this is
probably not the way we would like to handle resource binding
initialization going forward. Ideally, it should be done via the
resource class constructors in order to support dynamic resource binding
or unbounded arrays if resources.

Depends on PRs #110327 and #111203.

Part 1 of #105076

show more ...


# 2c8ecb32 16-Oct-2024 Steven Perron <stevenperron@google.com>

[HLSL][SPIRV] Use Spirv target codegen (#112573)

When the arch in the triple in "spirv", the default target codegen is
currently used. We should be using the spir-v target codegen. This will
be used

[HLSL][SPIRV] Use Spirv target codegen (#112573)

When the arch in the triple in "spirv", the default target codegen is
currently used. We should be using the spir-v target codegen. This will
be used to have SPIR-V specific lowering of the HLSL types.

show more ...


Revision tags: llvmorg-19.1.2
# c978f0f7 14-Oct-2024 Boaz Brickner <brickner@google.com>

[clang] Fix segmentation fault caused by stack overflow on deeply nested expressions (#111701)

Done by calling clang::runWithSufficientStackSpace().
Added CodeGenModule::runWithSufficientStackSpace

[clang] Fix segmentation fault caused by stack overflow on deeply nested expressions (#111701)

Done by calling clang::runWithSufficientStackSpace().
Added CodeGenModule::runWithSufficientStackSpace() method similar to the
one in Sema to provide a single warning when this triggers
Fixes: #111699

show more ...


# 387b37af 14-Oct-2024 Michał Górny <mgorny@gentoo.org>

[LLVM] [Clang] Support for Gentoo `*t64` triples (64-bit time_t ABIs) (#111302)

Gentoo is planning to introduce a `*t64` suffix for triples that will be
used by 32-bit platforms that use 64-bit `ti

[LLVM] [Clang] Support for Gentoo `*t64` triples (64-bit time_t ABIs) (#111302)

Gentoo is planning to introduce a `*t64` suffix for triples that will be
used by 32-bit platforms that use 64-bit `time_t`. Add support for
parsing and accepting these triples, and while at it make clang
automatically enable the necessary glibc feature macros when this suffix
is used.

An open question is whether we can backport this to LLVM 19.x. After
all, adding new triplets to Triple sounds like an ABI change — though I
suppose we can minimize the risk of breaking something if we move new
enum values to the very end.

show more ...


12345678910>>...87