History log of /llvm-project/clang/lib/CodeGen/CodeGenModule.cpp (Results 126 – 150 of 2157)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# c6d70722 29-Nov-2023 Brendan Dahl <brendan.dahl@gmail.com>

[clang][CodeGen] Emit annotations for function declarations. (#66716)

Previously, annotations were only emitted for function definitions. With
this change annotations are also emitted for declarati

[clang][CodeGen] Emit annotations for function declarations. (#66716)

Previously, annotations were only emitted for function definitions. With
this change annotations are also emitted for declarations. Also,
emitting function annotations is now deferred until the end so that the
most up to date declaration is used which will have any inherited
annotations.

show more ...


# 95943d2f 28-Nov-2023 Dominik Adamski <dominik.adamski@amd.com>

[Flang] Add code-object-version option (#72638)

Information about code object version can be configured by the user for
AMD GPU target and it needs to be placed in LLVM IR generated by Flang.

Infor

[Flang] Add code-object-version option (#72638)

Information about code object version can be configured by the user for
AMD GPU target and it needs to be placed in LLVM IR generated by Flang.

Information about code object version in MLIR generated by the parser
can be reused by other tools. There is no need to specify extra flags if
we want to invoke MLIR tools (like fir-opt) separately.

Changes in comparison to a8ac93:
* added information about required targets for test
flang/test/Driver/driver-help.f90

show more ...


# f00ffcdb 28-Nov-2023 Dominik Adamski <dominik.adamski@amd.com>

Revert "[Flang] Add code-object-version option (#72638)"

This commit causes test errors on buildbots.

This reverts commit a8ac930b99d93b2a539ada7e566993d148899144.


# a8ac930b 28-Nov-2023 Dominik Adamski <dominik.adamski@amd.com>

[Flang] Add code-object-version option (#72638)

Information about code object version can be configured by the user for
AMD GPU target and it needs to be placed in LLVM IR generated by Flang.

In

[Flang] Add code-object-version option (#72638)

Information about code object version can be configured by the user for
AMD GPU target and it needs to be placed in LLVM IR generated by Flang.

Information about code object version in MLIR generated by the parser
can be reused by other tools. There is no need to specify extra flags if
we want to invoke MLIR tools (like fir-opt) separately.

show more ...


# 9a38a72f 27-Nov-2023 Yusra Syeda <99052248+ysyeda@users.noreply.github.com>

[SystemZ][z/OS] This change adds support for the PPA2 section in zOS (#68926)

This PR adds support for the PPA2 fields.

---------

Co-authored-by: Yusra Syeda <yusra.syeda@ibm.com>


# ed73121f 20-Nov-2023 Youngsuk Kim <youngsuk.kim@hpe.com>

[CodeGenModule] Remove no-op ptr-to-ptr bitcasts (NFC)

Opaque ptr cleanup effort (NFC)


# 9c1c56a8 13-Nov-2023 Fangrui Song <i@maskray.me>

-fcoverage-mapping: simplify. NFC


# 9774d0ce 10-Nov-2023 Yaxun (Sam) Liu <yaxun.liu@amd.com>

[CUDA][HIP] Make template implicitly host device (#70369)

Added option -foffload-implicit-host-device-templates which is off by
default.

When the option is on, template functions and specializat

[CUDA][HIP] Make template implicitly host device (#70369)

Added option -foffload-implicit-host-device-templates which is off by
default.

When the option is on, template functions and specializations without
host/device attributes have implicit host device attributes.

They can be overridden by device template functions with the same
signagure.
They are emitted on device side only if they are used on device side.

This feature is added as an extension.
`__has_extension(cuda_implicit_host_device_templates)` can be used to
check whether it is enabled.

This is to facilitate using standard C++ headers for device.

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

Fixes: SWDEV-428314

show more ...


# 0f7aaeb3 09-Nov-2023 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Modules] Allow export from language linkage

Close https://github.com/llvm/llvm-project/issues/71347

Previously I misread the concept of module purview. I thought if a
declaration attached

[C++20] [Modules] Allow export from language linkage

Close https://github.com/llvm/llvm-project/issues/71347

Previously I misread the concept of module purview. I thought if a
declaration attached to a unnamed module, it can't be part of the module
purview. But after the issue report, I recognized that module purview is
more of a concept about locations instead of semantics.

Concretely, the things in the language linkage after module declarations
can be exported.

This patch refactors `Module::isModulePurview()` and introduces some
possible code cleanups.

show more ...


# 8ee9da02 07-Nov-2023 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Modules] Don't import function bodies from other module units even with optimizations (#71031)

Close https://github.com/llvm/llvm-project/issues/60996.

Previously, clang will try to impo

[C++20] [Modules] Don't import function bodies from other module units even with optimizations (#71031)

Close https://github.com/llvm/llvm-project/issues/60996.

Previously, clang will try to import function bodies from other module
units to get more optimization oppotunities as much as possible. Then
the motivation becomes the direct cause of the above issue.

However, according to the discussion in SG15, the behavior of importing
function bodies from other module units breaks the ABI compatibility. It
is unwanted. So the original behavior of clang is incorrect. This patch
choose to not import function bodies from other module units in all
cases to follow the expectation.

Note that the desired optimized BMI idea is discarded too. Since it will
still break the ABI compatibility after we import function bodies
seperately.

The release note will be added seperately.

There is a similar issue for variable definitions. I'll try to handle
that in a different commit.

show more ...


# b26b1cee 05-Nov-2023 Youngsuk Kim <youngsuk.kim@hpe.com>

[clang][CodeGenModule] Remove no-op ptr-to-ptr bitcasts (NFC)

Opaque ptr cleanup effort (NFC).


# 87759476 02-Nov-2023 Vlad Serebrennikov <serebrennikov.vladislav@gmail.com>

[clang][NFC] Refactor `clang::Linkage` (#71049)

This patch introduces a new enumerator `Invalid = 0`, shifting other enumerators by +1. Contrary to how it might sound, this actually affirms status q

[clang][NFC] Refactor `clang::Linkage` (#71049)

This patch introduces a new enumerator `Invalid = 0`, shifting other enumerators by +1. Contrary to how it might sound, this actually affirms status quo of how this enum is stored in `clang::Decl`:
```
/// If 0, we have not computed the linkage of this declaration.
/// Otherwise, it is the linkage + 1.
mutable unsigned CacheValidAndLinkage : 3;
```
This patch makes debuggers to not be mistaken about enumerator stored in this bit-field. It also converts `clang::Linkage` to a scoped enum.

show more ...


# 65761200 01-Nov-2023 Vlad Serebrennikov <serebrennikov.vladislav@gmail.com>

[clang][NFC] Refactor `LinkageSpecDecl::LanguageIDs`

This patch converts `LinkageSpecDecl::LanguageIDs` into scoped enum, and moves it to namespace scope, so that it can be forward-declared where re

[clang][NFC] Refactor `LinkageSpecDecl::LanguageIDs`

This patch converts `LinkageSpecDecl::LanguageIDs` into scoped enum, and moves it to namespace scope, so that it can be forward-declared where required.

show more ...


# aaba3761 01-Nov-2023 Vlad Serebrennikov <serebrennikov.vladislav@gmail.com>

[clang][NFC] Refactor `ObjCMethodDecl::ImplementationControl`

This patch moves `ObjCMethodDecl::ImplementationControl` to a DeclBase.h so that it's complete at the point where corresponsing bit-fiel

[clang][NFC] Refactor `ObjCMethodDecl::ImplementationControl`

This patch moves `ObjCMethodDecl::ImplementationControl` to a DeclBase.h so that it's complete at the point where corresponsing bit-field is declared. This patch also converts it to a scoped enum `clang::ObjCImplementationControl`.

show more ...


# b0997097 31-Oct-2023 Joseph Huber <jhuber6@vols.utk.edu>

[StackProtector] Do not emit the stack protector on GPU architectures (#70799)

Summary:
This patch changes the code generation to not emit the stack protector
metadata on unsupported architectures.

[StackProtector] Do not emit the stack protector on GPU architectures (#70799)

Summary:
This patch changes the code generation to not emit the stack protector
metadata on unsupported architectures. The issue was caused by system
toolchains emitting stack protector option by default which would lead
to errors when compiling for the GPU. I elected to change the code
generation as we may want to update this in the future so we should keep
the `clang` Driver code common. Although the user can use some
combination of `-Xarch-device -fno-stack-protector` to override this, it
is very irritating to do when we shouldn't emit this incompatible IR
anyway.

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

show more ...


# 49fd28d9 31-Oct-2023 Vlad Serebrennikov <serebrennikov.vladislav@gmail.com>

[clang][NFC] Refactor `ArrayType::ArraySizeModifier`

This patch moves `ArraySizeModifier` before `Type` declaration so that it's complete at `ArrayTypeBitfields` declaration. It's also converted to

[clang][NFC] Refactor `ArrayType::ArraySizeModifier`

This patch moves `ArraySizeModifier` before `Type` declaration so that it's complete at `ArrayTypeBitfields` declaration. It's also converted to scoped enum along the way.

show more ...


# dd5d65ad 17-Oct-2023 Alex Voicu <alexandru.voicu@amd.com>

[HIP][Clang][CodeGen] Add CodeGen support for `hipstdpar`

This patch adds the CodeGen changes needed for enabling HIP parallel algorithm offload on AMDGPU targets. This change relaxes restrictions o

[HIP][Clang][CodeGen] Add CodeGen support for `hipstdpar`

This patch adds the CodeGen changes needed for enabling HIP parallel algorithm offload on AMDGPU targets. This change relaxes restrictions on what gets emitted on the device path, when compiling in `hipstdpar` mode:

1. Unless a function is explicitly marked `__host__`, it will get emitted, whereas before only `__device__` and `__global__` functions would be emitted;
2. Unsupported builtins are ignored as opposed to being marked as an error, as the decision on their validity is deferred to the `hipstdpar` specific code selection pass;
3. We add a `hipstdpar` specific pass to the opt pipeline, independent of optimisation level:
- When compiling for the host, iff the user requested it via the `--hipstdpar-interpose-alloc` flag, we add a pass which replaces canonical allocation / deallocation functions with accelerator aware equivalents.

A test to validate that unannotated functions get correctly emitted is added as well.

Reviewed by: yaxunl, efriedma

Differential Revision: https://reviews.llvm.org/D155850

show more ...


# b5dffd49 10-Oct-2023 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Modules] Don't emit function bodies which is noinline and av… (#68501)

…ailabl externally

A workaround for https://github.com/llvm/llvm-project/issues/60996

As the title suggested, we

[C++20] [Modules] Don't emit function bodies which is noinline and av… (#68501)

…ailabl externally

A workaround for https://github.com/llvm/llvm-project/issues/60996

As the title suggested, we can avoid emitting available externally
functions which is marked as noinline already. Such functions should
contribute nothing for optimizations.

The update for docs will be sent seperately if this got approved.

show more ...


# 85feb934 09-Oct-2023 Joseph Huber <jhuber6@vols.utk.edu>

[OpenMP] Fix setting visibility on declare target variables

Summary:
A previous patch changed the logic to force external visibliity on
declare target variables. This is because they need to be expo

[OpenMP] Fix setting visibility on declare target variables

Summary:
A previous patch changed the logic to force external visibliity on
declare target variables. This is because they need to be exported in
the dynamic symbol table to be usable as the standard depicts. However,
the logic was always setting the visibility to `protected`, which would
override some symbols. For example, when calling `libc` functions for
CPU offloading. This patch changes the logic to only fire if the
variable has hidden visibliity to start with.

show more ...


# 1d959f93 05-Oct-2023 Joseph Huber <35342157+jhuber6@users.noreply.github.com>

[OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (#68264)

Summary:
There's some logic in the AMDGPU target that manually resets the
requested visibility of certain variables

[OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (#68264)

Summary:
There's some logic in the AMDGPU target that manually resets the
requested visibility of certain variables. This was triggering when we
set a constant variable in OpenMP. However, we shouldn't do this for
OpenMP when the variable has the `nohost` type. That implies that the
variable is not visible to the host and therefore does not need to be
visible, so we should respect the original value of it.

show more ...


# 6907c3da 05-Oct-2023 JOE1994 <joseph942010@gmail.com>

[clang] Replace uses of Type::getPointerType (NFC)

Opaque pointer clean-up effort


# 9c89b295 02-Oct-2023 Matheus Izvekov <mizvekov@gmail.com>

-fsanitize=function: fix MSVC hashing to sugared type (#66816)

Hashing the sugared type instead of the canonical type meant that
a simple example like this would always fail under MSVC:

```
sta

-fsanitize=function: fix MSVC hashing to sugared type (#66816)

Hashing the sugared type instead of the canonical type meant that
a simple example like this would always fail under MSVC:

```
static auto l() {}
int main() {
auto a = l;
a();
}
```
`clang --target=x86_64-pc-windows-msvc -fno-exceptions
-fsanitize=function -g -O0 -fuse-ld=lld -o test.exe test.cc`

produces:
```
test.cc:4:3: runtime error: call to function l through pointer to incorrect function type 'void (*)()'
```

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init
# af475173 27-Jan-2022 Corentin Jabot <corentinjabot@gmail.com>

[C++] Implement "Deducing this" (P0847R7)

This patch implements P0847R7 (partially),
CWG2561 and CWG2653.

Reviewed By: aaron.ballman, #clang-language-wg

Differential Revision: https://reviews.llvm

[C++] Implement "Deducing this" (P0847R7)

This patch implements P0847R7 (partially),
CWG2561 and CWG2653.

Reviewed By: aaron.ballman, #clang-language-wg

Differential Revision: https://reviews.llvm.org/D140828

show more ...


# 3f092736 02-Oct-2023 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Modules] Fix crash when emitting module inits for duplicated modules

Close https://github.com/llvm/llvm-project/issues/67893

The root cause of the crash is an oversight that we missed the

[C++20] [Modules] Fix crash when emitting module inits for duplicated modules

Close https://github.com/llvm/llvm-project/issues/67893

The root cause of the crash is an oversight that we missed the point
that the same module can be imported multiple times. And we should use
`SmallSetVector` instead of `SmallVector` to filter the case.

show more ...


# 62205c2e 30-Sep-2023 JOE1994 <joseph942010@gmail.com>

[clang] Remove uses of llvm::Type::getPointerTo() (NFC)

* Remove if its sole use is to support an unnecessary ptr-to-ptr bitcast
(remove the bitcast as well)
* Replace with use of other APIs.

NFC

[clang] Remove uses of llvm::Type::getPointerTo() (NFC)

* Remove if its sole use is to support an unnecessary ptr-to-ptr bitcast
(remove the bitcast as well)
* Replace with use of other APIs.

NFC opaque pointer cleanup effort.

show more ...


12345678910>>...87