History log of /llvm-project-15.0.7/clang/lib/CodeGen/CodeGenModule.cpp (Results 1051 – 1075 of 1864)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 5f2b1ce2 24-May-2013 Diego Novillo <[email protected]>

[PATCH] Generate cold attribute for functions marked __atribute__((cold))

This removes a FIXME in CodeGenModule::SetLLVMFunctionAttributesForDefinition.
When a function is declared cold we can now g

[PATCH] Generate cold attribute for functions marked __atribute__((cold))

This removes a FIXME in CodeGenModule::SetLLVMFunctionAttributesForDefinition.
When a function is declared cold we can now generate the IR attribute in
addition to marking the function to be optimized for size.

I tried adding a separate CHECK in the existing test, but it was
failing. I suppose CHECK matches one line exactly once? This would be
a problem if the attributes are listed in a different order, though they
seem to be sorted.

llvm-svn: 182666

show more ...


Revision tags: llvmorg-3.3.0-rc2
# f121b930 20-May-2013 David Blaikie <[email protected]>

PR14606: Debug Info for namespace aliases/DW_TAG_imported_module

This resolves the last of the PR14606 failures in the GDB 7.5 test
suite. (but there are still unresolved issues in the imported_decl

PR14606: Debug Info for namespace aliases/DW_TAG_imported_module

This resolves the last of the PR14606 failures in the GDB 7.5 test
suite. (but there are still unresolved issues in the imported_decl case
- we need to implement optional/lazy decls for functions & variables
like we already do for types)

llvm-svn: 182329

show more ...


# b144d366 20-May-2013 Reid Kleckner <[email protected]>

Implement __declspec(selectany) under -fms-extensions

selectany only applies to externally visible global variables. It has
the effect of making the data weak_odr.

The MSDN docs suggest that unuse

Implement __declspec(selectany) under -fms-extensions

selectany only applies to externally visible global variables. It has
the effect of making the data weak_odr.

The MSDN docs suggest that unused definitions can only be dropped at
linktime, so Clang uses weak instead of linkonce. MSVC optimizes away
references to constant selectany data, so it must assume that there is
only one definition, hence weak_odr.

Reviewers: espindola

Differential Revision: http://llvm-reviews.chandlerc.com/D814

llvm-svn: 182266

show more ...


# 3ae00052 13-May-2013 Rafael Espindola <[email protected]>

Cleanup handling of UniqueExternalLinkage.

This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.

Linkage, as defined

Cleanup handling of UniqueExternalLinkage.

This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.

Linkage, as defined in the c++ standard, is provided by
getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage.

Most places in the compiler actually want isExternallyVisible, which
handles UniqueExternalLinkage as internal.

llvm-svn: 181677

show more ...


# 2960dbdd 11-May-2013 Benjamin Kramer <[email protected]>

CodeGen: Refactor SetLLVMFunctionAttributesForDefinition to use an AttrBuilder.

Adding attributes to a uniqued set has become expensive, don't do it more often
than necessary. No functionality chang

CodeGen: Refactor SetLLVMFunctionAttributesForDefinition to use an AttrBuilder.

Adding attributes to a uniqued set has become expensive, don't do it more often
than necessary. No functionality change.

llvm-svn: 181662

show more ...


# ffcf4ba9 09-May-2013 Adrian Prantl <[email protected]>

Debug Info: Fix a problem that resulted in missing DW_AT_specifications
for C++ constructors.

If the DIType for a class was generated by
CGDebugInfo::createContextChain(), the cache contains only a

Debug Info: Fix a problem that resulted in missing DW_AT_specifications
for C++ constructors.

If the DIType for a class was generated by
CGDebugInfo::createContextChain(), the cache contains only a
limited DIType wihtout any declarations. Since EmitFunctionStart()
needs to find the canonical declaration for each method, we
construct the complete type before emitting any method.

rdar://problem/13116508

llvm-svn: 181561

show more ...


# e43f0fea 08-May-2013 Reid Kleckner <[email protected]>

Forward #pragma comment(lib/linker) through as flags metadata

Summary:
Most of this change is wiring the pragma all the way through from the
lexer, parser, and sema to codegen. I considered adding

Forward #pragma comment(lib/linker) through as flags metadata

Summary:
Most of this change is wiring the pragma all the way through from the
lexer, parser, and sema to codegen. I considered adding a Decl AST node
for this, but it seemed too heavyweight.

Mach-O already uses a metadata flag called "Linker Options" to do this
kind of auto-linking. This change follows that pattern.

LLVM knows how to forward the "Linker Options" metadata into the COFF
.drectve section where these flags belong. ELF support is not
implemented, but possible.

This is related to auto-linking, which is http://llvm.org/PR13016.

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D723

llvm-svn: 181426

show more ...


Revision tags: llvmorg-3.3.0-rc1
# fa806422 06-May-2013 Ulrich Weigand <[email protected]>

Allow targets to define minimum alignment for global variables

This patch adds a new common code feature that allows platform code to
request minimum alignment of global symbols. The background for

Allow targets to define minimum alignment for global variables

This patch adds a new common code feature that allows platform code to
request minimum alignment of global symbols. The background for this is
that on SystemZ, the most efficient way to load addresses of global symbol
is the LOAD ADDRESS RELATIVE LONG (LARL) instruction. This instruction
provides PC-relative addressing, but only to *even* addresses. For this
reason, existing compilers will guarantee that global symbols are always
aligned to at least 2. [ Since symbols would otherwise already use a
default alignment based on their type, this will usually only affect global
objects of character type or character arrays. ] GCC also allows creating
symbols without that extra alignment by using explicit "aligned" attributes
(which then need to be used on both definition and each use of the symbol).

To enable support for this with Clang, this patch adds a
TargetInfo::MinGlobalAlign variable that provides a global minimum for the
alignment of every global object (unless overridden via explicit alignment
attribute), and adds code to respect this setting. Within this patch, no
platform actually sets the value to anything but the default 1, resulting
in no change in behaviour on any existing target.

This version of the patch incorporates feedback from reviews by
Eric Christopher and John McCall. Thanks to all reviewers!

Patch by Richard Sandiford.

llvm-svn: 181210

show more ...


# 593537a9 05-May-2013 Rafael Espindola <[email protected]>

Make all 'is in extern "C"' tests use the lexical context.

I was not able to find a case (other than the fix in r181163) where this
makes a difference, but it is a more obviously correct API to have

Make all 'is in extern "C"' tests use the lexical context.

I was not able to find a case (other than the fix in r181163) where this
makes a difference, but it is a more obviously correct API to have.

llvm-svn: 181165

show more ...


# acb8ecd6 04-May-2013 Enea Zaffanella <[email protected]>

In VarDecl nodes, store the thread storage class specifier as written.

llvm-svn: 181113


# 95cae88b 02-May-2013 Bill Wendling <[email protected]>

Use the Itanium ABI for thread_local on Darwin.

After some discussion, it was decided to use the Itanium ABI for thread_local on
Darwin OS X platforms. This involved a couple of changes. First, we u

Use the Itanium ABI for thread_local on Darwin.

After some discussion, it was decided to use the Itanium ABI for thread_local on
Darwin OS X platforms. This involved a couple of changes. First, we use
"_tlv_atexit" instead of "__cxa_thread_atexit". Secondly, the global variables
are marked with 'internal' linkage, because we want all access to be calls to
the Itanium-specific entry point, which has normal linkage.
<rdar://problem/13733006>

llvm-svn: 180941

show more ...


# e6c878c0 30-Apr-2013 Richard Smith <[email protected]>

Revert r180739 and r180748: they broke C++11 thread_local on non-Darwin systems and did not do the right thing on Darwin.

Original commit message:

Emit the TLS intialization functions into a list.

Revert r180739 and r180748: they broke C++11 thread_local on non-Darwin systems and did not do the right thing on Darwin.

Original commit message:

Emit the TLS intialization functions into a list.

Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the correct
section. This way they're called before `main().'

<rdar://problem/13733006>

llvm-svn: 180809

show more ...


# 96a77693 29-Apr-2013 Bill Wendling <[email protected]>

Emit the TLS intialization functions into a list.

Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the c

Emit the TLS intialization functions into a list.

Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the correct
section. This way they're called before `main().'

<rdar://problem/13733006>

llvm-svn: 180739

show more ...


# 60a9fbf9 26-Apr-2013 David Blaikie <[email protected]>

Support debug info for using directives at global/namespace scope.

llvm-svn: 180594


# 1847baa2 22-Apr-2013 Richard Smith <[email protected]>

Don't emit _ZTW wrappers for TLS variables which don't use the C++ thread_local keyword.

llvm-svn: 180004


# 2fd1d7ae 19-Apr-2013 Richard Smith <[email protected]>

Implement CodeGen for C++11 thread_local, following the Itanium ABI specification as discussed on cxx-abi-dev.

llvm-svn: 179858


# 568d4100 16-Apr-2013 John McCall <[email protected]>

Don't propagate around TargetOptions in IR-gen; we don't use it.

Patch by Stephen Lin!

llvm-svn: 179639


# c8e01705 16-Apr-2013 John McCall <[email protected]>

Standardize accesses to the TargetInfo in IR-gen.

Patch by Stephen Lin!

llvm-svn: 179638


# e246fbe4 16-Apr-2013 Daniel Dunbar <[email protected]>

[Modules] Convert module specific -fno-modules-autolink into -fno-autolink.

- There is no reason to have a modules specific flag for disabling
autolinking. Instead, convert the existing flag int

[Modules] Convert module specific -fno-modules-autolink into -fno-autolink.

- There is no reason to have a modules specific flag for disabling
autolinking. Instead, convert the existing flag into -fno-autolink (which
should cover other autolinking code generation paths like #pragmas if and
when we support them).

llvm-svn: 179612

show more ...


# d1b6778e 16-Apr-2013 Fariborz Jahanian <[email protected]>

Objective-C IRGen. Use llvm::WeakVH
for caching couple of global symbols used
for generation of CF/NS string meta-data
so they are not released prematuely in certain
corner cases. // rdar:// 13598026

Objective-C IRGen. Use llvm::WeakVH
for caching couple of global symbols used
for generation of CF/NS string meta-data
so they are not released prematuely in certain
corner cases. // rdar:// 13598026.
Reviewed by John M.

llvm-svn: 179599

show more ...


# dbf74bae 14-Apr-2013 Richard Smith <[email protected]>

CodeGen support for function-local static thread_local variables with
non-constant constructors or non-trivial destructors. Plus bugfixes for
thread_local references bound to temporaries (the tempora

CodeGen support for function-local static thread_local variables with
non-constant constructors or non-trivial destructors. Plus bugfixes for
thread_local references bound to temporaries (the temporaries themselves are
lifetime-extended to become thread_local), and the corresponding case for
std::initializer_list.

llvm-svn: 179496

show more ...


# fd3834f7 13-Apr-2013 Richard Smith <[email protected]>

Annotate flavor of TLS variable (statically or dynamically initialized) onto the AST.

llvm-svn: 179447


# f21c9617 13-Apr-2013 Richard Smith <[email protected]>

Use MapVector rather than simulating it.

llvm-svn: 179438


# e1ad74e6 11-Apr-2013 Manman Ren <[email protected]>

Struct-path aware TBAA: uniformize scalar tag and path tag.

For struct-path aware TBAA, we used to use scalar type node as the scalar tag,
which has an incompatible format with the struct path tag.

Struct-path aware TBAA: uniformize scalar tag and path tag.

For struct-path aware TBAA, we used to use scalar type node as the scalar tag,
which has an incompatible format with the struct path tag. We now use the same
format: base type, access type and offset.

We also uniformize the scalar type node and the struct type node: name, a list
of pairs (offset + pointer to MDNode). For scalar type, we have a single pair.
These are to make implementaiton of aliasing rules easier.

llvm-svn: 179335

show more ...


# 85465e60 06-Apr-2013 Richard Smith <[email protected]>

Remove nondeterminism introduced in r178950.

llvm-svn: 178952


1...<<41424344454647484950>>...75