| #
9338984f |
| 23-Mar-2014 |
David Majnemer <[email protected]> |
WinCOFF: Add support for -ffunction-sections
This is a pretty straight forward translation for COFF, we just need to stick the function in a COMDAT section marked as IMAGE_COMDAT_SELECT_NODUPLICATES
WinCOFF: Add support for -ffunction-sections
This is a pretty straight forward translation for COFF, we just need to stick the function in a COMDAT section marked as IMAGE_COMDAT_SELECT_NODUPLICATES.
llvm-svn: 204565
show more ...
|
| #
7b58305f |
| 07-Mar-2014 |
David Majnemer <[email protected]> |
MC: Remove superfluous section attribute flag definitions
Summary: llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same definitions for the section flags. Instead, grab the definitio
MC: Remove superfluous section attribute flag definitions
Summary: llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same definitions for the section flags. Instead, grab the definitions out of support.
No functionality change.
Reviewers: grosbach, Bigcheese, rafael
Reviewed By: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2998
llvm-svn: 203211
show more ...
|
| #
3b30cb41 |
| 06-Mar-2014 |
Rafael Espindola <[email protected]> |
Remove shouldEmitUsedDirectiveFor.
Clang now uses llvm.compiler.used for these cases.
llvm-svn: 203174
|
| #
442f7848 |
| 04-Mar-2014 |
Chandler Carruth <[email protected]> |
[cleanup] Re-sort all the includes with utils/sort_includes.py.
llvm-svn: 202811
|
| #
a3ad4e69 |
| 19-Feb-2014 |
Rafael Espindola <[email protected]> |
move getNameWithPrefix and getSymbol to TargetMachine.
TargetLoweringBase is implemented in CodeGen, so before this patch we had a dependency fom Target to CodeGen. This would show up as a link fail
move getNameWithPrefix and getSymbol to TargetMachine.
TargetLoweringBase is implemented in CodeGen, so before this patch we had a dependency fom Target to CodeGen. This would show up as a link failure of llvm-stress when building with -DBUILD_SHARED_LIBS=ON.
This fixes pr18900.
llvm-svn: 201711
show more ...
|
| #
daeafb4c |
| 19-Feb-2014 |
Rafael Espindola <[email protected]> |
Add back r201608, r201622, r201624 and r201625
r201608 made llvm corretly handle private globals with MachO. r201622 fixed a bug in it and r201624 and r201625 were changes for using private linkage,
Add back r201608, r201622, r201624 and r201625
r201608 made llvm corretly handle private globals with MachO. r201622 fixed a bug in it and r201624 and r201625 were changes for using private linkage, assuming that llvm would do the right thing.
They all got reverted because r201608 introduced a crash in LTO. This patch includes a fix for that. The issue was that TargetLoweringObjectFile now has to be initialized before we can mangle names of private globals. This is trivially true during the normal codegen pipeline (the asm printer does it), but LTO has to do it manually.
llvm-svn: 201700
show more ...
|
| #
7e198ad8 |
| 19-Feb-2014 |
Daniel Jasper <[email protected]> |
Revert r201622 and r201608.
This causes the LLVMgold plugin to segfault. More information on the replies to r201608.
llvm-svn: 201669
|
| #
b9ea63c5 |
| 19-Feb-2014 |
Rafael Espindola <[email protected]> |
Avoid an infinite cycle with private linkage and -f{data|function}-sections.
When outputting an object we check its section to find its name, but when looking for the section with -ffunction-section
Avoid an infinite cycle with private linkage and -f{data|function}-sections.
When outputting an object we check its section to find its name, but when looking for the section with -ffunction-section we look for the symbol name.
Break the loop by requesting a name with the private prefix when constructing the section name. This matches the behavior before r201608.
llvm-svn: 201622
show more ...
|
| #
09dcc6a5 |
| 18-Feb-2014 |
Rafael Espindola <[email protected]> |
Fix PR18743.
The IR @foo = private constant i32 42
is valid, but before this patch we would produce an invalid MachO from it. It was invalid because it would use an L label in a section where the l
Fix PR18743.
The IR @foo = private constant i32 42
is valid, but before this patch we would produce an invalid MachO from it. It was invalid because it would use an L label in a section where the liker needs the labels in order to atomize it.
One way of fixing it would be to just reject this IR in the backend, but that would not be very front end friendly.
What this patch does is use an 'l' prefix in sections that we know the linker requires symbols for atomizing them. This allows frontends to just use private and not worry about which sections they go to or how the linker handles them.
One small issue with this strategy is that now a symbol name depends on the section, which is not available before codegen. This is not a problem in practice. The reason is that it only happens with private linkage, which will be ignored by the non codegen users (llvm-nm and llvm-ar).
llvm-svn: 201608
show more ...
|
| #
1f3de49f |
| 13-Feb-2014 |
Rafael Espindola <[email protected]> |
Use __literal16. It has been supported by the linker since 2005.
llvm-svn: 201365
|
| #
15b26696 |
| 09-Feb-2014 |
Rafael Espindola <[email protected]> |
Use a consistent argument order in TargetLoweringObjectFile.
These methods normally call each other and it is really annoying if the arguments are in different order. The more common rule was that t
Use a consistent argument order in TargetLoweringObjectFile.
These methods normally call each other and it is really annoying if the arguments are in different order. The more common rule was that the arguments specific to call are first (GV, Encoding, Suffix) and the auxiliary objects (Mang, TM) come after. This patch changes the exceptions.
llvm-svn: 201044
show more ...
|
| #
fa0f7283 |
| 08-Feb-2014 |
Rafael Espindola <[email protected]> |
Pass the Mangler by reference.
It is never null and it is not used in casts, so there is no reason to use a pointer. This matches how we pass TM.
llvm-svn: 201025
|
| #
2037caf8 |
| 28-Jan-2014 |
Eric Christopher <[email protected]> |
Revert r199871 and replace it with a simple check in the debug info code to see if we're emitting a function into a non-default text section. This is still a less-than-ideal solution, but more contai
Revert r199871 and replace it with a simple check in the debug info code to see if we're emitting a function into a non-default text section. This is still a less-than-ideal solution, but more contained than r199871 to determine whether or not we're emitting code into an array of comdat sections.
llvm-svn: 200269
show more ...
|
| #
15abef6d |
| 23-Jan-2014 |
Eric Christopher <[email protected]> |
Add a variable to track whether or not we've used a unique section, e.g. linkonce, to TargetMachine and set it when we've done so for ELF targets currently. This involved making TargetMachine non-con
Add a variable to track whether or not we've used a unique section, e.g. linkonce, to TargetMachine and set it when we've done so for ELF targets currently. This involved making TargetMachine non-const in a TLOF use and propagating that change around - I'm open to other ideas.
This will be used in a future commit to handle emitting debug information with ranges.
llvm-svn: 199871
show more ...
|
| #
a88d7abe |
| 21-Jan-2014 |
Yunzhong Gao <[email protected]> |
Adding new LTO APIs to parse metadata nodes and extract linker options and dependent libraries from a bitcode module.
Differential Revision: http://llvm-reviews.chandlerc.com/D2343
llvm-svn: 199759
|
| #
894843cb |
| 07-Jan-2014 |
Rafael Espindola <[email protected]> |
Move the llvm mangler to lib/IR.
This makes it available to tools that don't link with target (like llvm-ar).
llvm-svn: 198708
|
|
Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2 |
|
| #
f4e6b29a |
| 02-Dec-2013 |
Rafael Espindola <[email protected]> |
Move getSymbolWithGlobalValueBase to TargetLoweringObjectFile.
This allows it to be used in TargetLoweringObjectFileImpl.cpp.
llvm-svn: 196117
|
| #
3c8e147a |
| 27-Nov-2013 |
Rafael Espindola <[email protected]> |
Use the same tls section name as msvc.
We currently error in clang with: "error: thread-local storage is unsupported for the current target", but we can start to get the llvm level ready.
When comp
Use the same tls section name as msvc.
We currently error in clang with: "error: thread-local storage is unsupported for the current target", but we can start to get the llvm level ready.
When compiling
template<typename T> struct foo { static __declspec(thread) int bar; }; template<typename T> __declspec(therad) int foo<T>::bar; template struct foo<int>;
msvc produces
SECTION HEADER #3 .tls$ name 0 physical address 0 virtual address 4 size of raw data 12F file pointer to raw data (0000012F to 00000132) 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbers C0301040 flags Initialized Data COMDAT; sym= "public: static int foo<int>::bar" (?bar@?$foo@H@@2HA) 4 byte align Read Write
gcc produces a ".data$__emutls_v.<symbol>" for the testcase with __declspec(thread) replaced with thread_local.
llvm-svn: 195849
show more ...
|
| #
2d30ae2b |
| 27-Nov-2013 |
Rafael Espindola <[email protected]> |
Use simple section names for COMDAT sections on COFF.
With this patch we use simple names for COMDAT sections (like .text or .bss). This matches the MSVC behavior.
When merging it is the COMDAT sym
Use simple section names for COMDAT sections on COFF.
With this patch we use simple names for COMDAT sections (like .text or .bss). This matches the MSVC behavior.
When merging it is the COMDAT symbol that is used to decide if two sections should be merged, so there is no point in building a fancy name.
This survived a bootstrap on mingw32.
llvm-svn: 195798
show more ...
|
|
Revision tags: llvmorg-3.4.0-rc1 |
|
| #
60ec3836 |
| 19-Nov-2013 |
Rafael Espindola <[email protected]> |
Support multiple COFF sections with the same name but different COMDAT.
This is the first step to fix pr17918.
It extends the .section directive a bit, inspired by what the ELF one looks like. The
Support multiple COFF sections with the same name but different COMDAT.
This is the first step to fix pr17918.
It extends the .section directive a bit, inspired by what the ELF one looks like. The problem with using linkonce is that given
.section foo .linkonce....
.section foo .linkonce
we would already have switched sections when getting to .linkonce. The cleanest solution seems to be to add the comdat information in the .section itself.
llvm-svn: 195148
show more ...
|
| #
25b61dba |
| 17-Nov-2013 |
Bill Wendling <[email protected]> |
Revert "Micro-optimization"
This reverts commit f1d9fe9d04ce93f6d5dcebbd2cb6a07414d7a029.
This was causing PR17964. We need to use thread data before regular data.
llvm-svn: 194960
|
| #
e133ed88 |
| 29-Oct-2013 |
Rafael Espindola <[email protected]> |
Move getSymbol to TargetLoweringObjectFile.
This allows constructing a Mangler with just a TargetMachine.
llvm-svn: 193630
|
| #
3d96acb7 |
| 13-Aug-2013 |
David Majnemer <[email protected]> |
[-cxx-abi microsoft] Stick zero initialized symbols into the .bss section for COFF
Summary: We need to do two things:
- Initialize BSSSection in MCObjectFileInfo::InitCOFFMCObjectFileInfo - Teach T
[-cxx-abi microsoft] Stick zero initialized symbols into the .bss section for COFF
Summary: We need to do two things:
- Initialize BSSSection in MCObjectFileInfo::InitCOFFMCObjectFileInfo - Teach TargetLoweringObjectFileCOFF::SelectSectionForGlobal what to do with it
This fixes PR16861.
Reviewers: rnk
Reviewed By: rnk
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1361
llvm-svn: 188244
show more ...
|
| #
c31c2de1 |
| 08-Aug-2013 |
Arnold Schwaighofer <[email protected]> |
Revert "Reapply r185872 now that the address sanitizer has been changed to support this."
This reverts commit r187939. It broke an O0 build of a spec benchmark.
llvm-svn: 188012
|
| #
f76d6b37 |
| 08-Aug-2013 |
David Majnemer <[email protected]> |
Revert "coff also doesn't have a ReadOnlySection yet, (!)"
This reverts commit r77814.
We were sticking global constants in the .data section instead of in the .rdata section when emitting for COFF
Revert "coff also doesn't have a ReadOnlySection yet, (!)"
This reverts commit r77814.
We were sticking global constants in the .data section instead of in the .rdata section when emitting for COFF.
This fixes PR16831.
llvm-svn: 187956
show more ...
|