History log of /llvm-project-15.0.7/clang/lib/CodeGen/CodeGenModule.cpp (Results 776 – 800 of 1864)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 6eaa8323 28-Aug-2015 Hans Wennborg <[email protected]>

Allow TLS vars in dllimport/export functions; only inline dllimport functions when safe (PR24593)

This patch does two things:

1) Don't error about dllimport/export on thread-local static local vari

Allow TLS vars in dllimport/export functions; only inline dllimport functions when safe (PR24593)

This patch does two things:

1) Don't error about dllimport/export on thread-local static local variables.
We put those attributes on static locals in dllimport/export functions
implicitly in case the function gets inlined. Now, for TLS variables this
is a problem because we can't import such variables, but it's a benign
problem becase:

2) Make sure we never inline a dllimport function TLS static locals. In fact,
never inline a dllimport function that references a non-imported function
or variable (because these are not defined in the importing library). This
seems to match MSVC's behaviour.

Differential Revision: http://reviews.llvm.org/D12422

llvm-svn: 246338

show more ...


Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4
# 284ebe23 22-Aug-2015 Jingyue Wu <[email protected]>

[CUDA] Change initializer for CUDA device code based on CUDA documentation.

Summary:
According to CUDA documentation, global variables declared with __device__,
__constant__ can be initialized from

[CUDA] Change initializer for CUDA device code based on CUDA documentation.

Summary:
According to CUDA documentation, global variables declared with __device__,
__constant__ can be initialized from host code, so mark them as
externally initialized. Because __shared__ variables cannot have an
initialization as part of their declaration and since the value maybe kept
across different kernel invocation, the value of __shared__ is effectively
undefined instead of zero initialized.

Wrongly using zero initializer may cause illegitimate optimization, e.g.
removing unused __constant__ variable because it's not updated in the device
code and the value is initialized with zero.

Test Plan: test/CodeGenCUDA/address-spaces.cu

Patch by Xuetian Weng

Reviewers: jholewinski, eliben, tra, jingyue

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12241

llvm-svn: 245786

show more ...


Revision tags: llvmorg-3.7.0-rc3
# c52efa7d 19-Aug-2015 Richard Smith <[email protected]>

[modules] Don't eagerly deserialize so many ImportDecls. CodeGen basically ignores ImportDecls imported from modules, so only eagerly deserialize the ones from a PCH / preamble.

llvm-svn: 245406


# 2dcef9e0 13-Aug-2015 David Majnemer <[email protected]>

Avoid iteration invalidation issues around MaterializedTemporaryExpr

We risk iterator invalidation issues if we use a DenseMap to hold the
backing storage for an APValue. Instead, BumpPtrAllocate t

Avoid iteration invalidation issues around MaterializedTemporaryExpr

We risk iterator invalidation issues if we use a DenseMap to hold the
backing storage for an APValue. Instead, BumpPtrAllocate them and
use APValue * as our DenseMap value.

Also, don't assume that MaterializedGlobalTemporaryMap won't regrow
between when we initially perform a lookup and later on when we actually
try to insert into it.

This fixes PR24289.

Differential Revision: http://reviews.llvm.org/D11629

llvm-svn: 244989

show more ...


# 556b21aa 13-Aug-2015 Yaron Keren <[email protected]>

Remove and forbid raw_svector_ostream::flush() calls.
After r244870 flush() will only compare two null pointers and return,
doing nothing but wasting run time. The call is not required any more
as th

Remove and forbid raw_svector_ostream::flush() calls.
After r244870 flush() will only compare two null pointers and return,
doing nothing but wasting run time. The call is not required any more
as the stream and its SmallString are always in sync.

Thanks to David Blaikie for reviewing.

llvm-svn: 244928

show more ...


# 02d5d86b 06-Aug-2015 Eric Christopher <[email protected]>

Rename the non-coding style conformant functions in namespace Builtins
to match the rest of their brethren and reformat the bits that need it.

llvm-svn: 244186


# 124955aa 05-Aug-2015 Reid Kleckner <[email protected]>

Add -gcodeview and -gdwarf to control which type Clang emits

Summary:
By default, 'clang' emits dwarf and 'clang-cl' emits codeview. You can
force emission of one or both by passing -gcodeview and

Add -gcodeview and -gdwarf to control which type Clang emits

Summary:
By default, 'clang' emits dwarf and 'clang-cl' emits codeview. You can
force emission of one or both by passing -gcodeview and -gdwarf to
either driver.

Reviewers: dblaikie, hans

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11742

llvm-svn: 244097

show more ...


Revision tags: llvmorg-3.7.0-rc2
# 203f0922 28-Jul-2015 Justin Bogner <[email protected]>

InstrProf: Fix a misuse of the FunctionDecl API when generating coverage

This was calling FD->hasBody(), meaning "Does the function that this
decl refers to have a body?", rather than
FD->doesThisDe

InstrProf: Fix a misuse of the FunctionDecl API when generating coverage

This was calling FD->hasBody(), meaning "Does the function that this
decl refers to have a body?", rather than
FD->doesThisDeclarationHaveABody(), meaning "Is this decl a
non-deleted definition?".

We might want to consider renaming these APIs :/

llvm-svn: 243360

show more ...


# ca3cf9e6 24-Jul-2015 Mehdi Amini <[email protected]>

LLVM API Change: the Module always owns the DataLayout

From: Mehdi Amini <[email protected]>
llvm-svn: 243115


Revision tags: llvmorg-3.7.0-rc1
# f8b5012d 13-Jul-2015 Samuel Antao <[email protected]>

[OpenMP] Add TLS-based implementation for threadprivate directive.

llvm-svn: 242080


# c4bb47e3 30-Jun-2015 Adrian Prantl <[email protected]>

Debug Info: Emit debug info for @import declarations.

This allows a module-aware debugger such as LLDB to import the currently
visible modules before dropping into the expression evaluator.

rdar://

Debug Info: Emit debug info for @import declarations.

This allows a module-aware debugger such as LLDB to import the currently
visible modules before dropping into the expression evaluator.

rdar://problem/20965932

llvm-svn: 241084

show more ...


# 64b0bdf8 30-Jun-2015 David Majnemer <[email protected]>

[CodeGen] Tweak isTriviallyRecursive further

isTriviallyRecursive is a hack used to bridge a gap between the
expectations that source code assumes and the semantics that LLVM IR can
provide. Specif

[CodeGen] Tweak isTriviallyRecursive further

isTriviallyRecursive is a hack used to bridge a gap between the
expectations that source code assumes and the semantics that LLVM IR can
provide. Specifically, asm labels on functions are treated as an
explicit name for a GlobalObject in Clang but treated like an
output-processing step in GCC. Tweak this hack a little further to emit
calls to library functions instead of emitting an incorrect definition.
The definition in question would have available_externally linkage (this
is OK) but result in a call to itself which will either result in an
infinite loop or stack overflow.

This fixes PR23964.

llvm-svn: 241043

show more ...


# e74f525b 30-Jun-2015 Adrian Prantl <[email protected]>

Pass HeaderSearchOptions and PreprocessorOptions into CodeGenModule.
In order to produce debug info for clang modules CGDebugInfo it needs
access to macros passed on the command line and the isysroot

Pass HeaderSearchOptions and PreprocessorOptions into CodeGenModule.
In order to produce debug info for clang modules CGDebugInfo it needs
access to macros passed on the command line and the isysroot.

llvm-svn: 241035

show more ...


# 41011f67 25-Jun-2015 David Majnemer <[email protected]>

[CodeGen] Restrict isTriviallyRecursive to predefined lib functions forwarding to lib functions

isTriviallyRecursive is only supposed to guard functions part of the
implementation.

This fixes PR239

[CodeGen] Restrict isTriviallyRecursive to predefined lib functions forwarding to lib functions

isTriviallyRecursive is only supposed to guard functions part of the
implementation.

This fixes PR23953.

llvm-svn: 240735

show more ...


# 5aecacb2 25-Jun-2015 Diego Novillo <[email protected]>

Display profile file name when emitting a file not found diagnostic.

When a profile file cannot be opened, we used to display just the error
message but not the name of the profile the compiler was

Display profile file name when emitting a file not found diagnostic.

When a profile file cannot be opened, we used to display just the error
message but not the name of the profile the compiler was trying to open.
This will become useful in the next set of patches that introduce
GCC-compatible flags to specify profiles.

llvm-svn: 240715

show more ...


Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1
# ab9db510 22-Jun-2015 Alexander Kornienko <[email protected]>

Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").

llvm-svn: 240353


# 3d9d929e 22-Jun-2015 Alexander Kornienko <[email protected]>

Fixed/added namespace ending comments using clang-tidy. NFC

The patch is generated using this command:

$ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
-checks=-*,llvm-namespace-comme

Fixed/added namespace ending comments using clang-tidy. NFC

The patch is generated using this command:

$ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
-checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
work/llvm/tools/clang

To reduce churn, not touching namespaces spanning less than 10 lines.

llvm-svn: 240270

show more ...


# b9b73ef9 19-Jun-2015 Alexander Potapenko <[email protected]>

[ASan] Initial support for Kernel AddressSanitizer

This patch adds initial support for the -fsanitize=kernel-address flag to Clang.
Right now it's quite restricted: only out-of-line instrumentation

[ASan] Initial support for Kernel AddressSanitizer

This patch adds initial support for the -fsanitize=kernel-address flag to Clang.
Right now it's quite restricted: only out-of-line instrumentation is supported, globals are not instrumented, some GCC kasan flags are not supported.
Using this patch I am able to build and boot the KASan tree with LLVMLinux patches from github.com/ramosian-glider/kasan/tree/kasan_llvmlinux.
To disable KASan instrumentation for a certain function attribute((no_sanitize("kernel-address"))) can be used.

llvm-svn: 240131

show more ...


# 86d34a72 17-Jun-2015 Peter Collingbourne <[email protected]>

CodeGen: Factor out some of the bitset entry creation code. NFC.

llvm-svn: 239927


# b54db52a 11-Jun-2015 Yaron Keren <[email protected]>

C++11 rangify several loops.

llvm-svn: 239528


# 162c91cc 05-Jun-2015 Eric Christopher <[email protected]>

Rename the single non-style conformant function in TargetCodeGenInfo
and update all callers.

llvm-svn: 239193


# 3204b152 29-May-2015 Benjamin Kramer <[email protected]>

Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types

If the type isn't trivially moveable emplace can skip a potentially
expensive move. It also saves a couple of charact

Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types

If the type isn't trivially moveable emplace can skip a potentially
expensive move. It also saves a couple of characters.


Call sites were found with the ASTMatcher + some semi-automated cleanup.

memberCallExpr(
argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
hasArgument(0, bindTemporaryExpr(
hasType(recordDecl(hasNonTrivialDestructor())),
has(constructExpr()))),
unless(isInTemplateInstantiation()))

No functional change intended.

llvm-svn: 238601

show more ...


# bb4f962a 28-May-2015 Hans Wennborg <[email protected]>

Get the dll storage class right for structors of classes exported/imported via explicit instantiation (PR23667)

This is a follow-up to r238266. It turned out structors are codegened through a differ

Get the dll storage class right for structors of classes exported/imported via explicit instantiation (PR23667)

This is a follow-up to r238266. It turned out structors are codegened through a different path,
and didn't get the storage class set in EmitGlobalFunctionDefinition.

llvm-svn: 238443

show more ...


# 2f1637ad 20-May-2015 Pete Cooper <[email protected]>

Use Intrinsic::ID instead of unsigned. NFC.

This is after LLVM r237810 which made Function::getIntrinsicID() return an Intrinsic::ID.

llvm-svn: 237811


# 42413141 15-May-2015 Richard Smith <[email protected]>

[modules] Add local submodule visibility support for declarations.

With this change, enabling -fmodules-local-submodule-visibility results in name
visibility rules being applied to submodules of the

[modules] Add local submodule visibility support for declarations.

With this change, enabling -fmodules-local-submodule-visibility results in name
visibility rules being applied to submodules of the current module in addition
to imported modules (that is, names no longer "leak" between submodules of the
same top-level module). This also makes it much safer to textually include a
non-modular library into a module: each submodule that textually includes that
library will get its own "copy" of that library, and so the library becomes
visible no matter which including submodule you import.

llvm-svn: 237473

show more ...


1...<<31323334353637383940>>...75