| #
d4bff303 |
| 05-Nov-2015 |
Peter Collingbourne <[email protected]> |
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 ...
|
| #
a2b0ac40 |
| 04-Nov-2015 |
Filipe Cabecinhas <[email protected]> |
Error out when faced with value names containing '\0'
Bug found with afl-fuzz.
llvm-svn: 252048
|
| #
7aae2f23 |
| 03-Nov-2015 |
Filipe Cabecinhas <[email protected]> |
Don't assert if materializing before seeing any function bodies
This assert was reachable from user input. A minimized test case (no FUNCTION_BLOCK_ID record) is attached.
Bug found with afl-fuzz
Don't assert if materializing before seeing any function bodies
This assert was reachable from user input. A minimized test case (no FUNCTION_BLOCK_ID record) is attached.
Bug found with afl-fuzz
llvm-svn: 251910
show more ...
|
| #
f3e167af |
| 03-Nov-2015 |
Filipe Cabecinhas <[email protected]> |
Don't use Twine objects after their lifetimes end.
No test, since it would depend on what the compiler can optimize/reuse. My next commit made this bug visible on Linux Release compiles with some ve
Don't use Twine objects after their lifetimes end.
No test, since it would depend on what the compiler can optimize/reuse. My next commit made this bug visible on Linux Release compiles with some versions of gcc.
llvm-svn: 251909
show more ...
|
| #
c7ed52f2 |
| 03-Nov-2015 |
Teresa Johnson <[email protected]> |
Restore "Support for ThinLTO function importing and symbol linking."
This restores commit r251837, with the new library dependence added to llvm-link/Makefile to address bot failures.
llvm-svn: 251
Restore "Support for ThinLTO function importing and symbol linking."
This restores commit r251837, with the new library dependence added to llvm-link/Makefile to address bot failures.
llvm-svn: 251866
show more ...
|
| #
227a9231 |
| 02-Nov-2015 |
Teresa Johnson <[email protected]> |
Revert "Support for ThinLTO function importing and symbol linking."
This reverts commit r251837, due to a number of bot failures of the form:
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fa
Revert "Support for ThinLTO function importing and symbol linking."
This reverts commit r251837, due to a number of bot failures of the form:
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.obj/tools/llvm-link/Release+Asserts/llvm-link.o:llvm-link.cpp:function loadIndex(llvm::LLVMContext&, llvm::Module const*): error: undefined reference to 'llvm::object::FunctionIndexObjectFile::create(llvm::MemoryBufferRef, llvm::LLVMContext&, llvm::Module const*, bool)' /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.obj/tools/llvm-link/Release+Asserts/llvm-link.o:llvm-link.cpp:function loadIndex(llvm::LLVMContext&, llvm::Module const*): error: undefined reference to 'llvm::object::FunctionIndexObjectFile::takeIndex()'
I'm not sure why these are happening - I added Object to the requred libraries in tools/llvm-link/LLVMBuild.txt and the LLVM_LINK_COMPONENTS in tools/llvm-link/CMakeLists.txt. Confirmed for my build that these symbols come out of libLLVMObject.a. What am I missing?
llvm-svn: 251841
show more ...
|
| #
b1d4a399 |
| 02-Nov-2015 |
Teresa Johnson <[email protected]> |
Support for ThinLTO function importing and symbol linking.
Summary: Support for necessary linkage changes and symbol renaming during ThinLTO function importing.
Also includes llvm-link support for
Support for ThinLTO function importing and symbol linking.
Summary: Support for necessary linkage changes and symbol renaming during ThinLTO function importing.
Also includes llvm-link support for manually importing functions and associated llvm-link based tests.
Note that this does not include support for intelligently importing metadata, which is currently imported duplicate times. That support will be in the follow-on patch, and currently is ignored by the tests.
Reviewers: dexonsmith, joker.eph, davidxl
Subscribers: tobiasvk, tejohnson, llvm-commits
Differential Revision: http://reviews.llvm.org/D13515
llvm-svn: 251837
show more ...
|
| #
f72278f0 |
| 02-Nov-2015 |
Teresa Johnson <[email protected]> |
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
|
| #
14323e02 |
| 30-Oct-2015 |
Filipe Cabecinhas <[email protected]> |
Revert "Don't assert if materializing before seeing any function bodies"
This reverts r251667 since it broke the bots.
llvm-svn: 251671
|
| #
bcfd1f0c |
| 29-Oct-2015 |
Filipe Cabecinhas <[email protected]> |
Don't assert if materializing before seeing any function bodies
This assert was reachable from user input. A minimized test case (no FUNCTION_BLOCK_ID record) is attached.
Bug found with afl-fuzz
Don't assert if materializing before seeing any function bodies
This assert was reachable from user input. A minimized test case (no FUNCTION_BLOCK_ID record) is attached.
Bug found with afl-fuzz
llvm-svn: 251667
show more ...
|
| #
128a9760 |
| 27-Oct-2015 |
Peter Collingbourne <[email protected]> |
Bitcode: Fix more unsigned integer overflow bugs.
llvm-svn: 251464
|
| #
ad6d6e74 |
| 27-Oct-2015 |
Vedant Kumar <[email protected]> |
[IR] Limit bits used for CallingConv::ID, update tests
Use 10 bits to represent calling convention ID's instead of 13, and update the bitcode compatibility tests accordingly. We now error-out in the
[IR] Limit bits used for CallingConv::ID, update tests
Use 10 bits to represent calling convention ID's instead of 13, and update the bitcode compatibility tests accordingly. We now error-out in the bitcode reader when we see bad calling conv ID's.
Thanks to rnk and dexonsmith for feedback!
Differential Revision: http://reviews.llvm.org/D13826
llvm-svn: 251452
show more ...
|
| #
6c2403f3 |
| 26-Oct-2015 |
Oleksiy Vyalov <[email protected]> |
Use Twin instead of std::to_string.
http://reviews.llvm.org/D14095
llvm-svn: 251365
|
| #
5d303285 |
| 26-Oct-2015 |
Mehdi Amini <[email protected]> |
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 <[email protected]> llvm-svn: 251325
show more ...
|
| #
c8a8a5e2 |
| 21-Oct-2015 |
Teresa Johnson <[email protected]> |
Silence Visual C++ warning in function summary parsing code (NFC)
llvm-svn: 250929
|
| #
fb1743a3 |
| 13-Oct-2015 |
Duncan P. N. Exon Smith <[email protected]> |
BitcodeReader: Remove ilist iterator implicit conversions, NFC
Get LLVMBitReader building without relying on `ilist_iterator` implicit conversions.
llvm-svn: 250181
|
| #
1493ad9c |
| 10-Oct-2015 |
Teresa Johnson <[email protected]> |
Fix PR25101 - Handle anonymous functions without VST entries
Summary: The change to use the VST function entries for lazy deserialization did not handle the case of anonymous functions without alias
Fix PR25101 - Handle anonymous functions without VST entries
Summary: The change to use the VST function entries for lazy deserialization did not handle the case of anonymous functions without aliases. In that case we must fall back to scanning the function blocks as there is no VST entry.
Reviewers: dexonsmith, joker.eph, davidxl
Subscribers: tstellarAMD, llvm-commits
Differential Revision: http://reviews.llvm.org/D13596
llvm-svn: 249947
show more ...
|
| #
b70fd871 |
| 06-Oct-2015 |
Filipe Cabecinhas <[email protected]> |
Make sure the CastInst is valid before trying to create it
Bug found with afl-fuzz.
llvm-svn: 249396
|
| #
19f517a7 |
| 04-Oct-2015 |
Teresa Johnson <[email protected]> |
Remove unused private field introduced by r249270.
llvm-svn: 249277
|
| #
403a787e |
| 04-Oct-2015 |
Teresa Johnson <[email protected]> |
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 <[email protected]> |
[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 ...
|
| #
2d0f38c5 |
| 18-Sep-2015 |
Aaron Ballman <[email protected]> |
Silencing a -Wsign-compare warning; NFC.
llvm-svn: 247986
|
| #
6a51dbdb |
| 17-Sep-2015 |
David Blaikie <[email protected]> |
[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 <[email protected]> |
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 <[email protected]> |
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 ...
|