#
4a435e08 |
| 14-Mar-2017 |
Dehao Chen <dehao@google.com> |
SamplePGO ThinLTO ICP fix for local functions.
Summary: In SamplePGO, if the profile is collected from non-LTO binary, and used to drive ThinLTO, the indirect call promotion may fail because ThinLTO
SamplePGO ThinLTO ICP fix for local functions.
Summary: In SamplePGO, if the profile is collected from non-LTO binary, and used to drive ThinLTO, the indirect call promotion may fail because ThinLTO adjusts local function names to avoid conflicts. There are two places of where the mismatch can happen:
1. thin-link prepends SourceFileName to front of FuncName to build the GUID (GlobalValue::getGlobalIdentifier). Unlike instrumentation FDO, SamplePGO does not use the PGOFuncName scheme and therefore the indirect call target profile data contains a hash of the OriginalName. 2. backend compiler promotes some local functions to global and appends .llvm.{$ModuleHash} to the end of the FuncName to derive PromotedFunctionName
This patch tries at the best effort to find the GUID from the original local function name (in profile), and use that in ICP promotion, and in SamplePGO matching that happens in the backend after importing/inlining:
1. in thin-link, it builds the map from OriginalName to GUID so that when thin-link reads in indirect call target profile (represented by OriginalName), it knows which GUID to import. 2. in backend compiler, if sample profile reader cannot find a profile match for PromotedFunctionName, it will try to find if there is a match for OriginalFunctionName. 3. in backend compiler, we build symbol table entry for OriginalFunctionName and pointer to the same symbol of PromotedFunctionName, so that ICP can find the correct target to promote.
Reviewers: mehdi_amini, tejohnson
Reviewed By: tejohnson
Subscribers: llvm-commits, Prazek
Differential Revision: https://reviews.llvm.org/D30754
llvm-svn: 297757
show more ...
|
#
d5561e0a |
| 08-Mar-2017 |
Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> |
[DebugInfo] Emit address space with DW_AT_address_class attribute for pointer and reference types
Differential Revision: https://reviews.llvm.org/D29670
llvm-svn: 297320
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3 |
|
#
efcf06f5 |
| 11-Feb-2017 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move symbols from the global namespace into (anonymous) namespaces. NFC.
llvm-svn: 294837
|
#
be9ffaac |
| 10-Feb-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
IR: Function summary extensions for whole-program devirtualization pass.
The summary information includes all uses of llvm.type.test and llvm.type.checked.load intrinsics that can be used to devirtu
IR: Function summary extensions for whole-program devirtualization pass.
The summary information includes all uses of llvm.type.test and llvm.type.checked.load intrinsics that can be used to devirtualize calls, including any constant arguments for virtual constant propagation.
Differential Revision: https://reviews.llvm.org/D29734
llvm-svn: 294795
show more ...
|
Revision tags: llvmorg-4.0.0-rc2 |
|
#
1380edf4 |
| 03-Feb-2017 |
Mehdi Amini <mehdi.amini@apple.com> |
Revert "[ThinLTO] Add an auto-hide feature"
This reverts commit r293970.
After more discussion, this belongs to the linker side and there is no added value to do it at this level.
llvm-svn: 293993
|
#
b0a8ff71 |
| 03-Feb-2017 |
Mehdi Amini <mehdi.amini@apple.com> |
[ThinLTO] Add an auto-hide feature
When a symbol is not exported outside of the DSO, it is can be hidden. Usually we try to internalize as much as possible, but it is not always possible, for instan
[ThinLTO] Add an auto-hide feature
When a symbol is not exported outside of the DSO, it is can be hidden. Usually we try to internalize as much as possible, but it is not always possible, for instance a symbol can be referenced outside of the LTO unit, or there can be cross-module reference in ThinLTO.
This is a recommit of r293912 after fixing build failures, and a recommit of r293918 after fixing LLD tests.
Differential Revision: https://reviews.llvm.org/D28978
llvm-svn: 293970
show more ...
|
#
21c89dc9 |
| 02-Feb-2017 |
Mehdi Amini <mehdi.amini@apple.com> |
Revert "[ThinLTO] Add an auto-hide feature"
This reverts commit r293918, one lld test does not pass.
llvm-svn: 293961
|
#
97624fb1 |
| 02-Feb-2017 |
Mehdi Amini <mehdi.amini@apple.com> |
[ThinLTO] Add an auto-hide feature
When a symbol is not exported outside of the DSO, it is can be hidden. Usually we try to internalize as much as possible, but it is not always possible, for instan
[ThinLTO] Add an auto-hide feature
When a symbol is not exported outside of the DSO, it is can be hidden. Usually we try to internalize as much as possible, but it is not always possible, for instance a symbol can be referenced outside of the LTO unit, or there can be cross-module reference in ThinLTO.
This is a recommit of r293912 after fixing build failures.
Differential Revision: https://reviews.llvm.org/D28978
llvm-svn: 293918
show more ...
|
#
827600de |
| 02-Feb-2017 |
Mehdi Amini <mehdi.amini@apple.com> |
Revert "[ThinLTO] Add an auto-hide feature"
This reverts r293912, bots are broken.
llvm-svn: 293914
|
#
dc5a7444 |
| 02-Feb-2017 |
Mehdi Amini <mehdi.amini@apple.com> |
[ThinLTO] Add an auto-hide feature
When a symbol is not exported outside of the DSO, it is can be hidden. Usually we try to internalize as much as possible, but it is not always possible, for instan
[ThinLTO] Add an auto-hide feature
When a symbol is not exported outside of the DSO, it is can be hidden. Usually we try to internalize as much as possible, but it is not always possible, for instance a symbol can be referenced outside of the LTO unit, or there can be cross-module reference in ThinLTO.
Differential Revision: https://reviews.llvm.org/D28978
llvm-svn: 293912
show more ...
|
#
0944a8c2 |
| 01-Feb-2017 |
Dehao Chen <dehao@google.com> |
Change debug-info-for-profiling from a TargetOption to a function attribute.
Summary: LTO requires the debug-info-for-profiling to be a function attribute.
Reviewers: echristo, mehdi_amini, dblaiki
Change debug-info-for-profiling from a TargetOption to a function attribute.
Summary: LTO requires the debug-info-for-profiling to be a function attribute.
Reviewers: echristo, mehdi_amini, dblaikie, probinson, aprantl
Reviewed By: mehdi_amini, dblaikie, aprantl
Subscribers: aprantl, probinson, ahatanak, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D29203
llvm-svn: 293833
show more ...
|
Revision tags: llvmorg-4.0.0-rc1 |
|
#
6c475a75 |
| 05-Jan-2017 |
Teresa Johnson <tejohnson@google.com> |
ThinLTO: add early "dead-stripping" on the Index
Summary: Using the linker-supplied list of "preserved" symbols, we can compute the list of "dead" symbols, i.e. the one that are not reachable from a
ThinLTO: add early "dead-stripping" on the Index
Summary: Using the linker-supplied list of "preserved" symbols, we can compute the list of "dead" symbols, i.e. the one that are not reachable from a "preserved" symbol transitively on the reference graph. Right now we are using this information to mark these functions as non-eligible for import.
The impact is two folds: - Reduction of compile time: we don't import these functions anywhere or import the function these symbols are calling. - The limited number of import/export leads to better internalization.
Patch originally by Mehdi Amini.
Reviewers: mehdi_amini, pcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23488
llvm-svn: 291177
show more ...
|
#
519465b9 |
| 05-Jan-2017 |
Teresa Johnson <tejohnson@google.com> |
[ThinLTO] Subsume all importing checks into a single flag
Summary: This adds a new summary flag NotEligibleToImport that subsumes several existing flags (NoRename, HasInlineAsmMaybeReferencingIntern
[ThinLTO] Subsume all importing checks into a single flag
Summary: This adds a new summary flag NotEligibleToImport that subsumes several existing flags (NoRename, HasInlineAsmMaybeReferencingInternal and IsNotViableToInline). It also subsumes the checking of references on the summary that was being done during the thin link by eligibleForImport() for each candidate. It is much more efficient to do that checking once during the per-module summary build and record it in the summary.
Reviewers: mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28169
llvm-svn: 291108
show more ...
|
#
7ad9dc11 |
| 04-Jan-2017 |
David Blaikie <dblaikie@gmail.com> |
Reapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr""
If this is a problem for anyone (shared_ptr is two pointers in size, whereas IntrusiveRefCntPtr is 1
Reapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr""
If this is a problem for anyone (shared_ptr is two pointers in size, whereas IntrusiveRefCntPtr is 1 - and the ref count control block that make_shared adds is probably larger than the one int in RefCountedBase) I'd prefer to address this by adding a lower-overhead version of shared_ptr (possibly refactoring IntrusiveRefCntPtr into such a thing) to avoid the intrusiveness - this allows memory ownership to remain orthogonal to types and at least to me, seems to make code easier to understand (since no implicit ownership acquisition can happen).
This recommits 291006, reverted in r291007.
llvm-svn: 291016
show more ...
|
#
6e2207a1 |
| 04-Jan-2017 |
David Blaikie <dblaikie@gmail.com> |
Revert "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr"
Breaks Clang's use of bitcode. Reverting until I have a fix to go with it there.
This reverts commit r
Revert "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr"
Breaks Clang's use of bitcode. Reverting until I have a fix to go with it there.
This reverts commit r291006.
llvm-svn: 291007
show more ...
|
#
daff78cd |
| 04-Jan-2017 |
David Blaikie <dblaikie@gmail.com> |
Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr
If this is a problem for anyone (shared_ptr is two pointers in size, whereas IntrusiveRefCntPtr is 1 - and the r
Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr
If this is a problem for anyone (shared_ptr is two pointers in size, whereas IntrusiveRefCntPtr is 1 - and the ref count control block that make_shared adds is probably larger than the one int in RefCountedBase) I'd prefer to address this by adding a lower-overhead version of shared_ptr (possibly refactoring IntrusiveRefCntPtr into such a thing) to avoid the intrusiveness - this allows memory ownership to remain orthogonal to types and at least to me, seems to make code easier to understand (since no implicit ownership acquisition can happen).
llvm-svn: 291006
show more ...
|
#
5022bb72 |
| 28-Dec-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Change Metadata Index emission in the bitcode to use 2x32 bits for the placeholder
The Bitstream reader and writer are limited to handle a "size_t" at most, which means that we can't backpatch and r
Change Metadata Index emission in the bitcode to use 2x32 bits for the placeholder
The Bitstream reader and writer are limited to handle a "size_t" at most, which means that we can't backpatch and read back a 64bits value on 32 bits platform.
llvm-svn: 290693
show more ...
|
#
e98f9258 |
| 28-Dec-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Add an index for Module Metadata record in the bitcode
This index record the position for each metadata record in the bitcode, so that the reader will be able to lazy-load on demand each individual
Add an index for Module Metadata record in the bitcode
This index record the position for each metadata record in the bitcode, so that the reader will be able to lazy-load on demand each individual record.
We also make sure that every abbrev is emitted upfront so that the block can be skipped while reading.
I don't plan to commit this before having the reader counterpart, but I figured this can be reviewed mostly independently.
Recommit r290684 (was reverted in r290686 because a test was broken) after adding a threshold to avoid emitting the index when unnecessary (little amount of metadata). This optimization "hides" a limitation of the ability to backpatch in the bitstream: we can only backpatch safely when the position has been flushed. So if we emit an index for one metadata, it is possible that (part of) the offset placeholder hasn't been flushed and the backpatch will fail.
Differential Revision: https://reviews.llvm.org/D28083
llvm-svn: 290690
show more ...
|
#
2b59eca1 |
| 28-Dec-2016 |
Saleem Abdulrasool <compnerd@compnerd.org> |
Revert "Add an index for Module Metadata record in the bitcode"
This reverts commit a0ca6ae2d38339e4ede0dfa588086fc23d87e836. Revert at Mehdi's request as it is breaking bots.
llvm-svn: 290686
|
#
32ca1481 |
| 28-Dec-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Add an index for Module Metadata record in the bitcode
Summary: This index record the position for each metadata record in the bitcode, so that the reader will be able to lazy-load on demand each in
Add an index for Module Metadata record in the bitcode
Summary: This index record the position for each metadata record in the bitcode, so that the reader will be able to lazy-load on demand each individual record.
We also make sure that every abbrev is emitted upfront so that the block can be skipped while reading.
I don't plan to commit this before having the reader counterpart, but I figured this can be reviewed mostly independently.
Reviewers: pcc, tejohnson
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28083
llvm-svn: 290684
show more ...
|
#
7faeecc8 |
| 25-Dec-2016 |
Amjad Aboud <amjad.aboud@intel.com> |
[DebugInfo] Added support for Checksum debug info feature.
Differential Revision: https://reviews.llvm.org/D27642
llvm-svn: 290514
|
#
1b4137a7 |
| 21-Dec-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
IR: Function summary representation for type tests.
Each function summary has an attached list of type identifier GUIDs. The idea is that during the regular LTO phase we would match these GUIDs to t
IR: Function summary representation for type tests.
Each function summary has an attached list of type identifier GUIDs. The idea is that during the regular LTO phase we would match these GUIDs to type identifiers defined by the regular LTO module and store the resolutions in a top-level "type identifier summary" (which will be implemented separately).
Differential Revision: https://reviews.llvm.org/D27967
llvm-svn: 290280
show more ...
|
#
0c30f089 |
| 20-Dec-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
IR: Eliminate non-determinism in the module summary analysis.
Also make the summary ref and call graph vectors immutable. This means a smaller API surface and fewer places to audit for non-determini
IR: Eliminate non-determinism in the module summary analysis.
Also make the summary ref and call graph vectors immutable. This means a smaller API surface and fewer places to audit for non-determinism.
Differential Revision: https://reviews.llvm.org/D27875
llvm-svn: 290200
show more ...
|
#
bceaaa96 |
| 20-Dec-2016 |
Adrian Prantl <aprantl@apple.com> |
[IR] Remove the DIExpression field from DIGlobalVariable.
This patch implements PR31013 by introducing a DIGlobalVariableExpression that holds a pair of DIGlobalVariable and DIExpression.
Currently
[IR] Remove the DIExpression field from DIGlobalVariable.
This patch implements PR31013 by introducing a DIGlobalVariableExpression that holds a pair of DIGlobalVariable and DIExpression.
Currently, DIGlobalVariables holds a DIExpression. This is not the best way to model this:
(1) The DIGlobalVariable should describe the source level variable, not how to get to its location.
(2) It makes it unsafe/hard to update the expressions when we call replaceExpression on the DIGLobalVariable.
(3) It makes it impossible to represent a global variable that is in more than one location (e.g., a variable with multiple DW_OP_LLVM_fragment-s). We also moved away from attaching the DIExpression to DILocalVariable for the same reasons.
This reapplies r289902 with additional testcase upgrades and a change to the Bitcode record for DIGlobalVariable, that makes upgrading the old format unambiguous also for variables without DIExpressions.
<rdar://problem/29250149> https://llvm.org/bugs/show_bug.cgi?id=31013 Differential Revision: https://reviews.llvm.org/D26769
llvm-svn: 290153
show more ...
|
#
73ec0656 |
| 16-Dec-2016 |
Adrian Prantl <aprantl@apple.com> |
Revert "[IR] Remove the DIExpression field from DIGlobalVariable."
This reverts commit 289920 (again). I forgot to implement a Bitcode upgrade for the case where a DIGlobalVariable has not DIExpress
Revert "[IR] Remove the DIExpression field from DIGlobalVariable."
This reverts commit 289920 (again). I forgot to implement a Bitcode upgrade for the case where a DIGlobalVariable has not DIExpression. Unfortunately it is not possible to safely upgrade these variables without adding a flag to the bitcode record indicating which version they are. My plan of record is to roll the planned follow-up patch that adds a unit: field to DIGlobalVariable into this patch before recomitting. This way we only need one Bitcode upgrade for both changes (with a version flag in the bitcode record to safely distinguish the record formats).
Sorry for the churn!
llvm-svn: 289982
show more ...
|