#
f3d7904d |
| 11-May-2017 |
Javed Absar <javed.absar@arm.com> |
[IR] Allow attributes with global variables
This patch extends llvm-ir to allow attributes to be set on global variables. An RFC was sent out earlier by my colleague James Molloy: http://lists.llvm.
[IR] Allow attributes with global variables
This patch extends llvm-ir to allow attributes to be set on global variables. An RFC was sent out earlier by my colleague James Molloy: http://lists.llvm.org/pipermail/cfe-dev/2017-March/053100.html A key part of that proposal was to extend LLVM-IR to carry attributes on global variables. This generic feature could be useful for multiple purposes. In our present context, it would be useful to carry user specified sections for bss/rodata/data.
Reviewed by: Jonathan Roelofs, Reid Kleckner Differential Revision: https://reviews.llvm.org/D32009
llvm-svn: 302794
show more ...
|
#
9667b91b |
| 04-May-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI." with a fix for the clang backend.
llvm-svn: 302176
|
#
f6039f25 |
| 04-May-2017 |
Eric Liu <ioeric@google.com> |
Revert "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
This reverts commit r302108. This causes crash in clang bootstrap with LTO.
Contacted the auther in the or
Revert "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
This reverts commit r302108. This causes crash in clang bootstrap with LTO.
Contacted the auther in the original commit.
llvm-svn: 302140
show more ...
|
#
5f85a9de |
| 04-May-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.
When profiling a no-op incremental link of Chromium I found that the functions computeImportForFunction and computeD
IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.
When profiling a no-op incremental link of Chromium I found that the functions computeImportForFunction and computeDeadSymbols were consuming roughly 10% of the profile. The goal of this change is to improve the performance of those functions by changing the map lookups that they were previously doing into pointer dereferences.
This is achieved by changing the ValueInfo data structure to be a pointer to an element of the global value map owned by ModuleSummaryIndex, and changing reference lists in the GlobalValueSummary to hold ValueInfos instead of GUIDs. This means that a ValueInfo will take a client directly to the summary list for a given GUID.
Differential Revision: https://reviews.llvm.org/D32471
llvm-svn: 302108
show more ...
|
#
440e204c |
| 01-May-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Fix a pessimising move warning.
llvm-svn: 301852
|
#
74d22dd7 |
| 01-May-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Make the summary reader responsible for merging. NFCI.
This is to prepare for an upcoming change which uses pointers instead of GUIDs to represent references.
Differential Revision: https:
Bitcode: Make the summary reader responsible for merging. NFCI.
This is to prepare for an upcoming change which uses pointers instead of GUIDs to represent references.
Differential Revision: https://reviews.llvm.org/D32469
llvm-svn: 301843
show more ...
|
#
c15d60b7 |
| 01-May-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Object: Remove ModuleSummaryIndexObjectFile class.
Differential Revision: https://reviews.llvm.org/D32195
llvm-svn: 301832
|
#
513dc805 |
| 28-Apr-2017 |
Hans Wennborg <hans@hanshq.net> |
Remove set but unused variable in BitcodeReader.cpp. NFC.
llvm-svn: 301713
|
#
b19b57ea |
| 28-Apr-2017 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
Add speculatable function attribute
This attribute tells the optimizer that the function may be speculated.
Patch by Tom Stellard
llvm-svn: 301680
|
#
ba124f9e |
| 28-Apr-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Do not remove empty summary entries when reading a per-module summary.
This became no longer necessary after D19462 landed, and will be incompatible with an upcoming change to the summary d
Bitcode: Do not remove empty summary entries when reading a per-module summary.
This became no longer necessary after D19462 landed, and will be incompatible with an upcoming change to the summary data structures that changes how we represent references.
llvm-svn: 301660
show more ...
|
Revision tags: llvmorg-4.0.1-rc1 |
|
#
6825fb64 |
| 18-Apr-2017 |
Adrian Prantl <aprantl@apple.com> |
PR32382: Fix emitting complex DWARF expressions.
The DWARF specification knows 3 kinds of non-empty simple location descriptions: 1. Register location descriptions - describe a variable in a regis
PR32382: Fix emitting complex DWARF expressions.
The DWARF specification knows 3 kinds of non-empty simple location descriptions: 1. Register location descriptions - describe a variable in a register - consist of only a DW_OP_reg 2. Memory location descriptions - describe the address of a variable 3. Implicit location descriptions - describe the value of a variable - end with DW_OP_stack_value & friends
The existing DwarfExpression code is pretty much ignorant of these restrictions. This used to not matter because we only emitted very short expressions that we happened to get right by accident. This patch makes DwarfExpression aware of the rules defined by the DWARF standard and now chooses the right kind of location description for each expression being emitted.
This would have been an NFC commit (for the existing testsuite) if not for the way that clang describes captured block variables. Based on how the previous code in LLVM emitted locations, DW_OP_deref operations that should have come at the end of the expression are put at its beginning. Fixing this means changing the semantics of DIExpression, so this patch bumps the version number of DIExpression and implements a bitcode upgrade.
There are two major changes in this patch:
I had to fix the semantics of dbg.declare for describing function arguments. After this patch a dbg.declare always takes the *address* of a variable as the first argument, even if the argument is not an alloca.
When lowering a DBG_VALUE, the decision of whether to emit a register location description or a memory location description depends on the MachineLocation — register machine locations may get promoted to memory locations based on their DIExpression. (Future) optimization passes that want to salvage implicit debug location for variables may do so by appending a DW_OP_stack_value. For example: DBG_VALUE, [RBP-8] --> DW_OP_fbreg -8 DBG_VALUE, RAX --> DW_OP_reg0 +0 DBG_VALUE, RAX, DIExpression(DW_OP_deref) --> DW_OP_reg0 +0
All testcases that were modified were regenerated from clang. I also added source-based testcases for each of these to the debuginfo-tests repository over the last week to make sure that no synchronized bugs slip in. The debuginfo-tests compile from source and run the debugger.
https://bugs.llvm.org/show_bug.cgi?id=32382 <rdar://problem/31205000>
Differential Revision: https://reviews.llvm.org/D31439
llvm-svn: 300522
show more ...
|
#
a0f371a1 |
| 17-Apr-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Add a string table to the bitcode format.
Add a top-level STRTAB block containing a string table blob, and start storing strings for module codes FUNCTION, GLOBALVAR, ALIAS, IFUNC and COMDA
Bitcode: Add a string table to the bitcode format.
Add a top-level STRTAB block containing a string table blob, and start storing strings for module codes FUNCTION, GLOBALVAR, ALIAS, IFUNC and COMDAT in the string table.
This change allows us to share names between globals and comdats as well as between modules, and improves the efficiency of loading bitcode files by no longer using a bit encoding for symbol names. Once we start writing the irsymtab to the bitcode file we will also be able to share strings between it and the module.
On my machine, link time for Chromium for Linux with ThinLTO decreases by about 7% for no-op incremental builds or about 1% for full builds. Total bitcode file size decreases by about 3%.
As discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2017-April/111732.html
Differential Revision: https://reviews.llvm.org/D31838
llvm-svn: 300464
show more ...
|
#
ce24a2aa |
| 12-Apr-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Move version and global value module code parsers to separate functions. NFCI.
This will make it easier to teach this code about the string table.
Differential Revision: https://reviews.ll
Bitcode: Move version and global value module code parsers to separate functions. NFCI.
This will make it easier to teach this code about the string table.
Differential Revision: https://reviews.llvm.org/D31828
llvm-svn: 300099
show more ...
|
#
3c1fc768 |
| 10-Apr-2017 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
Allow DataLayout to specify addrspace for allocas.
LLVM makes several assumptions about address space 0. However, alloca is presently constrained to always return this address space. There's no real
Allow DataLayout to specify addrspace for allocas.
LLVM makes several assumptions about address space 0. However, alloca is presently constrained to always return this address space. There's no real way to avoid using alloca, so without this there is no way to opt out of these assumptions.
The problematic assumptions include: - That the pointer size used for the stack is the same size as the code size pointer, which is also the maximum sized pointer.
- That 0 is an invalid, non-dereferencable pointer value.
These are problems for AMDGPU because alloca is used to implement the private address space, which uses a 32-bit index as the pointer value. Other pointers are 64-bit and behave more like LLVM's notion of generic address space. By changing the address space used for allocas, we can change our generic pointer type to be LLVM's generic pointer type which does have similar properties.
llvm-svn: 299888
show more ...
|
#
f43e0ae7 |
| 10-Apr-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Merge the code for parsing global value module codes in the summary bitcode reader. NFCI.
This code will need to be taught to handle string tables and it's better if there is only one copy
Bitcode: Merge the code for parsing global value module codes in the summary bitcode reader. NFCI.
This code will need to be taught to handle string tables and it's better if there is only one copy of it.
Differential Revision: https://reviews.llvm.org/D31829
llvm-svn: 299886
show more ...
|
#
db4cafa6 |
| 06-Apr-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Do not create FNENTRYs for aliases of functions.
There doesn't seem to be any point in doing this.
Differential Revision: https://reviews.llvm.org/D31691
llvm-svn: 299694
|
#
f5af7783 |
| 03-Apr-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Remove reader support for MODULE_CODE_PURGEVALS.
Support for writing this module code was removed in r73220, which was well before the LLVM 3.0 release, so we do not need to be able to unde
Bitcode: Remove reader support for MODULE_CODE_PURGEVALS.
Support for writing this module code was removed in r73220, which was well before the LLVM 3.0 release, so we do not need to be able to understand it for backwards compatibility.
Differential Revision: https://reviews.llvm.org/D31563
llvm-svn: 299370
show more ...
|
#
cd847a8f |
| 28-Mar-2017 |
Adam Nemet <anemet@apple.com> |
[IR] Add AllowContract to FastMathFlags
-ffp-contract=fast does not currently work with LTO because it's passed as a TargetOption to the backend rather than in the IR. This adds it to FastMathFlags.
[IR] Add AllowContract to FastMathFlags
-ffp-contract=fast does not currently work with LTO because it's passed as a TargetOption to the backend rather than in the IR. This adds it to FastMathFlags.
This is toward fixing PR25721
Differential Revision: https://reviews.llvm.org/D31164
llvm-svn: 298939
show more ...
|
#
b518054b |
| 21-Mar-2017 |
Reid Kleckner <rnk@google.com> |
Rename AttributeSet to AttributeList
Summary: This class is a list of AttributeSetNodes corresponding the function prototype of a call or function declaration. This class used to be called ParamAttr
Rename AttributeSet to AttributeList
Summary: This class is a list of AttributeSetNodes corresponding the function prototype of a call or function declaration. This class used to be called ParamAttrListPtr, then AttrListPtr, then AttributeSet. It is typically accessed by parameter and return value index, so "AttributeList" seems like a more intuitive name.
Rename AttributeSetImpl to AttributeListImpl to follow suit.
It's useful to rename this class so that we can rename AttributeSetNode to AttributeSet later. AttributeSet is the set of attributes that apply to a single function, argument, or return value.
Reviewers: sanjoy, javed.absar, chandlerc, pete
Reviewed By: pete
Subscribers: pete, jholewinski, arsenm, dschuff, mehdi_amini, jfb, nhaehnle, sbc100, void, llvm-commits
Differential Revision: https://reviews.llvm.org/D31102
llvm-svn: 298393
show more ...
|
#
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 ...
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3 |
|
#
fa3175f2 |
| 11-Feb-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Address Mehdi's post-commit review comments on r294795.
llvm-svn: 294822
|
#
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
|