| #
02563cd3 |
| 28-Oct-2016 |
Teresa Johnson <[email protected]> |
[ThinLTO] Create AliasSummary when building index
Summary: Previously we were creating the alias summary on the fly while writing the summary to bitcode. This moves the creation of these summaries t
[ThinLTO] Create AliasSummary when building index
Summary: Previously we were creating the alias summary on the fly while writing the summary to bitcode. This moves the creation of these summaries to the module summary index builder where we build the rest of the summary index.
This is going to be necessary for setting the NoRename flag for values possibly used in inline asm or module level asm.
Reviewers: mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26049
llvm-svn: 285379
show more ...
|
| #
58fbc916 |
| 28-Oct-2016 |
Teresa Johnson <[email protected]> |
[ThinLTO] Rename HasSection to NoRename (NFC)
Summary: This is in preparation for a change to utilize this flag for symbols referenced/defined in either inline or module level assembly.
Reviewers:
[ThinLTO] Rename HasSection to NoRename (NFC)
Summary: This is in preparation for a change to utilize this flag for symbols referenced/defined in either inline or module level assembly.
Reviewers: mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26048
llvm-svn: 285376
show more ...
|
| #
25059360 |
| 20-Oct-2016 |
Simon Pilgrim <[email protected]> |
Fix spelling mistake in comment.
llvm-svn: 284714
|
| #
071da46a |
| 20-Oct-2016 |
Simon Pilgrim <[email protected]> |
Fix MSVC bool -> uint64_t promotion warning
llvm-svn: 284713
|
| #
2ede126b |
| 20-Oct-2016 |
Victor Leschuk <[email protected]> |
DebugInfo: preparation to implement DW_AT_alignment
- Add alignment attribute to DIVariable family - Modify bitcode format to match new DIVariable representation - Update tests to match these cha
DebugInfo: preparation to implement DW_AT_alignment
- Add alignment attribute to DIVariable family - Modify bitcode format to match new DIVariable representation - Update tests to match these changes (also add bitcode upgrade test) - Expect that frontend passes non-zero align value only when it is not default (was forcibly aligned by alignas()/_Alignas()/__atribute__(aligned())
Differential Revision: https://reviews.llvm.org/D25073
llvm-svn: 284678
show more ...
|
| #
d9830eb7 |
| 26-Sep-2016 |
Piotr Padlewski <[email protected]> |
[thinlto] Basic thinlto fdo heuristic
Summary: This patch improves thinlto importer by importing 3x larger functions that are called from hot block.
I compared performance with the trunk on spec, a
[thinlto] Basic thinlto fdo heuristic
Summary: This patch improves thinlto importer by importing 3x larger functions that are called from hot block.
I compared performance with the trunk on spec, and there were about 2% on povray and 3.33% on milc. These results seems to be consistant and match the results Teresa got with her simple heuristic. Some benchmarks got slower but I think they are just noisy (mcf, xalancbmki, omnetpp)- running the benchmarks again with more iterations to confirm. Geomean of all benchmarks including the noisy ones were about +0.02%.
I see much better improvement on google branch with Easwaran patch for pgo callsite inlining (the inliner actually inline those big functions) Over all I see +0.5% improvement, and I get +8.65% on povray. So I guess we will see much bigger change when Easwaran patch will land (it depends on new pass manager), but it is still worth putting this to trunk before it.
Implementation details changes: - Removed CallsiteCount. - ProfileCount got replaced by Hotness - hot-import-multiplier is set to 3.0 for now, didn't have time to tune it up, but I see that we get most of the interesting functions with 3, so there is no much performance difference with higher, and binary size doesn't grow as much as with 10.0.
Reviewers: eraman, mehdi_amini, tejohnson
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D24638
llvm-svn: 282437
show more ...
|
| #
620c140a |
| 20-Sep-2016 |
Teresa Johnson <[email protected]> |
[ThinLTO] Always emit a summary when compiling in ThinLTO mode
Summary: Emit an empty summary section, instead of no summary section, when there are no global variables in the index. This ensures th
[ThinLTO] Always emit a summary when compiling in ThinLTO mode
Summary: Emit an empty summary section, instead of no summary section, when there are no global variables in the index. This ensures that LTO will treat these files as ThinLTO inputs, instead of as regular LTO inputs.
In addition to not being what the user likely intended when compiling with -flto=thin, the current behavior is problematic for distributed build systems that expect to get ThinLTO index and imports files back for each input compiled with -flto=thin. Combining into a single regular LTO module also reduces the backend parallelism. And in the case where the index was suppressed due to uses in inline assembly, combining into a single LTO module could provoke renaming of duplicates that we were trying to prevent by suppressing the index.
This change required a couple of fixes to handle the empty summary section.
Reviewers: mehdi_amini
Subscribers: mehdi_amini, llvm-commits, pcc
Differential Revision: https://reviews.llvm.org/D24779
llvm-svn: 282037
show more ...
|
| #
7cf63826 |
| 19-Sep-2016 |
Mehdi Amini <[email protected]> |
BitcodeWriter: fix emission of invoke when calling a var-arg function with operand bundles
llvm-svn: 281940
|
| #
a53d49e1 |
| 17-Sep-2016 |
Mehdi Amini <[email protected]> |
Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)
The ValueSymbolTable is used to detect name conflict and rename instructions automatically. This is not needed
Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)
The ValueSymbolTable is used to detect name conflict and rename instructions automatically. This is not needed when the value names are automatically discarded by the LLVMContext. No functional change intended, just saving a little bit of memory.
This is a recommit of r281806 after fixing the accessor to return a pointer instead of a reference and updating all the call-sites.
llvm-svn: 281813
show more ...
|
| #
d4135bbc |
| 13-Sep-2016 |
Peter Collingbourne <[email protected]> |
DebugInfo: New metadata representation for global variables.
This patch reverses the edge from DIGlobalVariable to GlobalVariable. This will allow us to more easily preserve debug info metadata when
DebugInfo: New metadata representation for global variables.
This patch reverses the edge from DIGlobalVariable to GlobalVariable. This will allow us to more easily preserve debug info metadata when manipulating global variables.
Fixes PR30362. A program for upgrading test cases is attached to that bug.
Differential Revision: http://reviews.llvm.org/D20147
llvm-svn: 281284
show more ...
|
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3 |
|
| #
a01f2953 |
| 24-Aug-2016 |
David Blaikie <[email protected]> |
DebugInfo: Add flag to CU to disable emission of inline debug info into the skeleton CU
In cases where .dwo/.dwp files are guaranteed to be available, skipping the extra online (in the .o file) inli
DebugInfo: Add flag to CU to disable emission of inline debug info into the skeleton CU
In cases where .dwo/.dwp files are guaranteed to be available, skipping the extra online (in the .o file) inline info can save a substantial amount of space - see the original r221306 for more details there.
llvm-svn: 279650
show more ...
|
| #
cc1fe9b9 |
| 19-Aug-2016 |
Mehdi Amini <[email protected]> |
Constify some path in the bitcode writer (NFC)
llvm-svn: 279211
|
|
Revision tags: llvmorg-3.9.0-rc2 |
|
| #
332b3b22 |
| 11-Aug-2016 |
Piotr Padlewski <[email protected]> |
Don't import variadic functions
Summary: This patch adds IsVariadicFunction bit to summary in order to not import variadic functions. Inliner doesn't inline variadic functions because it is hard to
Don't import variadic functions
Summary: This patch adds IsVariadicFunction bit to summary in order to not import variadic functions. Inliner doesn't inline variadic functions because it is hard to reason about it.
This one small fix improves Importer by about 16% (going from 86% to 100% of imported functions that are inlined anywhere) on some spec benchmarks like 'int' and others.
Reviewers: eraman, mehdi_amini, tejohnson
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D23339
llvm-svn: 278432
show more ...
|
|
Revision tags: llvmorg-3.9.0-rc1 |
|
| #
bb5c404e |
| 18-Jul-2016 |
Teresa Johnson <[email protected]> |
[ThinLTO] Address review comments from PGO indirect call promotion (NFC)
Address a couple of post-commit review comments from r275707.
llvm-svn: 275867
|
| #
cd21a646 |
| 17-Jul-2016 |
Teresa Johnson <[email protected]> |
[ThinLTO] Perform profile-guided indirect call promotion
Summary: To enable profile-guided indirect call promotion in ThinLTO mode, we simply add call graph edges for each profitable target from the
[ThinLTO] Perform profile-guided indirect call promotion
Summary: To enable profile-guided indirect call promotion in ThinLTO mode, we simply add call graph edges for each profitable target from the profile to the summaries, then the summary-guided importing will consider the callee for importing as usual.
Also we need to enable the indirect call promotion pass creation in the PassManagerBuilder when PerformThinLTO=true (we are in the ThinLTO backend), so that the newly imported functions are considered for promotion in the backends.
The IC promotion profiles refer to callees by GUID, which required adding GUIDs to the per-module VST in bitcode (and assigning them valueIds similar to how they are assigned valueIds in the combined index).
Reviewers: mehdi_amini, xur
Subscribers: mehdi_amini, davidxl, llvm-commits
Differential Revision: http://reviews.llvm.org/D21932
llvm-svn: 275707
show more ...
|
| #
84c9f991 |
| 04-Jul-2016 |
Nicolai Haehnle <[email protected]> |
Add writeonly IR attribute
Summary: This complements the earlier addition of IntrWriteMem and IntrWriteArgMem LLVM intrinsic properties, see D18291.
Also start using the attribute for memset, memcp
Add writeonly IR attribute
Summary: This complements the earlier addition of IntrWriteMem and IntrWriteArgMem LLVM intrinsic properties, see D18291.
Also start using the attribute for memset, memcpy, and memmove intrinsics, and remove their special-casing in BasicAliasAnalysis.
Reviewers: reames, joker.eph
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D18714
llvm-svn: 274485
show more ...
|
| #
b5af11df |
| 01-Jul-2016 |
Reid Kleckner <[email protected]> |
[codeview] Add DISubprogram::ThisAdjustment
Summary: This represents the adjustment applied to the implicit 'this' parameter in the prologue of a virtual method in the MS C++ ABI. The adjustment is
[codeview] Add DISubprogram::ThisAdjustment
Summary: This represents the adjustment applied to the implicit 'this' parameter in the prologue of a virtual method in the MS C++ ABI. The adjustment is always zero unless multiple inheritance is involved.
This increases the size of DISubprogram by 8 bytes, unfortunately. The adjustment really is a signed 32-bit integer. If this size increase is too much, we could probably win it back by splitting out a subclass with info specific to virtual methods (virtuality, vindex, thisadjustment, containingType).
Reviewers: aprantl, dexonsmith
Subscribers: aaboud, amccarth, llvm-commits
Differential Revision: http://reviews.llvm.org/D21614
llvm-svn: 274325
show more ...
|
| #
b19924a4 |
| 24-Jun-2016 |
Peter Collingbourne <[email protected]> |
BitcodeWriter: Remove redundant (and incorrect) check for whether to emit module summary.
The function name Module::empty() is slightly misleading in that it only tests for the presence of functions
BitcodeWriter: Remove redundant (and incorrect) check for whether to emit module summary.
The function name Module::empty() is slightly misleading in that it only tests for the presence of functions in the module. However we still want to emit the module summary if the module contains only global variables or aliases. The presence of such entities can be determined simply by checking the summary directly, as we are doing below.
Differential Revision: http://reviews.llvm.org/D21669
llvm-svn: 273638
show more ...
|
| #
21521891 |
| 21-Jun-2016 |
Peter Collingbourne <[email protected]> |
IR: Allow metadata attachments on declarations, and fix lazy loaded metadata issue with globals.
This change is motivated by an upcoming change to the metadata representation used for CFI. The indir
IR: Allow metadata attachments on declarations, and fix lazy loaded metadata issue with globals.
This change is motivated by an upcoming change to the metadata representation used for CFI. The indirect function call checker needs type information for external function declarations in order to correctly generate jump table entries for such declarations. We currently associate such type information with declarations using a global metadata node, but I plan [1] to move all such metadata to global object attachments.
In bitcode, metadata attachments for function declarations appear in the global metadata block. This seems reasonable to me because I expect metadata attachments on declarations to be uncommon. In the long term I'd also expect this to be the case for CFI, because we'd want to use some specialized bitcode format for this metadata that could be read as part of the ThinLTO thin-link phase, which would mean that it would not appear in the global metadata block.
To solve the lazy loaded metadata issue I was seeing with D20147, I use the same bitcode representation for metadata attachments for global variables as I do for function declarations. Since there's a use case for metadata attachments in the global metadata block, we might as well use that representation for global variables as well, at least until we have a mechanism for lazy loading global variables.
In the assembly format, the metadata attachments appear after the "declare" keyword in order to avoid a parsing ambiguity.
[1] http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html
Differential Revision: http://reviews.llvm.org/D21052
llvm-svn: 273336
show more ...
|
| #
96efdd61 |
| 14-Jun-2016 |
Peter Collingbourne <[email protected]> |
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 ...
|
| #
de3d8b50 |
| 08-Jun-2016 |
Reid Kleckner <[email protected]> |
[DebugInfo] Add calling convention support for DWARF and CodeView
Summary: Now DISubroutineType has a 'cc' field which should be a DW_CC_ enum. If it is present and non-zero, the backend will emit
[DebugInfo] Add calling convention support for DWARF and CodeView
Summary: Now DISubroutineType has a 'cc' field which should be a DW_CC_ enum. If it is present and non-zero, the backend will emit it as a DW_AT_calling_convention attribute. On the CodeView side, we translate it to the appropriate enum for the LF_PROCEDURE record.
I added a new LLVM vendor specific enum to the list of DWARF calling conventions. DWARF does not appear to attempt to standardize these, so I assume it's OK to do this until we coordinate with GCC on how to emit vectorcall convention functions.
Reviewers: dexonsmith, majnemer, aaboud, amccarth
Subscribers: mehdi_amini, llvm-commits
Differential Revision: http://reviews.llvm.org/D21114
llvm-svn: 272197
show more ...
|
|
Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
| #
cceae7fe |
| 31-May-2016 |
Peter Collingbourne <[email protected]> |
Add support for metadata attachments for global variables.
This patch adds an IR, assembly and bitcode representation for metadata attachments for globals. Future patches will port existing features
Add support for metadata attachments for global variables.
This patch adds an IR, assembly and bitcode representation for metadata attachments for globals. Future patches will port existing features to use these new attachments.
Differential Revision: http://reviews.llvm.org/D20074
llvm-svn: 271348
show more ...
|
| #
fdbb8f47 |
| 16-May-2016 |
Mehdi Amini <[email protected]> |
Avoid temporary vector for sorting in BitcodeWriter
As suggested by Duncan, fixup for r269634 and r269635
From: Mehdi Amini <[email protected]> llvm-svn: 269715
|
| #
367577aa |
| 16-May-2016 |
Mehdi Amini <[email protected]> |
ThinLTO: fix non-determinism in bitcode writing
Calls are initialized from a DenseMap. We can sort them using the value id to recover some determinism during serialization.
From: mehdi_amini <mehdi
ThinLTO: fix non-determinism in bitcode writing
Calls are initialized from a DenseMap. We can sort them using the value id to recover some determinism during serialization.
From: mehdi_amini <mehdi_amini@91177308-0d34-0410-b5e6-96231b3b80d8> llvm-svn: 269638
show more ...
|
| #
fe974084 |
| 16-May-2016 |
Mehdi Amini <[email protected]> |
Revert "ThinLTO: fix non-determinism in bitcode writing"
This reverts commit r269634, bots are broken.
From: Mehdi Amini <[email protected]> llvm-svn: 269637
|