|
Revision tags: llvmorg-5.0.0-rc2 |
|
| #
75da10d1 |
| 04-Aug-2017 |
Charles Saternos <[email protected]> |
[ThinLTO] Add FunctionAttrs to ThinLTO index
Adds function attributes to index: ReadNone, ReadOnly, NoRecurse, NoAlias. This attributes will be used for future ThinLTO optimizations that will propag
[ThinLTO] Add FunctionAttrs to ThinLTO index
Adds function attributes to index: ReadNone, ReadOnly, NoRecurse, NoAlias. This attributes will be used for future ThinLTO optimizations that will propagate function attributes across modules.
llvm-svn: 310061
show more ...
|
|
Revision tags: llvmorg-5.0.0-rc1 |
|
| #
1dec57d5 |
| 21-Jul-2017 |
Haojie Wang <[email protected]> |
ThinLTO Minimized Bitcode File Size Reduction
Summary: Currently the ThinLTO minimized bitcode file only strip the debug info, but there is still a lot of information in the minimized bit code file
ThinLTO Minimized Bitcode File Size Reduction
Summary: Currently the ThinLTO minimized bitcode file only strip the debug info, but there is still a lot of information in the minimized bit code file that will be not used for thin linker. In this patch, most of the extra information is striped to reduce the minimized bitcode file. Now only ModuleVersion, ModuleInfo, ModuleGlobalValueSummary, ModuleHash, Symtab and Strtab are left. Now the minimized bitcode file size is reduced to 15%-30% of the debug info stripped bitcode file size.
Reviewers: danielcdh, tejohnson, pcc
Reviewed By: pcc
Subscribers: mehdi_amini, aprantl, inglorion, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D35334
llvm-svn: 308760
show more ...
|
| #
d63bfd21 |
| 19-Jul-2017 |
Adrian Prantl <[email protected]> |
Debug Info: Add a file: field to DIImportedEntity.
DIImportedEntity has a line number, but not a file field. To determine the decl_line/decl_file we combine the line number from the DIImportedEntity
Debug Info: Add a file: field to DIImportedEntity.
DIImportedEntity has a line number, but not a file field. To determine the decl_line/decl_file we combine the line number from the DIImportedEntity with the file from the DIImportedEntity's scope. This does not work correctly when the parent scope is a DINamespace or a DIModule, both of which do not have a source file.
This patch adds a file field to DIImportedEntity to unambiguously identify the source location of the using/import declaration. Most testcase updates are mechanical, the interesting one is the removal of the FIXME in test/DebugInfo/Generic/namespace.ll.
This fixes PR33822. See https://bugs.llvm.org/show_bug.cgi?id=33822 for more context.
<rdar://problem/33357889> https://bugs.llvm.org/show_bug.cgi?id=33822
Differential Revision: https://reviews.llvm.org/D35583
llvm-svn: 308398
show more ...
|
| #
bb80d3e1 |
| 11-Jul-2017 |
Konstantin Zhuravlyov <[email protected]> |
Enhance synchscope representation
OpenCL 2.0 introduces the notion of memory scopes in atomic operations to global and local memory. These scopes restrict how synchronization is achieved, whic
Enhance synchscope representation
OpenCL 2.0 introduces the notion of memory scopes in atomic operations to global and local memory. These scopes restrict how synchronization is achieved, which can result in improved performance.
This change extends existing notion of synchronization scopes in LLVM to support arbitrary scopes expressed as target-specific strings, in addition to the already defined scopes (single thread, system).
The LLVM IR and MIR syntax for expressing synchronization scopes has changed to use *syncscope("<scope>")*, where <scope> can be "singlethread" (this replaces *singlethread* keyword), or a target-specific name. As before, if the scope is not specified, it defaults to CrossThread/System scope.
Implementation details: - Mapping from synchronization scope name/string to synchronization scope id is stored in LLVM context; - CrossThread/System and SingleThread scopes are pre-defined to efficiently check for known scopes without comparing strings; - Synchronization scope names are stored in SYNC_SCOPE_NAMES_BLOCK in the bitcode.
Differential Revision: https://reviews.llvm.org/D21723
llvm-svn: 307722
show more ...
|
| #
c8556158 |
| 06-Jul-2017 |
Peter Collingbourne <[email protected]> |
Bitcode: Include any strings added to the string table in the module hash.
Differential Revision: https://reviews.llvm.org/D35037
llvm-svn: 307286
|
| #
92648c25 |
| 27-Jun-2017 |
Peter Collingbourne <[email protected]> |
Bitcode: Write the irsymtab to disk.
Differential Revision: https://reviews.llvm.org/D33973
llvm-svn: 306487
|
| #
4d4ee93d |
| 16-Jun-2017 |
Evgeniy Stepanov <[email protected]> |
[cfi] CFI-ICall for ThinLTO.
Implement ControlFlowIntegrity for indirect function calls in ThinLTO. Design follows the RFC in llvm-dev, see https://groups.google.com/d/msg/llvm-dev/MgUlaphu4Qc/kywu0
[cfi] CFI-ICall for ThinLTO.
Implement ControlFlowIntegrity for indirect function calls in ThinLTO. Design follows the RFC in llvm-dev, see https://groups.google.com/d/msg/llvm-dev/MgUlaphu4Qc/kywu0AqjAQAJ
llvm-svn: 305533
show more ...
|
| #
ffc498df |
| 14-Jun-2017 |
Florian Hahn <[email protected]> |
Align definition of DW_OP_plus with DWARF spec [3/3]
Summary: This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things. The
Align definition of DW_OP_plus with DWARF spec [3/3]
Summary: This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things. The way that LLVM interprets DW_OP_plus in DIExpression nodes is basically that of the DW_OP_plus_uconst operator since LLVM expects an unsigned constant operand. This unnecessarily restricts the DW_OP_plus operator, preventing it from being used to describe the evaluation of runtime values on the expression stack. These patches try to align the semantics of DW_OP_plus and DW_OP_minus with that of the DWARF definition, which pops two elements off the expression stack, performs the operation and pushes the result back on the stack. This is done in three stages: • The first patch (LLVM) adds support for DW_OP_plus_uconst. • The second patch (Clang) contains changes all its uses from DW_OP_plus to DW_OP_plus_uconst. • The third patch (LLVM) changes the semantics of DW_OP_plus and DW_OP_minus to be in line with its DWARF meaning. This patch includes the bitcode upgrade from legacy DIExpressions.
Patch by Sander de Smalen.
Reviewers: echristo, pcc, aprantl
Reviewed By: aprantl
Subscribers: fhahn, javed.absar, aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D33894
llvm-svn: 305386
show more ...
|
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
| #
e357fbd2 |
| 08-Jun-2017 |
Peter Collingbourne <[email protected]> |
Write summaries for merged modules when splitting modules for ThinLTO.
This is to prepare to allow for dead stripping of globals in the merged modules.
Differential Revision: https://reviews.llvm.o
Write summaries for merged modules when splitting modules for ThinLTO.
This is to prepare to allow for dead stripping of globals in the merged modules.
Differential Revision: https://reviews.llvm.org/D33921
llvm-svn: 305027
show more ...
|
| #
358c012d |
| 02-Jun-2017 |
David Blaikie <[email protected]> |
BitcodeWriter: Removing unnecessary std::function in favor of template
More cleanup from post-commit discussion on r304516
llvm-svn: 304579
|
| #
b6b42e01 |
| 02-Jun-2017 |
David Blaikie <[email protected]> |
Tidy up a bit of r304516, use SmallVector::assign rather than for loop
This might give a few better opportunities to optimize these to memcpy rather than loops - also a few minor cleanups (StringRef
Tidy up a bit of r304516, use SmallVector::assign rather than for loop
This might give a few better opportunities to optimize these to memcpy rather than loops - also a few minor cleanups (StringRef-izing, templating (to avoid std::function indirection), etc).
The SmallVector::assign(iter, iter) could be improved with the use of SFINAE, but the (iter, iter) ctor and append(iter, iter) need it to and don't have it - so, workaround it for now rather than bothering with the added complexity.
(also, as noted in the added FIXME, these assign ops could potentially be optimized better at least for non-trivially-copyable types)
llvm-svn: 304566
show more ...
|
| #
7a27b132 |
| 02-Jun-2017 |
Teresa Johnson <[email protected]> |
[ThinLTO] Efficiency improvement when writing module path string table
Summary: When writing the combined index, we are walking the entire module path StringMap in the full index, and checking wheth
[ThinLTO] Efficiency improvement when writing module path string table
Summary: When writing the combined index, we are walking the entire module path StringMap in the full index, and checking whether each one should be included in the index being written. For distributed backends, where we write an individual combined index for each file, each with only a few module paths, this is incredibly inefficient. Add a method that takes a callback and hides the details of whether we are writing the full combined index, or just a slice, and in the latter case it walks the set of modules to include instead of the entire index.
For a huge application with around 23K files (i.e. where we were iterating through the 23K-entry modulePath StringMap 23K times), this change improved the thin link time by a whopping 48%.
Reviewers: pcc
Subscribers: Prazek, inglorion, llvm-commits
Differential Revision: https://reviews.llvm.org/D33813
llvm-svn: 304516
show more ...
|
| #
56584bbf |
| 01-Jun-2017 |
Evgeniy Stepanov <[email protected]> |
(NFC) Track global summary liveness in GVFlags.
Replace GVFlags::LiveRoot with GVFlags::Live and use that instead of all the DeadSymbols sets. This is refactoring in order to make liveness informati
(NFC) Track global summary liveness in GVFlags.
Replace GVFlags::LiveRoot with GVFlags::Live and use that instead of all the DeadSymbols sets. This is refactoring in order to make liveness information available in the RegularLTO pipeline.
llvm-svn: 304466
show more ...
|
| #
a6a3fb57 |
| 31-May-2017 |
Teresa Johnson <[email protected]> |
[ThinLTO] Reduce unnecessary map lookups during combined summary write
Summary: Don't assign values to undefined references, simply don't emit those reference edges as they are not useful (we were a
[ThinLTO] Reduce unnecessary map lookups during combined summary write
Summary: Don't assign values to undefined references, simply don't emit those reference edges as they are not useful (we were already not emitting call edges to undefined refs).
Also, streamline the later lookup of value ids when writing the summaries, by combining the check for value id existence with the access of that value id.
Reviewers: pcc
Subscribers: Prazek, llvm-commits, inglorion
Differential Revision: https://reviews.llvm.org/D33634
llvm-svn: 304323
show more ...
|
|
Revision tags: llvmorg-4.0.1-rc2 |
|
| #
2c26a185 |
| 26-May-2017 |
Peter Collingbourne <[email protected]> |
Bitcode: Remove some dead code. Spotted by Teresa.
Differential Revision: https://reviews.llvm.org/D33609
llvm-svn: 304046
|
| #
8bf67fe9 |
| 23-May-2017 |
Reid Kleckner <[email protected]> |
[IR] Switch AttributeList to use an array for O(1) access
Summary: Before this change, AttributeLists stored a pair of index and AttributeSet. This is memory efficient if most arguments do not have
[IR] Switch AttributeList to use an array for O(1) access
Summary: Before this change, AttributeLists stored a pair of index and AttributeSet. This is memory efficient if most arguments do not have attributes. However, it requires doing a search over the pairs to test an argument or function attribute. Profiling shows that this loop was 0.76% of the time in 'opt -O2' of sqlite3.c, because LLVM constantly tests values for nullability.
This was worth about 2.5% of mid-level optimization cycles on the sqlite3 amalgamation. Here are the full perf results: https://reviews.llvm.org/P7995
Here are just the before and after cycle counts: ``` $ perf stat -r 5 ./opt_before -O2 sqlite3.bc -o /dev/null 13,274,181,184 cycles # 3.047 GHz ( +- 0.28% ) $ perf stat -r 5 ./opt_after -O2 sqlite3.bc -o /dev/null 12,906,927,263 cycles # 3.043 GHz ( +- 0.51% ) ```
This patch *does not* change the indices used to query attributes, as requested by reviewers. Tracking whether an index is usable for array indexing is a huge pain that affects many of the internal APIs, so it would be good to come back later and do a cleanup to remove this internal adjustment.
Reviewers: pete, chandlerc
Subscribers: javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D32819
llvm-svn: 303654
show more ...
|
| #
f3d7904d |
| 11-May-2017 |
Javed Absar <[email protected]> |
[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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 ...
|
| #
7c2c4097 |
| 02-May-2017 |
Peter Collingbourne <[email protected]> |
Bitcode: Simplify how we enumerate summaries in the index. NFCI.
Instead of defining a custom iterator class, just use a function with a callback, which is much easier to understand and less error p
Bitcode: Simplify how we enumerate summaries in the index. NFCI.
Instead of defining a custom iterator class, just use a function with a callback, which is much easier to understand and less error prone.
Differential Revision: https://reviews.llvm.org/D32470
llvm-svn: 301942
show more ...
|
| #
fed4f399 |
| 28-Apr-2017 |
Adrian Prantl <[email protected]> |
Remove line and file from DINamespace.
Fixes the issue highlighted in http://lists.llvm.org/pipermail/cfe-dev/2014-June/037500.html.
The DW_AT_decl_file and DW_AT_decl_line attributes on namespaces
Remove line and file from DINamespace.
Fixes the issue highlighted in http://lists.llvm.org/pipermail/cfe-dev/2014-June/037500.html.
The DW_AT_decl_file and DW_AT_decl_line attributes on namespaces can prevent LLVM from uniquing types that are in the same namespace. They also don't carry any meaningful information.
rdar://problem/17484998 Differential Revision: https://reviews.llvm.org/D32648
llvm-svn: 301706
show more ...
|
| #
b19b57ea |
| 28-Apr-2017 |
Matt Arsenault <[email protected]> |
Add speculatable function attribute
This attribute tells the optimizer that the function may be speculated.
Patch by Tom Stellard
llvm-svn: 301680
|
|
Revision tags: llvmorg-4.0.1-rc1 |
|
| #
1d12b885 |
| 26-Apr-2017 |
Adrian Prantl <[email protected]> |
Add support for DW_TAG_thrown_type.
For Swift we would like to be able to encode the error types that a function may throw, so the debugger can display them alongside the function's return value whe
Add support for DW_TAG_thrown_type.
For Swift we would like to be able to encode the error types that a function may throw, so the debugger can display them alongside the function's return value when finish-ing a function.
DWARF defines DW_TAG_thrown_type (intended to be used for C++ throw() declarations) that is a perfect fit for this purpose. This patch wires up support for DW_TAG_thrown_type in LLVM by adding a list of thrown types to DISubprogram.
To offset the cost of the extra pointer, there is a follow-up patch that turns DISubprogram into a variable-length node.
rdar://problem/29481673
Differential Revision: https://reviews.llvm.org/D32559
llvm-svn: 301489
show more ...
|
| #
63b26f0e |
| 24-Apr-2017 |
Reid Kleckner <[email protected]> |
Make getSlotAttributes return an AttributeSet instead of a wrapper list
Remove the temporary, poorly named getSlotSet method which did the same thing. Also remove getSlotNode, which is a hold-over f
Make getSlotAttributes return an AttributeSet instead of a wrapper list
Remove the temporary, poorly named getSlotSet method which did the same thing. Also remove getSlotNode, which is a hold-over from when we were dealing with AttributeSetNode* instead of AttributeSet.
llvm-svn: 301267
show more ...
|