Revision tags: llvmorg-3.7.1-rc1 |
|
#
12545075 |
| 15-Nov-2015 |
Teresa Johnson <tejohnson@google.com> |
Use a different block id for block of metadata kind records
Summary: There are currently two blocks with the METADATA_BLOCK id at module scope. The first has the module-level metadata values (consis
Use a different block id for block of metadata kind records
Summary: There are currently two blocks with the METADATA_BLOCK id at module scope. The first has the module-level metadata values (consisting of some combination of METADATA_* record codes except for METADATA_KIND). The second consists only of METADATA_KIND records. The latter is used only in the METADATA_ATTACHMENT block within function blocks (for metadata attached to instructions).
For ThinLTO we want to delay the parsing of module level metadata until all functions have been imported from that module (there is some bookkeeping used to suture it up when we read it during a post-pass). However, we do need the METADATA_KIND records when parsing the function body during importing, since those kinds are used as described above.
To simplify identification and parsing of just the block containing the metadata kinds, use a different block id (METADATA_KIND_BLOCK_ID). Support older bitcode without the new block id as well.
Reviewers: dexonsmith, joker.eph
Subscribers: davidxl, llvm-commits
Differential Revision: http://reviews.llvm.org/D14654
llvm-svn: 253154
show more ...
|
#
225d65f1 |
| 13-Nov-2015 |
Sanjay Patel <spatel@rotateright.com> |
use range-based for loop; NFCI
llvm-svn: 253048
|
#
b9ca6dcc |
| 10-Nov-2015 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
[OperandBundles] Identify operand bundles with both their names and IDs
No code uses this functionality yet. This change just exposes information / structure that was already present.
llvm-svn: 25
[OperandBundles] Identify operand bundles with both their names and IDs
No code uses this functionality yet. This change just exposes information / structure that was already present.
llvm-svn: 252644
show more ...
|
#
97cb3971 |
| 07-Nov-2015 |
Akira Hatanaka <ahatanaka@apple.com> |
[Bitcode] Add enums for call instruction markers and flags. NFC.
This commit adds enums in LLVMBitCodes.h to improve readability and maintainability. This is a follow-up to r252368 which was discuss
[Bitcode] Add enums for call instruction markers and flags. NFC.
This commit adds enums in LLVMBitCodes.h to improve readability and maintainability. This is a follow-up to r252368 which was discussed here:
http://reviews.llvm.org/D12923
llvm-svn: 252395
show more ...
|
#
54c3ca69 |
| 07-Nov-2015 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
[OperandBundles] Rename accessor, NFC
Rename getOperandBundle to getOperandBundleAt since that's more obvious.
llvm-svn: 252388
|
#
5cfcce12 |
| 06-Nov-2015 |
Akira Hatanaka <ahatanaka@apple.com> |
Add 'notail' marker for call instructions.
This marker prevents optimization passes from adding 'tail' or 'musttail' markers to a call. Is is used to prevent tail call optimization from being perfor
Add 'notail' marker for call instructions.
This marker prevents optimization passes from adding 'tail' or 'musttail' markers to a call. Is is used to prevent tail call optimization from being performed on the call.
rdar://problem/22667622
Differential Revision: http://reviews.llvm.org/D12923
llvm-svn: 252368
show more ...
|
#
e6f87ca8 |
| 06-Nov-2015 |
James Molloy <james.molloy@arm.com> |
Add a new attribute: norecurse
This attribute allows the compiler to assume that the function never recurses into itself, either directly or indirectly (transitively). This can be used among other t
Add a new attribute: norecurse
This attribute allows the compiler to assume that the function never recurses into itself, either directly or indirectly (transitively). This can be used among other things to demote global variables to locals.
llvm-svn: 252282
show more ...
|
#
d4bff303 |
| 05-Nov-2015 |
Peter Collingbourne <peter@pcc.me.uk> |
DI: Reverse direction of subprogram -> function edge.
Previously, subprograms contained a metadata reference to the function they described. Because most clients need to get or set a subprogram for
DI: Reverse direction of subprogram -> function edge.
Previously, subprograms contained a metadata reference to the function they described. Because most clients need to get or set a subprogram for a given function rather than the other way around, this created unneeded inefficiency.
For example, many passes needed to call the function llvm::makeSubprogramMap() to build a mapping from functions to subprograms, and the IR linker needed to fix up function references in a way that caused quadratic complexity in the IR linking phase of LTO.
This change reverses the direction of the edge by storing the subprogram as function-level metadata and removing DISubprogram's function field.
Since this is an IR change, a bitcode upgrade has been provided.
Fixes PR23367. An upgrade script for textual IR for out-of-tree clients is attached to the PR.
Differential Revision: http://reviews.llvm.org/D14265
llvm-svn: 252219
show more ...
|
#
ba19c6ee |
| 05-Nov-2015 |
Mehdi Amini <mehdi.amini@apple.com> |
Fix Abbrev emission in WriteIdentificationBlock
This Abbrev was not emitted and basically unused, just leacking there.
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 252110
|
#
f72278f0 |
| 02-Nov-2015 |
Teresa Johnson <tejohnson@google.com> |
Clang format a few prior patches (NFC)
I had clang formatted my earlier patches using the wrong style. Reformatted with the LLVM style.
llvm-svn: 251812
|
#
5d303285 |
| 26-Oct-2015 |
Mehdi Amini <mehdi.amini@apple.com> |
Add an (optional) identification block in the bitcode
Processing bitcode from a different LLVM version can lead to unexpected behavior. The LLVM project guarantees autoupdating bitcode from a previo
Add an (optional) identification block in the bitcode
Processing bitcode from a different LLVM version can lead to unexpected behavior. The LLVM project guarantees autoupdating bitcode from a previous minor revision for the same major, but can't make any promise when reading bitcode generated from a either a non-released LLVM, a vendor toolchain, or a "future" LLVM release. This patch aims at being more user-friendly and allows a bitcode produce to emit an optional block at the beginning of the bitcode that will contains an opaque string intended to describe the bitcode producer information. The bitcode reader will dump this information alongside any error it reports.
The optional block also includes an "epoch" number, monotonically increasing when incompatible changes are made to the bitcode. The reader will reject bitcode whose epoch is different from the one expected.
Differential Revision: http://reviews.llvm.org/D13666
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 251325
show more ...
|
#
3da931f8 |
| 19-Oct-2015 |
Teresa Johnson <tejohnson@google.com> |
Pass FunctionInfoIndex by reference to WriteFunctionSummaryToFile (NFC)
Implemented suggestion by dblakie in review for r250704.
llvm-svn: 250723
|
#
584af871 |
| 13-Oct-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
BitcodeWriter: Stop using implicit ilist iterator conversion, NFC
Now LLVMBitWriter compiles without implicit ilist iterator conversions.
In these cases, the cleanest thing was to switch to range-b
BitcodeWriter: Stop using implicit ilist iterator conversion, NFC
Now LLVMBitWriter compiles without implicit ilist iterator conversions.
In these cases, the cleanest thing was to switch to range-based for loops. Since there wasn't much noise I converted sub-loops and parent loops as a drive-by.
llvm-svn: 250144
show more ...
|
#
ca6b64ff |
| 08-Oct-2015 |
Teresa Johnson <tejohnson@google.com> |
Fix combined function index abbrev (NFC)
Removed an unused abbrev op in the VST_CODE_COMBINED_FNENTRY abbrev.
I noticed while writing/testing an array string dumper for llvm-bcanalyze that the comb
Fix combined function index abbrev (NFC)
Removed an unused abbrev op in the VST_CODE_COMBINED_FNENTRY abbrev.
I noticed while writing/testing an array string dumper for llvm-bcanalyze that the combined function's VST entry abbrevs contained an old field that I am not using. Everything was working fine since the bitcode writer and reader were in sync on how the record fields were actually being set up and interpreted.
llvm-svn: 249691
show more ...
|
#
403a787e |
| 04-Oct-2015 |
Teresa Johnson <tejohnson@google.com> |
Support for function summary index bitcode sections and files.
Summary: The bitcode format is described in this document: https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view For more
Support for function summary index bitcode sections and files.
Summary: The bitcode format is described in this document: https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view For more info on ThinLTO see: https://sites.google.com/site/llvmthinlto
The first customer is ThinLTO, however the data structures are designed and named more generally based on prior feedback. There are a few comments regarding how certain interfaces are used by ThinLTO, and the options added here to gold currently have ThinLTO-specific names as the behavior they provoke is currently ThinLTO-specific.
This patch includes support for generating per-module function indexes, the combined index file via the gold plugin, and several tests (more are included with the associated clang patch D11908).
Reviewers: dexonsmith, davidxl, joker.eph
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13107
llvm-svn: 249270
show more ...
|
#
b513a9fa |
| 24-Sep-2015 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
[Bitcode][Asm] Teach LLVM to read and write operand bundles.
Summary: This also adds the first set of tests for operand bundles.
The optimizer has not been audited to ensure that it does the right
[Bitcode][Asm] Teach LLVM to read and write operand bundles.
Summary: This also adds the first set of tests for operand bundles.
The optimizer has not been audited to ensure that it does the right thing with operand bundles.
Depends on D12456.
Reviewers: reames, chandlerc, majnemer, dexonsmith, kmod, JosephTremoulet, rnk, bogner
Subscribers: maksfb, llvm-commits
Differential Revision: http://reviews.llvm.org/D12457
llvm-svn: 248551
show more ...
|
#
6a51dbdb |
| 17-Sep-2015 |
David Blaikie <dblaikie@gmail.com> |
[opaque pointer types] Add an explicit pointee type to alias records in the IR
Since aliases actually use and verify their explicit type already, no further invalid testing is required here. The inv
[opaque pointer types] Add an explicit pointee type to alias records in the IR
Since aliases actually use and verify their explicit type already, no further invalid testing is required here. The invalid.test:ALIAS-TYPE-MISMATCH case catches errors due to emitting a non-pointee type in the new format or a non-pointer type in the old format.
llvm-svn: 247952
show more ...
|
#
ff642b9b |
| 17-Sep-2015 |
Teresa Johnson <tejohnson@google.com> |
Restore "Function bitcode index in Value Symbol Table and lazy reading support"
This reverts commit r247898 (which reverted r247894).
Patch fixed to address two issues exposed by buildbots: - unuse
Restore "Function bitcode index in Value Symbol Table and lazy reading support"
This reverts commit r247898 (which reverted r247894).
Patch fixed to address two issues exposed by buildbots: - unused variable warning in NDEBUG mode - std::initializer_list lifetime issue causing test failures
Original Summary: Support for including the function bitcode indices in the Value Symbol Table. This requires writing the VST after the function blocks, which in turn requires a new VST forward declaration record encoding the offset of the full VST (which is backpatched to contain the offset after the VST is written).
This patch also enables the lazy function reader to use the new function indices out of the VST. This support will be used by ThinLTO as well, which will be in a follow on patch. Backwards compatibility with older bitcode files is maintained.
A new test is also included.
The bitcode format (used for the lazy reader as well as the upcoming ThinLTO patches) came out of discussions with Duncan and others and is described here: https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view
Reviewers: dexonsmith, davidxl, joker.eph
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12536
llvm-svn: 247927
show more ...
|
#
2e98d57a |
| 17-Sep-2015 |
Teresa Johnson <tejohnson@google.com> |
Revert "Function bitcode index in Value Symbol Table and lazy reading support"
Temporarily revert to fix some buildbot issues. One is a minor issue with a variable unused in NDEBUG mode. More concer
Revert "Function bitcode index in Value Symbol Table and lazy reading support"
Temporarily revert to fix some buildbot issues. One is a minor issue with a variable unused in NDEBUG mode. More concerning are some test failures on win7 that I need to dig into.
This reverts commit 4e66a74543459832cfd571db42b4543580ae1d1d.
llvm-svn: 247898
show more ...
|
#
b77b1f8a |
| 17-Sep-2015 |
Teresa Johnson <tejohnson@google.com> |
Function bitcode index in Value Symbol Table and lazy reading support
Summary: Support for including the function bitcode indices in the Value Symbol Table. This requires writing the VST after the f
Function bitcode index in Value Symbol Table and lazy reading support
Summary: Support for including the function bitcode indices in the Value Symbol Table. This requires writing the VST after the function blocks, which in turn requires a new VST forward declaration record encoding the offset of the full VST (which is backpatched to contain the offset after the VST is written).
This patch also enables the lazy function reader to use the new function indices out of the VST. This support will be used by ThinLTO as well, which will be in a follow on patch. Backwards compatibility with older bitcode files is maintained.
A new test is also included.
The bitcode format (used for the lazy reader as well as the upcoming ThinLTO patches) came out of discussions with Duncan and others and is described here: https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view
Reviewers: dexonsmith, davidxl, joker.eph
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12536
llvm-svn: 247894
show more ...
|
#
c01e4cbc |
| 17-Sep-2015 |
Teresa Johnson <tejohnson@google.com> |
Refactor string encoding checks in BitcodeWriter (NFC)
llvm-svn: 247891
|
#
9ce71f76 |
| 03-Sep-2015 |
Joseph Tremoulet <jotrem@microsoft.com> |
[WinEH] Add cleanupendpad instruction
Summary: Add a `cleanupendpad` instruction, used to mark exceptional exits out of cleanups (for languages/targets that can abort a cleanup with another exceptio
[WinEH] Add cleanupendpad instruction
Summary: Add a `cleanupendpad` instruction, used to mark exceptional exits out of cleanups (for languages/targets that can abort a cleanup with another exception). The `cleanupendpad` instruction is similar to the `catchendpad` instruction in that it is an EH pad which is the target of unwind edges in the handler and which itself has an unwind edge to the next EH action. The `cleanupendpad` instruction, similar to `cleanupret` has a `cleanuppad` argument indicating which cleanup it exits. The unwind successors of a `cleanuppad`'s `cleanupendpad`s must agree with each other and with its `cleanupret`s.
Update WinEHPrepare (and docs/tests) to accomodate `cleanupendpad`.
Reviewers: rnk, andrew.w.kaylor, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12433
llvm-svn: 246751
show more ...
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4 |
|
#
8220bcc5 |
| 23-Aug-2015 |
Joseph Tremoulet <jotrem@microsoft.com> |
[WinEH] Require token linkage in EH pad/ret signatures
Summary: WinEHPrepare is going to require that cleanuppad and catchpad produce values of token type which are consumed by any cleanupret or cat
[WinEH] Require token linkage in EH pad/ret signatures
Summary: WinEHPrepare is going to require that cleanuppad and catchpad produce values of token type which are consumed by any cleanupret or catchret exiting the pad. This change updates the signatures of those operators to require/enforce that the type produced by the pads is token type and that the rets have an appropriate argument.
The catchpad argument of a `CatchReturnInst` must be a `CatchPadInst` (and similarly for `CleanupReturnInst`/`CleanupPadInst`). To accommodate that restriction, this change adds a notion of an operator constraint to both LLParser and BitcodeReader, allowing appropriate sentinels to be constructed for forward references and appropriate error messages to be emitted for illegal inputs.
Also add a verifier rule (noted in LangRef) that a catchpad with a catchpad predecessor must have no other predecessors; this ensures that WinEHPrepare will see the expected linear relationship between sibling catches on the same try.
Lastly, remove some superfluous/vestigial casts from instruction operand setters operating on BasicBlocks.
Reviewers: rnk, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12108
llvm-svn: 245797
show more ...
|
Revision tags: llvmorg-3.7.0-rc3 |
|
#
0bc0eef7 |
| 15-Aug-2015 |
David Majnemer <david.majnemer@gmail.com> |
[IR] Give catchret an optional 'return value' operand
Some personality routines require funclet exit points to be clearly marked, this is done by producing a token at the funclet pad and consuming i
[IR] Give catchret an optional 'return value' operand
Some personality routines require funclet exit points to be clearly marked, this is done by producing a token at the funclet pad and consuming it at the corresponding ret instruction. CleanupReturnInst already had a spot for this operand but CatchReturnInst did not. Other personality routines don't need to use this which is why it has been made optional.
llvm-svn: 245149
show more ...
|
#
b611e3f5 |
| 14-Aug-2015 |
David Majnemer <david.majnemer@gmail.com> |
[IR] Add token types
This introduces the basic functionality to support "token types". The motivation stems from the need to perform operations on a Value whose provenance cannot be obscured.
There
[IR] Add token types
This introduces the basic functionality to support "token types". The motivation stems from the need to perform operations on a Value whose provenance cannot be obscured.
There are several applications for such a type but my immediate motivation stems from WinEH. Our personality routine enforces a single-entry - single-exit regime for cleanups. After several rounds of optimizations, we may be left with a terminator whose "cleanup-entry block" is not entirely clear because control flow has merged two cleanups together. We have experimented with using labels as operands inside of instructions which are not terminators to indicate where we came from but found that LLVM does not expect such exotic uses of BasicBlocks.
Instead, we can use this new type to clearly associate the "entry point" and "exit point" of our cleanup. This is done by having the cleanuppad yield a Token and consuming it at the cleanupret. The token type makes it impossible to obscure or otherwise hide the Value, making it trivial to track the relationship between the two points.
What is the burden to the optimizer? Well, it turns out we have already paid down this cost by accepting that there are certain calls that we are not permitted to duplicate, optimizations have to watch out for such instructions anyway. There are additional places in the optimizer that we will probably have to update but early examination has given me the impression that this will not be heroic.
Differential Revision: http://reviews.llvm.org/D11861
llvm-svn: 245029
show more ...
|