History log of /llvm-project/clang/lib/CodeGen/CodeGenModule.cpp (Results 801 – 825 of 2157)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 922f2aa9 23-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Bring r325915 back.

The tests that failed on a windows host have been fixed.

Original message:

Start setting dso_local for COFF.

With this there are still some GVs where we don't set dso_local
be

Bring r325915 back.

The tests that failed on a windows host have been fixed.

Original message:

Start setting dso_local for COFF.

With this there are still some GVs where we don't set dso_local
because setGVProperties is never called. I intend to fix that in
followup commits. This is just the bare minimum to teach
shouldAssumeDSOLocal what it should do for COFF.

llvm-svn: 325940

show more ...


# 43ce3a3a 23-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Revert "Start setting dso_local for COFF."

This reverts commit r325915.

It will take some time to fix the failures on a windows host.

llvm-svn: 325929


# 004d240b 23-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Start setting dso_local for COFF.

With this there are still some GVs where we don't set dso_local
because setGVProperties is never called. I intend to fix that in
followup commits. This is just the

Start setting dso_local for COFF.

With this there are still some GVs where we don't set dso_local
because setGVProperties is never called. I intend to fix that in
followup commits. This is just the bare minimum to teach
shouldAssumeDSOLocal what it should do for COFF.

llvm-svn: 325915

show more ...


Revision tags: llvmorg-6.0.0-rc3
# 3dd49812 23-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Simplify setting dso_local. NFC.

The value of dso_local can be computed from just IR properties and
global information (object file type, command line options, etc).

With this patch we no longer pa

Simplify setting dso_local. NFC.

The value of dso_local can be computed from just IR properties and
global information (object file type, command line options, etc).

With this patch we no longer pass in the Decl. It was almost unused
and making it fully unused guarantees that dso_local is consistent
with the rest of the IR.

llvm-svn: 325846

show more ...


# 124a2187 20-Feb-2018 Ivan A. Kosarev <ikosarev@accesssoftek.com>

[CodeGen] Fix generation of TBAA tags for may-alias accesses

This patch fixes creating TBAA access descriptors for
may_alias-marked access types. Currently, for such types we
generate ordinary descr

[CodeGen] Fix generation of TBAA tags for may-alias accesses

This patch fixes creating TBAA access descriptors for
may_alias-marked access types. Currently, for such types we
generate ordinary descriptors with char as its access type. The
patch changes this to produce proper may-alias descriptors.

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

llvm-svn: 325575

show more ...


# 93e58667 12-Feb-2018 Erich Keane <erich.keane@intel.com>

Make attribute-target on a Definition-after-use update the LLVM attributes

As reported here: https://bugs.llvm.org/show_bug.cgi?id=36301
The issue is that the 'use' causes the plain declaration to e

Make attribute-target on a Definition-after-use update the LLVM attributes

As reported here: https://bugs.llvm.org/show_bug.cgi?id=36301
The issue is that the 'use' causes the plain declaration to emit
the attributes to LLVM-IR. However, if the definition added it
later, these would silently disappear.

This commit extracts that logic to its own function in CodeGenModule,
and has the attribute-applications done during 'definition' update
the attributes properly.

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

llvm-svn: 324907

show more ...


# 30994d24 08-Feb-2018 Erich Keane <erich.keane@intel.com>

Fix improper indentation issue in CodeGenModule [NFC]

llvm-svn: 324644


# 75e57369 07-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Don't try to use copy relocations with tls variables.

Should fix the lldb bot.

llvm-svn: 324539


# 699f5d6b 07-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Recommit r324107 again.

The difference from the previous try is that we no longer directly
access function declarations from position independent executables. It
should work, but currently doesn't w

Recommit r324107 again.

The difference from the previous try is that we no longer directly
access function declarations from position independent executables. It
should work, but currently doesn't with some linkers.

It now includes a fix to not mark available_externally definitions as
dso_local.

Original message:

Start setting dso_local in clang.

This starts adding dso_local to clang.

The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go
away. My objective for now is to move enough of it to clang to remove
the need for the TargetMachine one to handle PIE copy relocations and
-fno-plt. With that it should then be easy to implement a
-fno-copy-reloc in clang.

This patch just adds the cases where we assume a symbol to be local
based on the file being compiled for an executable or a shared
library.

llvm-svn: 324535

show more ...


Revision tags: llvmorg-6.0.0-rc2
# 880c3b24 07-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Revert "Recommit r324107."

This reverts commit r324500.

The bots found two failures:

ThreadSanitizer-x86_64 :: Linux/pie_no_aslr.cc
ThreadSanitizer-x86_64 :: pie_test.cc

when using gold.

Revert "Recommit r324107."

This reverts commit r324500.

The bots found two failures:

ThreadSanitizer-x86_64 :: Linux/pie_no_aslr.cc
ThreadSanitizer-x86_64 :: pie_test.cc

when using gold. The issue is a limitation in gold when building pie
binaries. I will investigate how to work around it.

llvm-svn: 324505

show more ...


# fa9874c3 07-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Recommit r324107.

It now includes a fix to not mark available_externally definitions as
dso_local.

Original message:

Start setting dso_local in clang.

This starts adding dso_local to clang.

The

Recommit r324107.

It now includes a fix to not mark available_externally definitions as
dso_local.

Original message:

Start setting dso_local in clang.

This starts adding dso_local to clang.

The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go
away. My objective for now is to move enough of it to clang to remove
the need for the TargetMachine one to handle PIE copy relocations and
-fno-plt. With that it should then be easy to implement a
-fno-copy-reloc in clang.

This patch just adds the cases where we assume a symbol to be local
based on the file being compiled for an executable or a shared
library.

llvm-svn: 324500

show more ...


# deb10bec 07-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Don't pass ForDefinition_t in places it is redundant.

I found this while looking at the ppc failures caused by the dso_local
change.

The issue was that the patch would produce the wrong answer for

Don't pass ForDefinition_t in places it is redundant.

I found this while looking at the ppc failures caused by the dso_local
change.

The issue was that the patch would produce the wrong answer for
available_externally. Having ForDefinition_t available in places where
the code can just check the linkage is a bit of a foot gun.

This patch removes the ForDefiniton_t argument in places where the
linkage is already know.

llvm-svn: 324499

show more ...


# fd4db533 07-Feb-2018 Saleem Abdulrasool <compnerd@compnerd.org>

Support `#pragma comment(lib, "name")` in the frontend for ELF

This adds the frontend support required to support the use of the
comment pragma to enable auto linking on ELFish targets. This is a
ge

Support `#pragma comment(lib, "name")` in the frontend for ELF

This adds the frontend support required to support the use of the
comment pragma to enable auto linking on ELFish targets. This is a
generic ELF extension supported by LLVM. We need to change the handling
for the "dependentlib" in order to accommodate the previously discussed
encoding for the dependent library descriptor. Without the custom
handling of the PCK_Lib directive, the -l prefixed option would be
encoded into the resulting object (which is treated as a frontend
error).

llvm-svn: 324438

show more ...


# 9f34b7b9 02-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Revert "Start setting dso_local in clang."

This reverts commit r324107.

I will have to test it on OS X.

llvm-svn: 324108


# 7e34a308 02-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Start setting dso_local in clang.

This starts adding dso_local to clang.

The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go
away. My objective for now is to move enough of it to

Start setting dso_local in clang.

This starts adding dso_local to clang.

The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go
away. My objective for now is to move enough of it to clang to remove
the need for the TargetMachine one to handle PIE copy relocations and
-fno-plt. With that it should then be easy to implement a
-fno-copy-reloc in clang.

This patch just adds the cases where we assume a symbol to be local
based on the file being compiled for an executable or a shared
library.

llvm-svn: 324107

show more ...


# 32b615c2 01-Feb-2018 Richard Smith <richard-llvm@metafoo.co.uk>

PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.

Previously, friend function definitions within class templates slipped through
the gaps and caused the MS mangler to as

PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.

Previously, friend function definitions within class templates slipped through
the gaps and caused the MS mangler to assert.

llvm-svn: 323935

show more ...


# 1860b520 25-Jan-2018 Ivan A. Kosarev <ikosarev@accesssoftek.com>

[CodeGen] Decorate aggregate accesses with TBAA tags

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

llvm-svn: 323421


# 123ce97f 24-Jan-2018 Rafael Espindola <rafael.espindola@gmail.com>

Don't create hidden dllimport global values.

Hidden visibility is almost the opposite of dllimport. We were
producing them before (dllimport wins in the existing llvm
implementation), but now the ll

Don't create hidden dllimport global values.

Hidden visibility is almost the opposite of dllimport. We were
producing them before (dllimport wins in the existing llvm
implementation), but now the llvm verifier produces an error.

llvm-svn: 323361

show more ...


Revision tags: llvmorg-6.0.0-rc1
# 19131152 17-Jan-2018 George Burgess IV <george.burgess.iv@gmail.com>

[CodeGen] Fix a crash on mangling multiversioned functions

`multiVersionSortPriority` expects features to have no prefix. We
currently carry them around in the format "+${feature}".

llvm-svn: 322618


# 0a6fde48 16-Jan-2018 Erich Keane <erich.keane@intel.com>

Move target MV resolver to COMDAT

As reported here: https://bugs.llvm.org/show_bug.cgi?id=35921
The resolver functions should be in their own
COMDAT regions. This patch sets that up.

Differential R

Move target MV resolver to COMDAT

As reported here: https://bugs.llvm.org/show_bug.cgi?id=35921
The resolver functions should be in their own
COMDAT regions. This patch sets that up.

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

llvm-svn: 322592

show more ...


# db2736dd 09-Jan-2018 Adrian McCarthy <amccarth@google.com>

Reland "Emit Function IDs table for Control Flow Guard"

Adds option /guard:cf to clang-cl and -cfguard to cc1 to emit function IDs
of functions that have their address taken into a section named .gf

Reland "Emit Function IDs table for Control Flow Guard"

Adds option /guard:cf to clang-cl and -cfguard to cc1 to emit function IDs
of functions that have their address taken into a section named .gfids$y for
compatibility with Microsoft's Control Flow Guard feature.

The original patch didn't have the lit.local.cfg file that restricts the new
test to x86, thus the new test was failing on the non-x86 bots.

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

The reverts r322008, which was a revert of r322005.

This reverts commit a05b89f9aca70597dc79fe97bc49b50b51f525ba.

llvm-svn: 322136

show more ...


# 57cc1a5d 09-Jan-2018 Oren Ben Simhon <oren.ben.simhon@intel.com>

Added Control Flow Protection Flag

Cf-protection is a target independent flag that instructs the back-end to instrument control flow mechanisms like: Branch, Return, etc.
For example in X86 this fla

Added Control Flow Protection Flag

Cf-protection is a target independent flag that instructs the back-end to instrument control flow mechanisms like: Branch, Return, etc.
For example in X86 this flag will be used to instrument Indirect Branch Tracking instructions.

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

Change-Id: I5126e766c0e6b84118cae0ee8a20fe78cc373dea
llvm-svn: 322063

show more ...


# bc40c5c6 09-Jan-2018 Erich Keane <erich.keane@intel.com>

Fix use-after-free found by address-san on -r322028.

r322028 attempted to remove something from the "Manglings"
list when it was no longer valid, and did so with 'erase'.

However, StringRefs to the

Fix use-after-free found by address-san on -r322028.

r322028 attempted to remove something from the "Manglings"
list when it was no longer valid, and did so with 'erase'.

However, StringRefs to these were stored, so these became
dangling references. This patch changes to using 'remove' instead
of 'erase' to keep the strings valid.

llvm-svn: 322052

show more ...


# 281d20b6 08-Jan-2018 Erich Keane <erich.keane@intel.com>

Implement Attribute Target MultiVersioning

GCC's attribute 'target', in addition to being an optimization hint,
also allows function multiversioning. We currently have the former
implemented, this i

Implement Attribute Target MultiVersioning

GCC's attribute 'target', in addition to being an optimization hint,
also allows function multiversioning. We currently have the former
implemented, this is the latter's implementation.

This works by enabling functions with the same name/signature to coexist,
so that they can all be emitted. Multiversion state is stored in the
FunctionDecl itself, and SemaDecl manages the definitions.
Note that it ends up having to permit redefinition of functions so
that they can all be emitted. Additionally, all versions of the function
must be emitted, so this also manages that.

Note that this includes some additional rules that GCC does not, since
defining something as a MultiVersion function after a usage has been made illegal.

The only 'history rewriting' that happens is if a function is emitted before
it has been converted to a multiversion'ed function, at which point its name
needs to be changed.

Function templates and virtual functions are NOT yet supported (not supported
in GCC either).

Additionally, constructors/destructors are disallowed, but the former is
planned.

llvm-svn: 322028

show more ...


# ce63a925 08-Jan-2018 Adrian McCarthy <amccarth@google.com>

Revert "Emit Function IDs table for Control Flow Guard"

The new test fails on the Hexagon bot. Reverting while I investigate.

This reverts https://reviews.llvm.org/rL322005

This reverts commit b7

Revert "Emit Function IDs table for Control Flow Guard"

The new test fails on the Hexagon bot. Reverting while I investigate.

This reverts https://reviews.llvm.org/rL322005

This reverts commit b7e0026b4385180c378edc658ec91a39566f2942.

llvm-svn: 322008

show more ...


1...<<31323334353637383940>>...87