#
9df71d76 |
| 28-Jun-2024 |
Nikita Popov <npopov@redhat.com> |
[IR] Add getDataLayout() helpers to Function and GlobalValue (#96919)
Similar to https://github.com/llvm/llvm-project/pull/96902, this adds
`getDataLayout()` helpers to Function and GlobalValue, re
[IR] Add getDataLayout() helpers to Function and GlobalValue (#96919)
Similar to https://github.com/llvm/llvm-project/pull/96902, this adds
`getDataLayout()` helpers to Function and GlobalValue, replacing the
current `getParent()->getDataLayout()` pattern.
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4 |
|
#
b1554fe0 |
| 28-Oct-2023 |
Igor Kudrin <ikudrin@accesssoftek.com> |
[Linker] Do not keep a private member of a non-prevailing comdat group (#69143)
`IRMover` links in referenced private global values unconditionally, see
`IRLinker::shouldLink()`. If they are part o
[Linker] Do not keep a private member of a non-prevailing comdat group (#69143)
`IRMover` links in referenced private global values unconditionally, see
`IRLinker::shouldLink()`. If they are part of a non-prevailing comdat,
this leads to duplication of the values. Full and Thin LTO avoid
duplication by changing the linkage of members of non-prevailing comdat
groups to `available_externally`, which was implemented in
https://reviews.llvm.org/D34803 and https://reviews.llvm.org/D135427.
This patch does the same for `Linker`, but limits the effect only to
private members without aliases to minimize interference.
Motivation example:
```
> cat foo.h
inline int foo(int a) { return a + 1; }
> cat bar.cpp
#include "foo.h"
int bar(int a) { return foo(a + 1); }
> cat main.cpp
#include "foo.h"
int bar(int a);
int main(int argc, const char* argv[]) { return bar(argc) + foo(argc); }
> clang++ -c -flto -fprofile-instr-generate main.cpp -o main.o
> clang++ -c -flto -fprofile-instr-generate bar.cpp -o bar.o
> clang++ -fuse-ld=lld -fprofile-instr-generate main.o bar.o -o test1
> ./test1
> llvm-profdata merge --text default.profraw -o -
_Z3fooi
# Counter Values:
2
> llvm-link main.o bar.o -o combined.o
> clang++ -fuse-ld=lld -fprofile-instr-generate combined.o -o test2
> ./test2
> llvm-profdata merge --text default.profraw -o -
_Z3fooi
# Counter Values:
4
```
show more ...
|
Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
43024b4c |
| 13-Dec-2022 |
Guillaume Chatelet <gchatelet@google.com> |
[rereland][Alignment][NFC] Remove access to deprecated GlobalObject::getAlignment from llvm
Differential Revision: https://reviews.llvm.org/D139836
|
#
6fe6d8d3 |
| 12-Dec-2022 |
Guillaume Chatelet <gchatelet@google.com> |
Revert "[reland][Alignment][NFC] Remove access to deprecated GlobalObject::getAlignment from llvm"
This reverts commit 3bbfaee23d41c099547c652f87b252ab6e1f6c46.
|
#
3bbfaee2 |
| 12-Dec-2022 |
Guillaume Chatelet <gchatelet@google.com> |
[reland][Alignment][NFC] Remove access to deprecated GlobalObject::getAlignment from llvm
Differential Revision: https://reviews.llvm.org/D139836
|
#
7e10a6a6 |
| 12-Dec-2022 |
Guillaume Chatelet <gchatelet@google.com> |
Revert D139836 "[Alignment][NFC] Remove deprecated GlobalObject::getAlignment"
This breaks lldb.
This reverts commit f3f15ca27fbb433ad5a65b1a1e0a071d2e9af505.
|
#
f3f15ca2 |
| 12-Dec-2022 |
Guillaume Chatelet <gchatelet@google.com> |
[Alignment][NFC] Remove deprecated GlobalObject::getAlignment
Differential Revision: https://reviews.llvm.org/D139836
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
#
8b295d1c |
| 21-Mar-2022 |
serge-sans-paille <sguelton@redhat.com> |
Cleanup includes: Linker
Preprocessor output diff: -7300 lines Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D12
Cleanup includes: Linker
Preprocessor output diff: -7300 lines Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D122182
show more ...
|
#
236695e7 |
| 14-Mar-2022 |
Nick Desaulniers <ndesaulniers@google.com> |
[IRLinker] make IRLinker::AddLazyFor optional (llvm::unique_function). NFC
2 of the 3 callsite of IRMover::move() pass empty lambda functions. Just make this parameter llvm::unique_function.
Came a
[IRLinker] make IRLinker::AddLazyFor optional (llvm::unique_function). NFC
2 of the 3 callsite of IRMover::move() pass empty lambda functions. Just make this parameter llvm::unique_function.
Came about via discussion in D120781. Probably worth making this change regardless of the resolution of D120781.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D121630
show more ...
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
87e53a0a |
| 06-Nov-2021 |
Kazu Hirata <kazu@google.com> |
[llvm] Use make_early_inc_range (NFC)
|
#
40ec1c0f |
| 07-Oct-2021 |
Itay Bookstein <ibookstein@gmail.com> |
[IR][NFC] Rename getBaseObject to getAliaseeObject
To better reflect the meaning of the now-disambiguated {GlobalValue, GlobalAlias}::getBaseObject after breaking off GlobalIFunc::getResolverFunctio
[IR][NFC] Rename getBaseObject to getAliaseeObject
To better reflect the meaning of the now-disambiguated {GlobalValue, GlobalAlias}::getBaseObject after breaking off GlobalIFunc::getResolverFunction (D109792), the function is renamed to getAliaseeObject.
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
#
01152626 |
| 01-Sep-2021 |
Fangrui Song <i@maskray.me> |
[Linker] Handle comdat nodeduplicate
For a variable in a comdat nodeduplicate, its initializer may be significant. E.g. its content may be implicitly referenced by another comdat member (or required
[Linker] Handle comdat nodeduplicate
For a variable in a comdat nodeduplicate, its initializer may be significant. E.g. its content may be implicitly referenced by another comdat member (or required to parallel to another comdat member by the runtime when explicit section is used). We can clone it into an unnamed private linkage variable to preserve its content.
This partially fixes PR51394 (Sony's proprietary linker using LTO): no error will be reported. This is partial because we do not guarantee the global variable order if the runtime has parallel section requirement.
---
There is a similar issue for regular LTO, but unrelated to PR51394:
with lib/LTO (using either ld.lld or LLVMgold.so), linking two modules with a weak function of the same name, can leave one weak profc and two private profd, due to lib/LTO's current deficiency that it mixes the two concepts together: comdat selection and symbol resolution. If the issue is considered important, we should suppress private profd for the weak+ regular LTO case.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D108879
show more ...
|
Revision tags: llvmorg-13.0.0-rc2 |
|
#
92f54e1c |
| 25-Aug-2021 |
Petr Hosek <phosek@google.com> |
[Linker] Support weak symbols in nodeduplicate COMDAT group
When a nodeduplicate COMDAT group contains a weak symbol, choose a non-weak symbol (or one of the weak ones) rather than reporting an erro
[Linker] Support weak symbols in nodeduplicate COMDAT group
When a nodeduplicate COMDAT group contains a weak symbol, choose a non-weak symbol (or one of the weak ones) rather than reporting an error. This should address issue PR51394.
With the current IR representation, a generic comdat nodeduplicate semantics is not representable for LTO. In the linker, sections and symbols are separate concepts. A dropped weak symbol does not force the defining input section to be dropped as well (though it can be collected by GC). In the IR, when a weak linkage symbol is dropped, its associate section content is dropped as well.
For InstrProfiling, which is where ran into this issue in PR51394, the deduplication semantic is a sufficient workaround.
Differential Revision: https://reviews.llvm.org/D108689
show more ...
|
#
510e106f |
| 28-Aug-2021 |
Fangrui Song <i@maskray.me> |
[Linker] Replace comdat based bool LinkFromSrc with enum class LinkFrom and improve nodeduplicate tests. NFC
This is different from symbol resolution based LinkFromSrc. Rename to be clearer.
In th
[Linker] Replace comdat based bool LinkFromSrc with enum class LinkFrom and improve nodeduplicate tests. NFC
This is different from symbol resolution based LinkFromSrc. Rename to be clearer.
In the future we may support a new enum member 'Both' for nodeduplicate. This is feasible (by renaming to a private linkage GlobalValue), but we need to be careful not to break InstrProfiling.cpp's expectation of parallel profd/profc.
The challenge is that current LTO symbol resolution only allows to mark one profc as prevailing: the other profc in another comdat nodeduplicate may be discarded while its associated profd isn't.
show more ...
|
#
530aa7e4 |
| 15-Aug-2021 |
Itay Bookstein <itay.bookstein@nextsilicon.com> |
[Linker] Import GlobalIFunc when importing symbols from another module
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D107988
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init |
|
#
39248779 |
| 20-Jul-2021 |
Fangrui Song <i@maskray.me> |
[IR] Rename `comdat noduplicates` to `comdat nodeduplicate`
In the textual format, `noduplicates` means no COMDAT/section group deduplication is performed. Therefore, if both sets of sections are re
[IR] Rename `comdat noduplicates` to `comdat nodeduplicate`
In the textual format, `noduplicates` means no COMDAT/section group deduplication is performed. Therefore, if both sets of sections are retained, and they happen to define strong external symbols with the same names, there will be a duplicate definition linker error.
In PE/COFF, the selection kind lowers to `IMAGE_COMDAT_SELECT_NODUPLICATES`. The name describes the corollary instead of the immediate semantics. The name can cause confusion to other binary formats (ELF, wasm) which have implemented/ want to implement the "no deduplication" selection kind. Rename it to be clearer.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D106319
show more ...
|
#
4e601325 |
| 09-Jul-2021 |
Arthur Eubanks <aeubanks@google.com> |
[NFC][OpaquePtr] Use GlobalValue::getValueType() more
Instead of getType()->getElementType().
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init |
|
#
267a57a6 |
| 23-Jan-2021 |
Sergey Dmitriev <serguei.n.dmitriev@intel.com> |
[llvm-link] Fix for an assertion when linking global with appending linkage
This patch fixes llvm-link assertion when linking external variable declaration with a definition with appending linkage.
[llvm-link] Fix for an assertion when linking global with appending linkage
This patch fixes llvm-link assertion when linking external variable declaration with a definition with appending linkage.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D95126
show more ...
|
Revision tags: llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
0e62011d |
| 15-Oct-2019 |
Guillaume Chatelet <gchatelet@google.com> |
[Alignment][NFC] Remove dependency on GlobalObject::setAlignment(unsigned)
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.o
[Alignment][NFC] Remove dependency on GlobalObject::setAlignment(unsigned)
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: arsenm, mehdi_amini, jvesely, nhaehnle, hiraditya, steven_wu, dexonsmith, dang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68944
llvm-svn: 374880
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2 |
|
#
b1a9ad81 |
| 09-Aug-2017 |
Benoit Belley <benoit.belley@autodesk.com> |
[Linker] PR33527 - Linker::LinkOnlyNeeded should import AppendingLinkage globals
Linker::LinkOnlyNeeded should always import globals with AppendingLinkage.
This resolves PR33527.
Differential Revi
[Linker] PR33527 - Linker::LinkOnlyNeeded should import AppendingLinkage globals
Linker::LinkOnlyNeeded should always import globals with AppendingLinkage.
This resolves PR33527.
Differential Revision: https://reviews.llvm.org/D34448
llvm-svn: 310522
show more ...
|
Revision tags: llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1 |
|
#
5eb9c81d |
| 13-Mar-2017 |
Jonas Devlieghere <jonas@devlieghere.com> |
[Linker] Provide callback for internalization
Differential Revision: https://reviews.llvm.org/D30738
llvm-svn: 297649
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2 |
|
#
e6fd9ff9 |
| 03-Feb-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
IRMover: Merge flags LinkModuleInlineAsm and IsPerformingImport.
Currently these flags are always the inverse of each other, so there is no need to keep them separate.
Differential Revision: https:
IRMover: Merge flags LinkModuleInlineAsm and IsPerformingImport.
Currently these flags are always the inverse of each other, so there is no need to keep them separate.
Differential Revision: https://reviews.llvm.org/D29471
llvm-svn: 294016
show more ...
|
#
7c702116 |
| 03-Feb-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
ModuleLinker: Remove importing support. NFCI.
Differential Revision: https://reviews.llvm.org/D29470
llvm-svn: 294015
|
#
6d8f817f |
| 03-Feb-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
FunctionImport: Use IRMover directly.
The importer was previously using ModuleLinker in a sort of "IRMover mode". Use IRMover directly instead in order to remove a level of indirection.
I will remo
FunctionImport: Use IRMover directly.
The importer was previously using ModuleLinker in a sort of "IRMover mode". Use IRMover directly instead in order to remove a level of indirection.
I will remove all importing support from ModuleLinker in a separate change.
Differential Revision: https://reviews.llvm.org/D29468
llvm-svn: 294014
show more ...
|