History log of /llvm-project/clang/lib/CodeGen/CodeGenModule.cpp (Results 626 – 650 of 2157)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e6125fc0 20-Oct-2019 Yaxun Liu <Yaxun.Liu@amd.com>

[AMDGPU] Fix assertion due to initializer list

Sometimes a global var is replaced by a different llvm value. clang use GetAddrOfGlobalVar to get the original llvm global variable.
For most targets,

[AMDGPU] Fix assertion due to initializer list

Sometimes a global var is replaced by a different llvm value. clang use GetAddrOfGlobalVar to get the original llvm global variable.
For most targets, GetAddrOfGlobalVar returns either the llvm global variable or a bitcast of the llvm global variable.
However, for AMDGPU target, GetAddrOfGlobalVar returns the addrspace cast or addrspace cast plus bitcast of the llvm global variable.
To get the llvm global variable, these casts need to be stripped, otherwise there is assertion.

This patch fixes that.

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

llvm-svn: 375362

show more ...


# 15984457 17-Oct-2019 Dmitry Mikulin <dmitry.mikulin@sony.com>

Revert Tag CFI-generated data structures with "#pragma clang section" attributes.

This reverts r375022 (git commit e2692b3bc0327606748b6d291b9009d2c845ced5)

llvm-svn: 375069


# e2692b3b 16-Oct-2019 Dmitry Mikulin <dmitry.mikulin@sony.com>

Tag CFI-generated data structures with "#pragma clang section" attributes.

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

llvm-svn: 375022


# 5836c356 15-Oct-2019 Sergey Dmitriev <serguei.n.dmitriev@intel.com>

[Clang][OpenMP Offload] Move offload registration code to the wrapper

The final list of OpenMP offload targets becomes known only at the link time and since offload registration code depends on the

[Clang][OpenMP Offload] Move offload registration code to the wrapper

The final list of OpenMP offload targets becomes known only at the link time and since offload registration code depends on the targets list it makes sense to delay offload registration code generation to the link time instead of adding it to the host part of every fat object. This patch moves offload registration code generation from clang to the offload wrapper tool.

This is the last part of the OpenMP linker script elimination patch https://reviews.llvm.org/D64943

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

llvm-svn: 374937

show more ...


# f14642f2 15-Oct-2019 Dmitry Mikulin <dmitry.mikulin@sony.com>

Added support for "#pragma clang section relro=<name>"

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

llvm-svn: 374934


# c2cd2d40 10-Oct-2019 Alexey Bataev <a.bataev@hotmail.com>

[OPENMP50]Support for declare variant directive for NVPTX target.

NVPTX does not support global aliases. Instead, we have to copy the full
body of the variant function for the original function.

ll

[OPENMP50]Support for declare variant directive for NVPTX target.

NVPTX does not support global aliases. Instead, we have to copy the full
body of the variant function for the original function.

llvm-svn: 374387

show more ...


# 48632af2 08-Oct-2019 Richard Smith <richard-llvm@metafoo.co.uk>

Fix crash or wrong code bug if a lifetime-extended temporary contains a
"non-constant" value.

If the constant evaluator evaluates part of a variable initializer,
including the initializer for some l

Fix crash or wrong code bug if a lifetime-extended temporary contains a
"non-constant" value.

If the constant evaluator evaluates part of a variable initializer,
including the initializer for some lifetime-extended temporary, but
fails to fully evaluate the initializer, it can leave behind wrong
values for temporaries encountered in that initialization. Don't try to
emit those from CodeGen! Instead, look at the values that constant
evaluation produced if (and only if) it actually succeeds and we're
emitting the lifetime-extending declaration's initializer as a constant.

llvm-svn: 374119

show more ...


# 772e266f 04-Oct-2019 Richard Smith <richard-llvm@metafoo.co.uk>

Properly handle instantiation-dependent array bounds.

We previously failed to treat an array with an instantiation-dependent
but not value-dependent bound as being an instantiation-dependent type.
W

Properly handle instantiation-dependent array bounds.

We previously failed to treat an array with an instantiation-dependent
but not value-dependent bound as being an instantiation-dependent type.
We now track the array bound expression as part of a constant array type
if it's an instantiation-dependent expression.

llvm-svn: 373685

show more ...


# 1fae7448 03-Oct-2019 Simon Pilgrim <llvm-dev@redking.me.uk>

Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.

llvm-svn: 373613


# c79099e0 03-Oct-2019 Guillaume Chatelet <gchatelet@google.com>

[Alignment][Clang][NFC] Add CharUnits::getAsAlign

Summary:
This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`.
This is patch is part of a series to introduce an Alignmen

[Alignment][Clang][NFC] Add CharUnits::getAsAlign

Summary:
This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`.
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, cfe-commits

Tags: #clang

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

llvm-svn: 373592

show more ...


# 2df5f12e 01-Oct-2019 Alexey Bataev <a.bataev@hotmail.com>

[OPENMP50]Initial codegen for declare variant implementation vendor.

Initial implementation of global aliases emission for the declare
variant pragma with implementation vendor context selector set.

[OPENMP50]Initial codegen for declare variant implementation vendor.

Initial implementation of global aliases emission for the declare
variant pragma with implementation vendor context selector set.

llvm-svn: 373387

show more ...


# 2b4fa534 29-Sep-2019 Richard Smith <richard-llvm@metafoo.co.uk>

For P0784R7: compute whether a variable has constant destruction if it
has a constexpr destructor.

For constexpr variables, reject if the variable does not have constant
destruction. In all cases, d

For P0784R7: compute whether a variable has constant destruction if it
has a constexpr destructor.

For constexpr variables, reject if the variable does not have constant
destruction. In all cases, do not emit runtime calls to the destructor
for variables with constant destruction.

llvm-svn: 373159

show more ...


# 350de4f0 24-Sep-2019 Adrian Prantl <aprantl@apple.com>

Support for DWARF-5 C++ language tags.

This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

Patch by Sourabh Singh Tomar!
Differential Revi

Support for DWARF-5 C++ language tags.

This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

Patch by Sourabh Singh Tomar!
Differential Revision: https://reviews.llvm.org/D67613

Reapplies r372663 after adapting a failing test in the LLDB testsuite.

llvm-svn: 372681

show more ...


# 5c49c267 23-Sep-2019 Jonas Devlieghere <jonas@devlieghere.com>

Revert "Support for DWARF-5 C++ language tags."

This reverts commit bf9c8ffb54943c6d77398adbedddf05ef9724007.

llvm-svn: 372672


# bf9c8ffb 23-Sep-2019 Adrian Prantl <aprantl@apple.com>

Support for DWARF-5 C++ language tags.

This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

Patch by Sourabh Singh Tomar!
Differential Revi

Support for DWARF-5 C++ language tags.

This patch provides support for DW_LANG_C_plus_plus_11,
DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

Patch by Sourabh Singh Tomar!
Differential Revision: https://reviews.llvm.org/D67613

llvm-svn: 372663

show more ...


# 9ca1b94a 11-Sep-2019 Fangrui Song <maskray@google.com>

[CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type

Multi-versioned functions defined by cpu_dispatch and implemented with IFunc
can not be called outside the transl

[CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type

Multi-versioned functions defined by cpu_dispatch and implemented with IFunc
can not be called outside the translation units where they are defined due to
lack of symbols. This patch add function aliases for these functions and thus
make them visible outside.

Differential Revision: https://reviews.llvm.org/D67058
Patch by Senran Zhang

llvm-svn: 371586

show more ...


# 729e242a 23-Aug-2019 Alexey Bataev <a.bataev@hotmail.com>

[OPENMP5.0]Add support for device_type clause in declare target
construct.

OpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, an

[OPENMP5.0]Add support for device_type clause in declare target
construct.

OpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, and any. Host means
that the function must be emitted only for the host, nohost - only for
the device, and any - for both, device and the host.

llvm-svn: 369775

show more ...


# f21bca02 22-Aug-2019 Nick Desaulniers <ndesaulniers@google.com>

[Clang][CodeGen] set alias linkage on QualType

Summary:
It seems that CodeGen was always using ExternalLinkage when emitting a
GlobalDecl with __attribute__((alias)). This leads to symbol
redefiniti

[Clang][CodeGen] set alias linkage on QualType

Summary:
It seems that CodeGen was always using ExternalLinkage when emitting a
GlobalDecl with __attribute__((alias)). This leads to symbol
redefinitions (ODR) that cause failures at link time for static aliases.
This is readily attempting to link an ARM (32b) allyesconfig Linux
kernel built with Clang.

Reported-by: nathanchance
Suggested-by: ihalip
Link: https://bugs.llvm.org/show_bug.cgi?id=42377
Link: https://github.com/ClangBuiltLinux/linux/issues/631

Reviewers: rsmith, aaron.ballman, erichkeane

Reviewed By: aaron.ballman

Subscribers: javed.absar, kristof.beyls, cfe-commits, srhines, ihalip, nathanchance

Tags: #clang

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

llvm-svn: 369705

show more ...


# 2b3d49b6 14-Aug-2019 Jonas Devlieghere <jonas@devlieghere.com>

[Clang] Migrate llvm::make_unique to std::make_unique

Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
o

[Clang] Migrate llvm::make_unique to std::make_unique

Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.

Differential revision: https://reviews.llvm.org/D66259

llvm-svn: 368942

show more ...


# 0e497d15 09-Aug-2019 Peter Collingbourne <peter@pcc.me.uk>

cfi-icall: Allow the jump table to be optionally made non-canonical.

The default behavior of Clang's indirect function call checker will replace
the address of each CFI-checked function in the outpu

cfi-icall: Allow the jump table to be optionally made non-canonical.

The default behavior of Clang's indirect function call checker will replace
the address of each CFI-checked function in the output file's symbol table
with the address of a jump table entry which will pass CFI checks. We refer
to this as making the jump table `canonical`. This property allows code that
was not compiled with ``-fsanitize=cfi-icall`` to take a CFI-valid address
of a function, but it comes with a couple of caveats that are especially
relevant for users of cross-DSO CFI:

- There is a performance and code size overhead associated with each
exported function, because each such function must have an associated
jump table entry, which must be emitted even in the common case where the
function is never address-taken anywhere in the program, and must be used
even for direct calls between DSOs, in addition to the PLT overhead.

- There is no good way to take a CFI-valid address of a function written in
assembly or a language not supported by Clang. The reason is that the code
generator would need to insert a jump table in order to form a CFI-valid
address for assembly functions, but there is no way in general for the
code generator to determine the language of the function. This may be
possible with LTO in the intra-DSO case, but in the cross-DSO case the only
information available is the function declaration. One possible solution
is to add a C wrapper for each assembly function, but these wrappers can
present a significant maintenance burden for heavy users of assembly in
addition to adding runtime overhead.

For these reasons, we provide the option of making the jump table non-canonical
with the flag ``-fno-sanitize-cfi-canonical-jump-tables``. When the jump
table is made non-canonical, symbol table entries point directly to the
function body. Any instances of a function's address being taken in C will
be replaced with a jump table address.

This scheme does have its own caveats, however. It does end up breaking
function address equality more aggressively than the default behavior,
especially in cross-DSO mode which normally preserves function address
equality entirely.

Furthermore, it is occasionally necessary for code not compiled with
``-fsanitize=cfi-icall`` to take a function address that is valid
for CFI. For example, this is necessary when a function's address
is taken by assembly code and then called by CFI-checking C code. The
``__attribute__((cfi_jump_table_canonical))`` attribute may be used to make
the jump table entry of a specific function canonical so that the external
code will end up taking a address for the function that will pass CFI checks.

Fixes PR41972.

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

llvm-svn: 368495

show more ...


# a5af2383 09-Aug-2019 Saleem Abdulrasool <compnerd@compnerd.org>

CodeGen: ensure 8-byte aligned String Swift CF ABI

CFStrings should be 8-byte aligned when built for the Swift CF runtime
ABI as the atomic CF info field must be properly aligned. This is a
problem

CodeGen: ensure 8-byte aligned String Swift CF ABI

CFStrings should be 8-byte aligned when built for the Swift CF runtime
ABI as the atomic CF info field must be properly aligned. This is a
problem on 32-bit platforms which would give the structure 4-byte
alignment rather than 8-byte alignment.

llvm-svn: 368471

show more ...


# 49a3ad21 16-Jul-2019 Rui Ueyama <ruiu@google.com>

Fix parameter name comments using clang-tidy. NFC.

This patch applies clang-tidy's bugprone-argument-comment tool
to LLVM, clang and lld source trees. Here is how I created this
patch:

$ git clone

Fix parameter name comments using clang-tidy. NFC.

This patch applies clang-tidy's bugprone-argument-comment tool
to LLVM, clang and lld source trees. Here is how I created this
patch:

$ git clone https://github.com/llvm/llvm-project.git
$ cd llvm-project
$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \
-DLLVM_ENABLE_PROJECTS='clang;lld;clang-tools-extra' \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_LLD=On \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../llvm
$ ninja
$ parallel clang-tidy -checks='-*,bugprone-argument-comment' \
-config='{CheckOptions: [{key: StrictMode, value: 1}]}' -fix \
::: ../llvm/lib/**/*.{cpp,h} ../clang/lib/**/*.{cpp,h} ../lld/**/*.{cpp,h}

llvm-svn: 366177

show more ...


# c5e7f562 15-Jul-2019 Evgeniy Stepanov <eugeni.stepanov@gmail.com>

ARM MTE stack sanitizer.

Add "memtag" sanitizer that detects and mitigates stack memory issues
using armv8.5 Memory Tagging Extension.

It is similar in principle to HWASan, which is a software impl

ARM MTE stack sanitizer.

Add "memtag" sanitizer that detects and mitigates stack memory issues
using armv8.5 Memory Tagging Extension.

It is similar in principle to HWASan, which is a software implementation
of the same idea, but there are enough differencies to warrant a new
sanitizer type IMHO. It is also expected to have very different
performance properties.

The new sanitizer does not have a runtime library (it may grow one
later, along with a "debugging" mode). Similar to SafeStack and
StackProtector, the instrumentation pass (in a follow up change) will be
inserted in all cases, but will only affect functions marked with the
new sanitize_memtag attribute.

Reviewers: pcc, hctim, vitalybuka, ostannard

Subscribers: srhines, mehdi_amini, javed.absar, kristof.beyls, hiraditya, cryptoad, steven_wu, dexonsmith, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 366123

show more ...


# 960ff081 15-Jul-2019 Anastasia Stulova <anastasia.stulova@arm.com>

[OpenCL][PR41727] Prevent ICE on global dtors

Pass NULL to pointer arg of __cxa_atexit if addr space
is not matching with its param. This doesn't align yet
with how dtors are generated that should b

[OpenCL][PR41727] Prevent ICE on global dtors

Pass NULL to pointer arg of __cxa_atexit if addr space
is not matching with its param. This doesn't align yet
with how dtors are generated that should be changed too.

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

llvm-svn: 366059

show more ...


# d7aae33a 10-Jul-2019 Saar Raz <saar@raz.email>

[Concepts] Concept definitions (D40381)

First in a series of patches to land C++2a Concepts support.
This patch adds AST and parsing support for concept-declarations.

llvm-svn: 365699


1...<<21222324252627282930>>...87