#
ad17679a |
| 11-Nov-2016 |
Teresa Johnson <tejohnson@google.com> |
Split Bitcode/ReaderWriter.h into separate reader and writer headers
Summary: Split ReaderWriter.h which contains the APIs into both the BitReader and BitWriter libraries into BitcodeReader.h and Bi
Split Bitcode/ReaderWriter.h into separate reader and writer headers
Summary: Split ReaderWriter.h which contains the APIs into both the BitReader and BitWriter libraries into BitcodeReader.h and BitcodeWriter.h.
This is to address Chandler's concern about sharing the same API header between multiple libraries (BitReader and BitWriter). That concern is why we create a single bitcode library in our downstream build of clang, which led to r286297 being reverted as it added a dependency that created a cycle only when there is a single bitcode library (not two as in upstream).
Reviewers: mehdi_amini
Subscribers: dlj, mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D26502
llvm-svn: 286566
show more ...
|
#
c1edf566 |
| 11-Nov-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Prevent at compile time converting from Error::success() to Expected<T>
This would trigger an assertion at runtime otherwise.
Differential Revision: https://reviews.llvm.org/D26482
llvm-svn: 286562
|
#
d93620bf |
| 10-Nov-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
IR: Introduce inrange attribute on getelementptr indices.
If the inrange keyword is present before any index, loading from or storing to any pointer derived from the getelementptr has undefined beha
IR: Introduce inrange attribute on getelementptr indices.
If the inrange keyword is present before any index, loading from or storing to any pointer derived from the getelementptr has undefined behavior if the load or store would access memory outside of the bounds of the element selected by the index marked as inrange.
This can be used, e.g. for alias analysis or to split globals at element boundaries where beneficial.
As previously proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-July/102472.html
Differential Revision: https://reviews.llvm.org/D22793
llvm-svn: 286514
show more ...
|
#
67d1a412 |
| 09-Nov-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Make BitcodeReader::parseIdentificationBlock() robust to EOF
This method is particular: it iterates at the top-level and does not have an enclosing block.
llvm-svn: 286394
|
#
7f00d0a1 |
| 09-Nov-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Change the materializer interface to return llvm::Error.
Differential Revision: https://reviews.llvm.org/D26439
llvm-svn: 286382
|
#
7576cb0f |
| 09-Nov-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Remove the remnants of the BitcodeDiagnosticInfo class.
The BitcodeReader no longer produces BitcodeDiagnosticInfo diagnostics. The only remaining reference was in the gold plugin; the code
Bitcode: Remove the remnants of the BitcodeDiagnosticInfo class.
The BitcodeReader no longer produces BitcodeDiagnosticInfo diagnostics. The only remaining reference was in the gold plugin; the code there has been dead since we stopped producing InvalidBitcodeSignature error codes in r225562. While at it remove the InvalidBitcodeSignature error code.
llvm-svn: 286326
show more ...
|
#
58f7f075 |
| 09-Nov-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Change the BitcodeReader to use llvm::Error internally.
Differential Revision: https://reviews.llvm.org/D26430
llvm-svn: 286323
|
#
e2dcf7c3 |
| 08-Nov-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
IR, Bitcode: Change bitcode reader to no longer own its memory buffer.
Unique ownership is just one possible ownership pattern for the memory buffer underlying the bitcode reader. In practice, as th
IR, Bitcode: Change bitcode reader to no longer own its memory buffer.
Unique ownership is just one possible ownership pattern for the memory buffer underlying the bitcode reader. In practice, as this patch shows, ownership can often reside at a higher level. With the upcoming change to allow multiple modules in a single bitcode file, it will no longer be appropriate for modules to generally have unique ownership of their memory buffer.
The C API exposes the ownership relation via the LLVMGetBitcodeModuleInContext and LLVMGetBitcodeModuleInContext2 functions, so we still need some way for the module to own the memory buffer. This patch does so by adding an owned memory buffer field to Module, and using it in a few other places where it is convenient.
Differential Revision: https://reviews.llvm.org/D26384
llvm-svn: 286214
show more ...
|
#
77c89b69 |
| 08-Nov-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Decouple block info block state from reader.
As proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106630.html
Move block info block state to a new class, Bitstrea
Bitcode: Decouple block info block state from reader.
As proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106630.html
Move block info block state to a new class, BitstreamBlockInfo. Clients may set the block info for a particular cursor with the BitstreamCursor::setBlockInfo() method.
At this point BitstreamReader is not much more than a container for an ArrayRef<uint8_t>, so remove it and replace all uses with direct uses of memory buffers.
Differential Revision: https://reviews.llvm.org/D26259
llvm-svn: 286207
show more ...
|
#
939c7d91 |
| 08-Nov-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Split out block info reading into a separate function.
We're about to make this more complicated.
llvm-svn: 286206
|
#
74084c44 |
| 06-Nov-2016 |
Amaury Sechet <deadalnix@gmail.com> |
Kill deprecated attribute API
Summary: This kill various depreacated API related to attribute : - The deprecated C API attribute based on LLVMAttribute enum. - The Raw attribute set format (planne
Kill deprecated attribute API
Summary: This kill various depreacated API related to attribute : - The deprecated C API attribute based on LLVMAttribute enum. - The Raw attribute set format (planned to be removed in 4.0).
Reviewers: bkramer, echristo, mehdi_amini, void
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D23039
llvm-svn: 286062
show more ...
|
#
dbfda636 |
| 03-Nov-2016 |
Adrian Prantl <aprantl@apple.com> |
Add DWARF debug info support for C++11 inline namespaces. This implements the DWARF 5 DW_AT_export_symbols feature: http://dwarfstd.org/ShowIssue.php?issue=141212.1
<rdar://problem/18616046>
llvm-s
Add DWARF debug info support for C++11 inline namespaces. This implements the DWARF 5 DW_AT_export_symbols feature: http://dwarfstd.org/ShowIssue.php?issue=141212.1
<rdar://problem/18616046>
llvm-svn: 285959
show more ...
|
#
ff2c2ec6 |
| 02-Nov-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Check file size before reading bitcode header.
Should unbreak ocaml binding tests.
Also added an llvm-dis test that checks for the same thing.
llvm-svn: 285777
|
#
028eb5a3 |
| 02-Nov-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Change reader interface to take memory buffers.
As proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106595.html
This change also fixes an API oddity where Bitstr
Bitcode: Change reader interface to take memory buffers.
As proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106595.html
This change also fixes an API oddity where BitstreamCursor::Read() would return zero for the first read past the end of the bitstream, but would report_fatal_error for subsequent reads. Now we always report_fatal_error for all reads past the end. Updated clients to check for the end of the bitstream before reading from it.
I also needed to add padding to the invalid bitcode tests in test/Bitcode/. This is because the streaming interface was not checking that the file size is a multiple of 4.
Differential Revision: https://reviews.llvm.org/D26219
llvm-svn: 285773
show more ...
|
#
58fbc916 |
| 28-Oct-2016 |
Teresa Johnson <tejohnson@google.com> |
[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 ...
|
#
a37660c6 |
| 26-Oct-2016 |
Victor Leschuk <vleschuk@accesssoftek.com> |
DebugInfo: fix incorrect alignment type (NFC)
Change type of some missed DebugInfo-related alignment variables, that are still uint64_t, to uint32_t.
Original change introduced in r284482.
llvm-sv
DebugInfo: fix incorrect alignment type (NFC)
Change type of some missed DebugInfo-related alignment variables, that are still uint64_t, to uint32_t.
Original change introduced in r284482.
llvm-svn: 285242
show more ...
|
#
2ede126b |
| 20-Oct-2016 |
Victor Leschuk <vleschuk@accesssoftek.com> |
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 ...
|
#
990504e6 |
| 19-Oct-2016 |
Reid Kleckner <rnk@google.com> |
Remove LLVM_NOEXCEPT and replace it with noexcept
Now that we have dropped MSVC 2013, all supported compilers support noexcept and we can drop this portability macro.
llvm-svn: 284672
|
#
197aa319 |
| 18-Oct-2016 |
Victor Leschuk <vleschuk@accesssoftek.com> |
DebugInfo: change alignment type from uint64_t to uint32_t to save space. In futher patches we shall have alignment field added to DIVariable family and switching from uint64_t to uint32_t will save
DebugInfo: change alignment type from uint64_t to uint32_t to save space. In futher patches we shall have alignment field added to DIVariable family and switching from uint64_t to uint32_t will save 4 bytes per variable.
Differential Revision: https://reviews.llvm.org/D25620
llvm-svn: 284482
show more ...
|
#
00fa1409 |
| 08-Oct-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
ThinLTO: handles modules with empty summaries
We need to add an entry in the combined-index for modules that have a hash but otherwise empty summary, this is needed so that we can get the hash for t
ThinLTO: handles modules with empty summaries
We need to add an entry in the combined-index for modules that have a hash but otherwise empty summary, this is needed so that we can get the hash for the module.
Also, if no entry is present in the combined index for a module, we need to skip it when trying to compute a cache entry.
Differential Revision: https://reviews.llvm.org/D25300
llvm-svn: 283654
show more ...
|
#
d9830eb7 |
| 26-Sep-2016 |
Piotr Padlewski <piotr.padlewski@gmail.com> |
[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 ...
|
#
6e860752 |
| 23-Sep-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
BitcodeReader: Deduplicate code. NFC.
Differential Revision: https://reviews.llvm.org/D24852
llvm-svn: 282272
|
#
620c140a |
| 20-Sep-2016 |
Teresa Johnson <tejohnson@google.com> |
[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 ...
|
#
e4709271 |
| 14-Sep-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Fix auto-upgrade of TBAA tags in Bitcode Reader
If TBAA is on an intrinsic and it gets upgraded, it'll delete the call instruction that we collected in a vector. Even if we were to use WeakVH, it'll
Fix auto-upgrade of TBAA tags in Bitcode Reader
If TBAA is on an intrinsic and it gets upgraded, it'll delete the call instruction that we collected in a vector. Even if we were to use WeakVH, it'll drop the TBAA and we'll hit the assert on the upgrade path.
r263673 gave a shot to make sure the TBAA upgrade happens before intrinsics upgrade, but failed to account for all cases.
Instead of collecting instructions in a vector, this patch makes it just upgrade the TBAA on the fly, because metadata are always already loaded at this point.
Differential Revision: https://reviews.llvm.org/D24533
llvm-svn: 281549
show more ...
|
#
d4135bbc |
| 13-Sep-2016 |
Peter Collingbourne <peter@pcc.me.uk> |
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 ...
|