Revision tags: llvmorg-3.9.0-rc1 |
|
#
444746b4 |
| 28-Jun-2016 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use isPositionIndependent(). NFC.
llvm-svn: 274005
|
#
a686f127 |
| 24-Jun-2016 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify. NFC.
Also delete out of date comment. This code was always returning .data since r253436.
llvm-svn: 273739
|
#
96efdd61 |
| 14-Jun-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
IR: Introduce local_unnamed_addr attribute.
If a local_unnamed_addr attribute is attached to a global, the address is known to be insignificant within the module. It is distinct from the existing un
IR: Introduce local_unnamed_addr attribute.
If a local_unnamed_addr attribute is attached to a global, the address is known to be insignificant within the module. It is distinct from the existing unnamed_addr attribute in that it only describes a local property of the module rather than a global property of the symbol.
This attribute is intended to be used by the code generator and LTO to allow the linker to decide whether the global needs to be in the symbol table. It is possible to exclude a global from the symbol table if three things are true: - This attribute is present on every instance of the global (which means that the normal rule that the global must have a unique address can be broken without being observable by the program by performing comparisons against the global's address) - The global has linkonce_odr linkage (which means that each linkage unit must have its own copy of the global if it requires one, and the copy in each linkage unit must be the same) - It is a constant or a function (which means that the program cannot observe that the unique-address rule has been broken by writing to the global)
Although this attribute could in principle be computed from the module contents, LTO clients (i.e. linkers) will normally need to be able to compute this property as part of symbol resolution, and it would be inefficient to materialize every module just to compute it.
See: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160509/356401.html http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160516/356738.html for earlier discussion.
Part of the fix for PR27553.
Differential Revision: http://reviews.llvm.org/D20348
llvm-svn: 272709
show more ...
|
Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
699281cc |
| 18-May-2016 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't pass a Reloc::Model to MC.
MC only needs to know if the output is PIC or not. It never has to decide about creating GOTs and PLTs for example. The only thing that MC itself uses this informati
Don't pass a Reloc::Model to MC.
MC only needs to know if the output is PIC or not. It never has to decide about creating GOTs and PLTs for example. The only thing that MC itself uses this information for is expanding "macros" in sparc and mips. The rest I am pretty sure could be moved to CodeGen.
This is a cleanup and isolates the code from future changes to Reloc::Model.
llvm-svn: 269909
show more ...
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3 |
|
#
964b70d5 |
| 22-Feb-2016 |
David Majnemer <david.majnemer@gmail.com> |
[X86] Create mergeable constant pool entries for AVX
We supported creating mergeable constant pool entries for smaller constants but not for 32-byte AVX constants.
llvm-svn: 261584
|
#
a3ea407d |
| 21-Feb-2016 |
David Majnemer <david.majnemer@gmail.com> |
[X86] Use the correct alignment for COMDAT constant pool entries
COFF doesn't have sections with mergeable contents. Instead, each constant pool entry ends up in a COMDAT section. The linker, when
[X86] Use the correct alignment for COMDAT constant pool entries
COFF doesn't have sections with mergeable contents. Instead, each constant pool entry ends up in a COMDAT section. The linker, when choosing between COMDAT sections, doesn't choose the max alignment of the two sections. You just get whatever alignment was on the section.
If one constant needed a higher alignment in one object file from another one, then we will get into trouble if the linker chooses the lower alignment one.
Instead, lets promote the alignment of the constant pool entry to make sure we don't use an under aligned constant with an instruction which assumed otherwise.
This fixes PR26680.
llvm-svn: 261462
show more ...
|
Revision tags: llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2 |
|
#
449711cb |
| 18-Nov-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Stop producing .data.rel sections.
If a section is rw, it is irrelevant if the dynamic linker will write to it or not.
It looks like llvm implemented this because gcc was doing it. It looks like gc
Stop producing .data.rel sections.
If a section is rw, it is irrelevant if the dynamic linker will write to it or not.
It looks like llvm implemented this because gcc was doing it. It looks like gcc implemented this in the hope that it would put all the relocated items close together and speed up the dynamic linker.
There are two problem with this: * It doesn't work. Both bfd and gold will map .data.rel to .data and concatenate the input sections in the order they are seen. * If we want a feature like that, it can be implemented directly in the linker since it knowns where the dynamic relocations are.
llvm-svn: 253436
show more ...
|
Revision tags: llvmorg-3.7.1-rc1 |
|
#
65e49021 |
| 17-Nov-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Drop prelink support.
The way prelink used to work was
* The compiler decides if a given section only has relocations that are know to point to the same DSO. If so, it names it .data.rel.ro.local<s
Drop prelink support.
The way prelink used to work was
* The compiler decides if a given section only has relocations that are know to point to the same DSO. If so, it names it .data.rel.ro.local<something>. * The static linker puts all of these together. * The prelinker program assigns addresses to each library and resolves the local relocations.
There are many problems with this: * It is incompatible with address space randomization. * The information passed by the compiler is redundant. The linker knows if a given relocation is in the same DSO or not. If could sort by that if so desired. * There are newer ways of speeding up DSO (gnu hash for example). * Even if we want to implement this again in the compiler, the previous implementation is pretty broken. It talks about relocations that are "resolved by the static linker". If they are resolved, there are none left for the prelinker. What one needs to track is if an expression will require only dynamic relocations that point to the same DSO.
At this point it looks like the prelinker is an historical curiosity. For example, fedora has retired it because it failed to build for two releases (http://pkgs.fedoraproject.org/cgit/prelink.git/commit/?id=eb43100a8331d91c801ee3dcdb0a0bb9babfdc1f)
This patch removes support for it. That is, it stops printing the ".local" sections.
llvm-svn: 253280
show more ...
|
#
94d77869 |
| 03-Nov-2015 |
Peter Collingbourne <peter@pcc.me.uk> |
CodeGen, Target: Move Mach-O-specific symbol name logic to Mach-O lowering.
A profile of an LTO link of Chrome revealed that we were spending some ~30-50% of execution time in the function Constant:
CodeGen, Target: Move Mach-O-specific symbol name logic to Mach-O lowering.
A profile of an LTO link of Chrome revealed that we were spending some ~30-50% of execution time in the function Constant::getRelocationInfo(), which is called from TargetLoweringObjectFile::getKindForGlobal() and in turn from TargetMachine::getNameWithPrefix().
It turns out that we only need the result of getKindForGlobal() when targeting Mach-O, so this change moves the relevant part of the logic to TargetLoweringObjectFileMachO.
NFCI.
Differential Revision: http://reviews.llvm.org/D14168
llvm-svn: 252014
show more ...
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1 |
|
#
5c0fa58e |
| 16-Jul-2015 |
Mehdi Amini <mehdi.amini@apple.com> |
Remove DataLayout from TargetLoweringObjectFile, redirect to Module
Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the o
Remove DataLayout from TargetLoweringObjectFile, redirect to Module
Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module.
Reviewers: echristo
Subscribers: yaron.keren, rafael, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D11079
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 242385
show more ...
|
Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1 |
|
#
c81f450f |
| 16-Jun-2015 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Clean up redundant copies of Triple objects. NFC
Summary:
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: llvm-commits, rengolin, jholewinski
Differential Revision: http://reviews.llvm.or
Clean up redundant copies of Triple objects. NFC
Summary:
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: llvm-commits, rengolin, jholewinski
Differential Revision: http://reviews.llvm.org/D10382
llvm-svn: 239823
show more ...
|
#
8d8b13dc |
| 16-Jun-2015 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Recommit r239721: Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for
Recommit r239721: Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar patches.
This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036.
The first time this was committed it accidentally fixed an inconsistency in triples in llvm-mc and this caused a failure. This inconsistency was fixed in r239808.
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10366
llvm-svn: 239812
show more ...
|
#
fa555dc7 |
| 15-Jun-2015 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Revert r239721 - Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
It appears to cause sparc-little-endian.s to assert on Windows and Darwin.
llvm-svn: 239724
|
#
d6d12a11 |
| 15-Jun-2015 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang
Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar trivial patches.
This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036.
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10366
llvm-svn: 239721
show more ...
|
#
13760bd1 |
| 30-May-2015 |
Jim Grosbach <grosbach@apple.com> |
MC: Clean up MCExpr naming. NFC.
llvm-svn: 238634
|
#
0709a7bd |
| 21-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move alignment from MCSectionData to MCSection.
This starts merging MCSection and MCSectionData.
There are a few issues with the current split between MCSection and MCSectionData.
* It optimizes t
Move alignment from MCSectionData to MCSection.
This starts merging MCSection and MCSectionData.
There are a few issues with the current split between MCSection and MCSectionData.
* It optimizes the the not as important case. We want the production of .o files to be really fast, but the split puts the information used for .o emission in a separate data structure.
* The ELF/COFF/MachO hierarchy is not represented in MCSectionData, leading to some ad-hoc ways to represent the various flags.
* It makes it harder to remember where each item is.
The attached patch starts merging the two by moving the alignment from MCSectionData to MCSection.
Most of the patch is actually just dropping 'const', since MCSectionData is mutable, but MCSection was not.
llvm-svn: 237936
show more ...
|
#
6f482000 |
| 18-May-2015 |
Jim Grosbach <grosbach@apple.com> |
MC: Clean up method names in MCContext.
The naming was a mish-mash of old and new style. Update to be consistent with the new. NFC.
llvm-svn: 237594
|
Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1 |
|
#
75e0c4b0 |
| 27-Mar-2015 |
Yaron Keren <yaron.keren@gmail.com> |
Remove superfluous .str() and replace std::string concatenation with Twine.
llvm-svn: 233392
|
Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1 |
|
#
7db449a6 |
| 17-Mar-2015 |
David Majnemer <david.majnemer@gmail.com> |
COFF: Let globals with private linkage reside in their own section
COFF COMDATs (for selection kinds other than 'select any') require at least one non-section symbol in the symbol table. Satisfy thi
COFF: Let globals with private linkage reside in their own section
COFF COMDATs (for selection kinds other than 'select any') require at least one non-section symbol in the symbol table. Satisfy this by morally enhancing the linkage from private to internal.
Differential Revision: http://reviews.llvm.org/D8394
llvm-svn: 232570
show more ...
|
#
63b1d999 |
| 17-Mar-2015 |
David Majnemer <david.majnemer@gmail.com> |
Revert "COFF: Let globals with private linkage reside in their own section"
This reverts commit r232539. This was committed accidently.
llvm-svn: 232543
|
#
47e38429 |
| 17-Mar-2015 |
David Majnemer <david.majnemer@gmail.com> |
COFF: Let globals with private linkage reside in their own section
Summary: COFF COMDATs (for selection kinds other than 'select any') require at least one non-section symbol in the symbol table. Sa
COFF: Let globals with private linkage reside in their own section
Summary: COFF COMDATs (for selection kinds other than 'select any') require at least one non-section symbol in the symbol table. Satisfy this by morally enhancing the linkage from private to internal.
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8374
llvm-svn: 232539
show more ...
|
Revision tags: llvmorg-3.6.0, llvmorg-3.6.0-rc4 |
|
#
df195198 |
| 17-Feb-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add r228939 back with a fix.
The problem in the original patch was not switching back to .text after printing an eh table.
Original message:
On ELF, put PIC jump tables in a non executable section
Add r228939 back with a fix.
The problem in the original patch was not switching back to .text after printing an eh table.
Original message:
On ELF, put PIC jump tables in a non executable section.
Fixes PR22558.
llvm-svn: 229586
show more ...
|
#
33cc1072 |
| 14-Feb-2015 |
Matthias Braun <matze@braunis.de> |
Revert "On ELF, put PIC jump tables in a non executable section."
This reverts commit r228939.
The commit broke something in the output of exception handling tables on darwin x86-64.
llvm-svn: 229
Revert "On ELF, put PIC jump tables in a non executable section."
This reverts commit r228939.
The commit broke something in the output of exception handling tables on darwin x86-64.
llvm-svn: 229203
show more ...
|
Revision tags: llvmorg-3.6.0-rc3 |
|
#
203c5b9f |
| 12-Feb-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
On ELF, put PIC jump tables in a non executable section.
Fixes PR22558.
llvm-svn: 228939
|
#
29786d4c |
| 12-Feb-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Put each jump table in an independent section if the function is too.
This allows the linker to GC both, fixing pr22557.
llvm-svn: 228937
|