summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove dummy cast. NFC.Rafael Espindola2017-05-261-1/+1
| | | | llvm-svn: 303948
* [test] make_shared<T()>(...) is, uh, libc++-specificCasey Carter2017-05-261-5/+13
| | | | llvm-svn: 303947
* [llvm-pdbdump] Don't crash when displaying padding.Zachary Turner2017-05-261-1/+2
| | | | | | | | | | | | | | | | | | We have a lot of complicated logic to determine where padding is in a record, and the debug info doesn't always provide enough information to figure it out with laser precision. In this case we were putting the padding in the wrong place causing an out of bounds access on a BitVector. Right now we decide that any trailing padding of a child type will be truncated during record layout, but this is only true insofar as the class still is sized properly to end on an alignment boundary, which the algorithm doesn't yet know about. For now, just don't crash, even though we display padding twice in this case. llvm-svn: 303946
* Factor resolving of header directives -> files out of module map parser.Richard Smith2017-05-262-97/+121
| | | | llvm-svn: 303945
* [Examples] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko2017-05-267-44/+43
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 303944
* Return a lit.Test.Result object from TestRunner's executeShTest()Dimitry Andric2017-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For various clang analyzer tests, which were unsupported, I got lit exceptions, similar to the following: Exception during script execution: Traceback (most recent call last): File "utils/lit/lit/run.py", line 190, in execute_test result = test.config.test_format.execute(test, lit_config) File "tools/clang/test/Analysis/analyzer_test.py", line 11, in execute if result.code == lit.Test.FAIL: AttributeError: 'tuple' object has no attribute 'code' This is because executeShTest() in utils/lit/lit/TestRunner.py is supposed to return a lit.Test.Result object, but in case of unsupported tests, it returns a plain tuple. Fix this by returning a properly initialized lit.Test.Result object instead. Reviewers: rnk, rafael, modocache Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33579 llvm-svn: 303943
* Remove unused member.Zachary Turner2017-05-251-2/+0
| | | | llvm-svn: 303942
* [compiler-rt] Replace allow_user_segv_handler=0 with kHandleSignalExclusiveVitaly Buka2017-05-2512-43/+65
| | | | | | | | | | | | | | Summary: allow_user_segv_handler had confusing name did not allow to control behavior for signals separately. Reviewers: eugenis, alekseyshl, kcc Subscribers: llvm-commits, dberris, kubamracek Differential Revision: https://reviews.llvm.org/D33371 llvm-svn: 303941
* [PPC] Add text for assert.Tim Shen2017-05-251-1/+1
| | | | llvm-svn: 303940
* LTO: Do summary-based prevailing symbol resolution at --lto-O0.Peter Collingbourne2017-05-252-13/+23
| | | | | | | | | Prevailing symbol resolution is necessary for correctness. Without this we can end up dropping a referenced linkonce symbol from the link. Differential Revision: https://reviews.llvm.org/D33570 llvm-svn: 303939
* LivePhysRegs: Fix addLiveOutsNoPristines() for return blocks past PEIMatthias Braun2017-05-251-27/+41
| | | | | | | | | | | | | - addLiveOutsNoPristines() needs to add callee saved registers that are actually saved and restored somewhere to the set (they are not pristine). - Cleanup/rewrite the code for addLiveOuts()/addLiveOutsNoPristines(). This fixes the problem from D32156. Differential Revision: https://reviews.llvm.org/D32464 llvm-svn: 303938
* LivePhysRegs: Skip reserved regs in computeLiveIns; NFCIMatthias Braun2017-05-255-6/+12
| | | | | | | We do not track liveness of reserved registers so adding them to the liveins list in computeLiveIns() was completely unnecessary. llvm-svn: 303937
* Re-add <experimental/coroutine> to the module map.Eric Fiselier2017-05-252-9/+7
| | | | | | | | | | | | | The original issues were caused because <experimental/coroutine> didn't correctly #ifdef out enough of the header, which caused incomplete types to be used. This patch fixes the `#if defined(__cpp_coroutines)` guard and re-adds the headers to the module map. It also uglifies some incorrectly non-reserved names. llvm-svn: 303936
* [CV Type Merging] Find nested type indices faster.Zachary Turner2017-05-258-355/+954
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merging two type streams is one of the most time consuming parts of generating a PDB, and as such it needs to be as fast as possible. The visitor abstractions used for interoperating nicely with many different types of inputs and outputs have been used widely and help greatly for testability and implementing tools, but the abstractions build up and get in the way of performance. This patch removes all of the visitation stuff from the type stream merger, essentially re-inventing the leaf / member switch and loop, but at a very low level. This allows us many other optimizations, such as not actually deserializing *any* records (even member records which don't describe their own length), as the operation of "figure out how long this record is" is somewhat faster than "figure out how long this record *and* get all its fields out". Furthermore, whereas before we had to deserialize, re-write type indices, then re-serialize, now we don't have to do any of those 3 steps. We just find out where the type indices are and pull them directly out of the byte stream and re-write them. This is worth a 50-60% performance increase. On top of all other optimizations that have been applied this week, I now get the following numbers when linking lld.exe and lld.pdb MSVC: 25.67s Before This Patch: 18.59s After This Patch: 8.92s So this is a huge performance win. Differential Revision: https://reviews.llvm.org/D33564 llvm-svn: 303935
* "*" => "+" to avoid matching on empty string.Richard Trieu2017-05-251-1/+1
| | | | llvm-svn: 303934
* DebugInfo: Simplify scopes+subprogram handling since the subprogram<>cu link ↵David Blaikie2017-05-251-18/+8
| | | | | | | | | | | | inversion Previously this code was defensive to the situation in which the debug info scopes would lead to a different subprogram from the subprogram in the CU's subprogram list (this could've happened with linkonce functions, etc as per the comment being removed). Since the CU<>SP link reversal this is no longer possible. llvm-svn: 303933
* Make test/Driver/baremetal.cpp work when output directory isn't named 'bin'.Richard Trieu2017-05-251-1/+1
| | | | llvm-svn: 303932
* [PPC] Fix atomics lowering in DAG lowering.Tim Shen2017-05-252-1/+26
| | | | | | | | | | | I forgot to forward the chain, causing some missing instruction dependencies. The test crashes the compiler without this patch. Inspired by the test case, D33519 also tries to remove the extra sync. Differential Revision: https://reviews.llvm.org/D33573 llvm-svn: 303931
* Switch from using a DiagnosticTrap and a note for "while defining a specialRichard Smith2017-05-259-168/+170
| | | | | | | | | | | | | | | | | | | | | | | member function" context notes to registering an entry on the context stack. Also reorder the steps within defining special members to be consistent. This has a few benefits: if multiple diagnostics are produced while checking such a member, the note is now attached to the first such diagnostic rather than the last, this prepares us for persisting these diagnostics between the point at which we require the implicit instantiation of a template and the point at which that instantiation is actually performed, and this fixes some cases where we would fail to produce a full note stack leading back to user code in the case of such a diagnostic. The reordering exposed a case where we could recursively attempt to define a defaulted destructor while we're already defining one (and other such cases also appear to be possible, with or without this change), so this change also reuses the "willHaveBody" flag on function declarations to track that we're in the middle of synthesizing a body for the function and bails out if we try to define a function that we're already defining. llvm-svn: 303930
* Correct typo: LIBCXXABI_BUILTINS_LIBRARY -> LIBCXX_BUILTINS_LIBRARYEric Fiselier2017-05-251-1/+1
| | | | llvm-svn: 303929
* libcxx: fix bootstrapping for mingw-w64Martell Malone2017-05-253-7/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D33388 llvm-svn: 303928
* Fix test to handle running on platforms which don't enable pubnames at allDavid Blaikie2017-05-251-6/+4
| | | | | | | Check that there are no entries in the pub sections, but that they may either be not present or present-but-empty. llvm-svn: 303927
* When uncompressing sections, remove SHF_COMPRESSED bits. NFC.Rui Ueyama2017-05-253-7/+4
| | | | | | | In this way, the content and the flag is always consistent, which I think better than removing the bit when input sections reaches the Writer. llvm-svn: 303926
* Revert "Simplify a variable type by using StringRef instead of ↵Rafael Espindola2017-05-254-14/+20
| | | | | | | | | | | CachedHashStringRef." This reverts commit r303787. It caused a slowdown in fast links. That is, links with no debug info or optimizations. llvm-svn: 303925
* [InstCombine] Add an InstCombine specific wrapper around ↵Craig Topper2017-05-254-14/+14
| | | | | | | | isKnownToBeAPowerOfTwo to shorten code. NFC We have wrappers for several other ValueTracking methods that take care of passing all of the analysis and assumption cache parameters. This extends it to isKnownToBeAPowerOfTwo. llvm-svn: 303924
* [GVN] Add phi-translate support in scalarpre.Wei Mi2017-05-255-26/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | Right now scalarpre doesn't have phi-translate support, so it will miss some simple pre opportunities. Like the following testcase, current scalarpre cannot recognize the last "a * b" is fully redundent because a and b used by the last "a * b" expr are both defined by phis. long a[100], b[100], g1, g2, g3; __attribute__((pure)) long goo(); void foo(long a, long b, long c, long d) { g1 = a * b; if (__builtin_expect(g2 > 3, 0)) { a = c; b = d; g2 = a * b; } g3 = a * b; // fully redundant. } The patch adds phi-translate support in scalarpre. This is only a temporary solution before the newpre based on newgvn is available. Differential Revision: https://reviews.llvm.org/D32252 llvm-svn: 303923
* Add constrained intrinsics for some libm-equivalent operationsAndrew Kaylor2017-05-2516-72/+1134
| | | | | | Differential revision: https://reviews.llvm.org/D32319 llvm-svn: 303922
* CodeGen: Rename DEBUG_TYPE to match passnamesMatthias Braun2017-05-2574-162/+146
| | | | | | | | Rename the DEBUG_TYPE to match the names of corresponding passes where it makes sense. Also establish the pattern of simply referencing DEBUG_TYPE instead of repeating the passname where possible. llvm-svn: 303921
* [lld] Fix a bug where we continually re-follow type servers.Zachary Turner2017-05-253-13/+14
| | | | | | | | | | | | | | | | | | | Originally this was intended to be set up so that when linking a PDB which refers to a type server, it would only visit the PDB once, and on subsequent visitations it would just skip it since all the records had already been added. Due to some C++ scoping issues, this was not occurring and it was revisiting the type server every time, which caused every record to end up being thrown away on all subsequent visitations. This doesn't affect the performance of linking clang-cl generated object files because we don't use type servers, but when linking object files and libraries generated with /Zi via MSVC, this means only 1 object file has to be linked instead of N object files, so the speedup is quite large. llvm-svn: 303920
* [CodeView Type Merging] Don't keep re-allocating temp serializer.Zachary Turner2017-05-255-21/+31
| | | | | | | | | | | | | | | | Previously, every time we wanted to serialize a field list record, we would create a new copy of FieldListRecordBuilder, which would in turn create a temporary instance of TypeSerializer, which itself had a std::vector<> that was about 128K in size. So this 128K allocation was happening every time. We can re-use the same instance over and over, we just have to clear its internal hash table and seen records list between each run. This saves us from the constant re-allocations. This is worth an ~18.5% speed increase (3.75s -> 3.05s) in my tests. Differential Revision: https://reviews.llvm.org/D33506 llvm-svn: 303919
* Make BinaryStreamReader::readCString a bit faster.Zachary Turner2017-05-251-13/+14
| | | | | | | | | | | | | | | | | | | | | Previously it would do a character by character search for a null terminator, to account for the fact that an arbitrary stream need not store its data contiguously so you couldn't just do a memchr. However, the stream API has a function which will return the longest contiguous chunk without doing a copy, and by using this function we can do a memchr on the individual chunks. For certain types of streams like data from object files etc, this is guaranteed to find the null terminator with only a single memchr, but even with discontiguous streams such as MappedBlockStream, it's rare that any given string will cross a block boundary, so even those will almost always be satisfied with a single memchr. This optimization is worth a 10-12% reduction in link time (4.2 seconds -> 3.75 seconds) Differential Revision: https://reviews.llvm.org/D33503 llvm-svn: 303918
* [pdb] pad source file name buffer at the end instead of the beginningBob Haarman2017-05-255-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | Summary: DbiStreamBuilder calculated the offset of the source file names inside the file info substream as the size of the file info substream minus the size of the file names. Since the file info substream is padded to a multiple of 4 bytes, this caused the first file name to be aligned on a 4-byte boundary. By contrast, DbiModuleList would read the file names immediately after the file name offset table, without skipping to the next 4-byte boundary. This change makes it so that the file names are written to the location where DbiModuleList expects them, and puts any necessary padding for the file info substream after the file names instead of before it. Reviewers: amccarth, rnk, zturner Reviewed By: amccarth, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33475 llvm-svn: 303917
* Fix a bug in MappedBlockStream.Zachary Turner2017-05-253-52/+47
| | | | | | | | | | It was using the number of blocks of the entire PDB file as the number of blocks of each stream that was created. This was only an issue in the readLongestContiguousChunk function, which was never called prior. This bug surfaced when I updated an algorithm to use this function and the algorithm broke. llvm-svn: 303916
* [WebAssembly] MC: Include unnamed data when writing wasm filesSam Clegg2017-05-252-18/+69
| | | | | | | | | | | | Also, include global entries for all data symbols, not just external ones, since these are referenced by the relocation records. Add a test case that includes unnamed data. Differential Revision: https://reviews.llvm.org/D33079 llvm-svn: 303915
* [CodeView Type Merging] Avoid record deserialization when possible.Zachary Turner2017-05-2510-148/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A profile shows the majority of time doing type merging is spent deserializing records from sequences of bytes into friendly C++ structures that we can easily access members of in order to find the type indices to re-write. Records are prefixed with their length, however, and most records have type indices that appear at fixed offsets in the record. For these records, we can save some cycles by just looking at the right place in the byte sequence and re-writing the value, then skipping the record in the type stream. This saves us from the costly deserialization of examining every field, including potentially null terminated strings which are the slowest, even though it was unnecessary to begin with. In addition, we apply another optimization. Previously, after deserializing a record and re-writing its type indices, we would unconditionally re-serialize it in order to compute the hash of the re-written record. This would result in an alloc and memcpy for every record. If no type indices were re-written, however, this was an unnecessary allocation. In this patch re-writing is made two phase. The first phase discovers the indices that need to be rewritten and their new values. This information is passed through to the de-duplication code, which only copies and re-writes type indices in the serialized byte sequence if at least one type index is different. Some records have type indices which only appear after variable length strings, or which have lists of type indices, or various other situations that can make it tricky to make this optimization. While I'm not giving up on optimizing these cases as well, for now we can get the easy cases out of the way and lay the groundwork for more complicated cases later. This patch yields another 50% speedup on top of the already large speedups submitted over the past 2 days. In two tests I have run, I went from 9 seconds to 3 seconds, and from 16 seconds to 8 seconds. Differential Revision: https://reviews.llvm.org/D33480 llvm-svn: 303914
* Update the getting started documentation to match the corresponding LLVM ↵Aaron Ballman2017-05-251-0/+4
| | | | | | commit in r303912. llvm-svn: 303913
* Update the documentation and CMake file for Visual Studio generators.Aaron Ballman2017-05-252-0/+11
| | | | | | By default, CMake uses a 32-bit toolchain, even when on a 64-bit platform targeting a 64-bit build. However, due to the size of the binaries involved, this can cause linker instabilities (such as the linker running out of memory). Guide people to the correct solution to get CMake to use the native toolchain. llvm-svn: 303912
* [asan] relax sanbox_read_proc_self_maps_test to pass even if unshare() fails.Kostya Serebryany2017-05-251-5/+3
| | | | llvm-svn: 303911
* Make test/Driver/baremetal.cpp pass on WindowsHans Wennborg2017-05-251-14/+14
| | | | llvm-svn: 303910
* Earlier revert introduced an extra space, remove it.Erich Keane2017-05-251-1/+1
| | | | llvm-svn: 303909
* Revert "[AMDGPU] add __builtin_amdgcn_s_getpc"Reid Kleckner2017-05-252-8/+0
| | | | | | This reverts commit r303861, the LLVM intrinsic was reverted. llvm-svn: 303908
* Fix bug #28898Kamil Rytarowski2017-05-252-7/+13
| | | | | | | | | | | | | lldb: libedit produces garbled, unusable input on Linux Apply patch from Christos Zoulas, upstream libedit developer. It has been tested on NetBSD/amd64. New code supports combination of wide libedit and disabled LLDB_EDITLINE_USE_WCHAR, which was the popular case on Linux systems. llvm-svn: 303907
* Fix typo in tls patchFrancis Ricci2017-05-251-1/+1
| | | | llvm-svn: 303906
* Accept not only --reproduce <foo> but also --reproduce=<foo>.Rui Ueyama2017-05-252-1/+2
| | | | llvm-svn: 303905
* PPC: Correct Size for GETtlsADDRKyle Butt2017-05-251-1/+3
| | | | | | | | | PPC::GETtlsADDR is lowered to a branch and a nop, by the assembly printer. Its size was incorrectly marked as 4, correct it to 8. The incorrect size can cause incorrect branch relaxation in PPCBranchSelector under the right conditions. llvm-svn: 303904
* Add a test for PR33166.Adrian Prantl2017-05-251-0/+18
| | | | | | | This tests optimized code where a variable is allocated on the stack for some part of the function. llvm-svn: 303903
* Revert r303859, CodeGen/AMDGPU/llvm.amdgcn.s.getpc.ll fails on bots.Nico Weber2017-05-253-28/+1
| | | | llvm-svn: 303902
* [AArch64]: add 'a' inline asm operand modifier.Manoj Gupta2017-05-252-1/+11
| | | | | | | | | | | | | | | | Summary: This is used in the Linux kernel, and effectively just means "print an address". This brings back r193593. Reviewed by: Renato Golin Reviewers: t.p.northover, rengolin, richard.barton.arm, kristof.beyls Subscribers: aemerson, javed.absar, llvm-commits, eraman Differential Revision: https://reviews.llvm.org/D33558 llvm-svn: 303901
* Update more coroutine_handle signatures to reflect N4663.Eric Fiselier2017-05-254-13/+62
| | | | | | | Thanks to Casey Carter for pointing out the out-of-date tests and implementation. llvm-svn: 303900
* Add asserts that the nullptr is maintained in string erase operations.Billy Robert O'Neal III2017-05-254-0/+6
| | | | llvm-svn: 303899
OpenPOWER on IntegriCloud