summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] fix crash while trying to narrow a binop of shuffles (PR40734)Sanjay Patel2019-02-152-1/+17
| | | | | | https://bugs.llvm.org/show_bug.cgi?id=40734 llvm-svn: 354144
* [compiler-rt] Let CMake search for thread supportJonas Hahnfeld2019-02-151-0/+2
| | | | | | This is an educated guess to fix sanitizer-x86_64-linux after r354132. llvm-svn: 354143
* Revert r354137 - OptionalStorage implementation for trivial type, take IIISerge Guelton2019-02-151-50/+2
| | | | | | This still fails on some random platform, and I fail to reproduce the issue. llvm-svn: 354142
* [clang] Add build and install targets for clang librariesShoaib Meenai2019-02-152-0/+23
| | | | | | | | | | | | | | | This is modeled after the existing llvm-libraries target. It's a convenient way to include all clang libraries in a distribution. This differs slightly from the llvm-libraries target in that it adds any library added via add_clang_library, whereas llvm-libraries only includes targets added via add_llvm_library that didn't use the MODULE or BUILDTREE_ONLY arguments. add_clang_library doesn't appear to have any equivalents of those arguments, so the conditions don't apply. Differential Revision: https://reviews.llvm.org/D58269 llvm-svn: 354141
* [clang] Create install targets for non-shared librariesShoaib Meenai2019-02-151-1/+1
| | | | | | | | | | | I don't see a reason for these to not have install targets created, which in turn allows them to be bundled in distributions. This doesn't affect the "install" target, since that just runs all CMake install rules (and we were already creating install rules for these). Differential Revision: https://reviews.llvm.org/D58268 llvm-svn: 354140
* GlobalISel: Fix inadequate verification of g_build_vectorMatt Arsenault2019-02-152-24/+43
| | | | | | | | | | | | | Testing based on the total size of the elements failed to catch a few invalid scenarios, so explicitly check the number of elements/operands and types. This failed to catch situations like <4 x s16> = G_BUILD_VECTOR s32, s32 since the total size added up. This also would fail to catch an implicit conversion between pointers and scalars. llvm-svn: 354139
* Try to organize MachineVerifier testsMatt Arsenault2019-02-1533-8/+20
| | | | | | | | | | The Verifier is separate from the MachineVerifier, so move it to a different directory. Some other verifier tests were scattered in target codegen tests as well (although I'm sure I missed some). Work towards using a more consistent naming scheme to make it clearer where the gaps still are for generic instructions. llvm-svn: 354138
* OptionalStorage implementation for trivial type, take IIISerge Guelton2019-02-151-2/+50
| | | | | | | | | | | | | This is another attempt at implementating optional storage for trivially copyable type, using an union instead of a raw buffer to hold the actual storage. This make it possible to get rid of the reinterpret_cast, and hopefully to fix the UB of the previous attempts. This validates fine on my laptop for gcc 8.2 and gcc 4.8, I'll revert if it breaks the validation. llvm-svn: 354137
* Exteded test of .Yitzhak Mandelbaum2019-02-151-9/+13
| | | | llvm-svn: 354136
* Remove unnecessary expectation.Yitzhak Mandelbaum2019-02-151-1/+0
| | | | llvm-svn: 354135
* Added test for matcher On.Yitzhak Mandelbaum2019-02-151-12/+14
| | | | llvm-svn: 354134
* Add tests for assorted `CXXMemberCallExpr` matchers.Yitzhak Mandelbaum2019-02-151-0/+89
| | | | | | | | | | Summary: Add tests for matchers `on`, `onImplicitObjectArgument` and `hasObjectExpression`. Reviewers: alexfh, steveire, aaron.ballman Differential Revision: https://reviews.llvm.org/D56850 llvm-svn: 354133
* [compiler-rt] Cleanup usage of C++ ABI libraryJonas Hahnfeld2019-02-1510-40/+73
| | | | | | | | | Add missed value "libcxxabi" and introduce SANITIZER_TEST_CXX for linking unit tests. This needs to be a full C++ library and cannot be libcxxabi. Differential Revision: https://reviews.llvm.org/D58012 llvm-svn: 354132
* [MergeICmps] Make base ordering really deterministic.Clement Courbet2019-02-151-87/+107
| | | | | | | | | | | | | | | | | | Summary: The idea is that we now manipulate bases through a `unsigned BaseID` based on order of appearance in the comparison chain rather than through the `Value*`. Fixes 40714. Reviewers: gchatelet Subscribers: mgrang, jfb, jdoerfert, llvm-commits, hans Tags: #llvm Differential Revision: https://reviews.llvm.org/D58274 llvm-svn: 354131
* [MergeICmps][NFC] Improve doc.Clement Courbet2019-02-151-5/+28
| | | | llvm-svn: 354128
* [Analyzer] Fix for test file of bug 40625Adam Balogh2019-02-151-4/+1
| | | | | | Test fixed and changed to true positive, FIXME about false positive removed. llvm-svn: 354127
* Speculatively revert r354051 "Recommit Optional specialization for trivially ↵Hans Wennborg2019-02-152-65/+0
| | | | | | | | | | | | | | | | | | | | | copyable types" and r354055 "Optional specialization for trivially copyable types, part2" These are suspected to cause Clang to get miscompiled on Ubuntu 14.04 (Trusty) which uses GCC 4.8.4. Reverting for an hour to see if this helps. See llvm-commits thread. > Recommit Optional specialization for trivially copyable types > > Unfortunately the original code gets misscompiled by GCC (at least 8.1), > this is a tentative workaround using std::memcpy instead of inplace new > for trivially copyable types. I'll revert if it breaks. > > Original revision: https://reviews.llvm.org/D57097 llvm-svn: 354126
* Remove alignment from struct XSAVE altogetherPavel Labath2019-02-151-1/+1
| | | | | | | | | | | | | I reduced the alignment of this struct in r342029 to avoid compiler warnings about under-aligned allocations, but it turns out that this still causes problems with some compilers (see r353778). As I hinted in r342029, I don't believe any special aligment is necessary here (the only reason for that would be if we used some aligned SSE instructions to access this buffer, but I don't see any reason why we should do that), so here I go all the way, and remove the alignment requirements (except the ones naturally imposed by basic types) altogether. llvm-svn: 354125
* [NFCI] Factor out block removal from stack of nested loopsMax Kazantsev2019-02-151-6/+14
| | | | llvm-svn: 354124
* Fix "field 'DFS' will be initialized after field 'DTU'" warning. NFCI.Simon Pilgrim2019-02-151-1/+1
| | | | llvm-svn: 354123
* [lldb] [MainLoop] Add kevent() EINTR handlingMichal Gorny2019-02-152-2/+32
| | | | | | | | | | | | | Add missing EINTR handling for kevent() calls. If the call is interrupted, return from Poll() as if zero events were returned and let the polling resume on next iteration. This fixes test flakiness on NetBSD. Includes a test case suggested by Pavel Labath on D42206. Differential Revision: https://reviews.llvm.org/D58230 llvm-svn: 354122
* [OpenCL][PR40707] Allow OpenCL C types in C++ mode.Anastasia Stulova2019-02-159-41/+28
| | | | | | Allow all OpenCL types to be parsed in C++ mode. llvm-svn: 354121
* [ASTImporter] Import every Decl in lambda recordGabor Marton2019-02-152-7/+23
| | | | | | | | | | | | | | | | | | | | Summary: Previously only the fields were imported. Now every Decl is imported. This way the destructor decl is not missing after import. Patch by balazske (Balázs Kéri) Reviewers: a.sidorin, shafik Reviewed By: shafik Subscribers: balazske, cfe-commits, Szelethus, martong, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D57740 llvm-svn: 354120
* [BPI] Look through bitcasts in calcZeroHeuristicSam Parker2019-02-152-1/+110
| | | | | | | | | | | | Constant hoisting may have hidden a constant behind a bitcast so that it isn't folded into its users. However, this prevents BPI from calculating some of its heuristics that are based upon constant values. So, I've added a simple helper function to look through these casts. Differential Revision: https://reviews.llvm.org/D58166 llvm-svn: 354119
* [NFC] Promote DFS to field for further useMax Kazantsev2019-02-151-2/+2
| | | | llvm-svn: 354118
* [X86][AVX] lowerShuffleAsLanePermuteAndPermute - fully populate the lane ↵Simon Pilgrim2019-02-152-3/+12
| | | | | | | | | | | | | | shuffle mask (PR40730) As detailed on PR40730, we are not correctly filling in the lane shuffle mask (D53148/rL344446) - we fill in for the correct src lane but don't add it to the correct mask element, so any reference to the correct element is likely to see an UNDEF mask index. This allows constant folding to propagate UNDEFs prior to the lane mask being (correctly) lowered to vperm2f128. This patch fixes the issue by fully populating the lane shuffle mask - this is more than is necessary (if we only filled in the required mask elements we might be able to match other shuffle instructions - broadcasts etc.), but its the most cautious approach as this needs to be cherrypicked into the 8.0.0 release branch. Differential Revision: https://reviews.llvm.org/D58237 llvm-svn: 354117
* [clangd] Unlink VFS working dir from OS working dir. Reland of r351051Sam McCall2019-02-151-2/+3
| | | | llvm-svn: 354116
* [ARM GlobalISel] Style fix. NFCIDiana Picus2019-02-151-1/+5
| | | | | | | | Add the opcode for ADDrr / t2ADDrr to the Opcode cache, as we did for all other opcodes where the handling is otherwise the same between arm mode and thumb2. llvm-svn: 354115
* Fix the gdb-client test suite for python3Pavel Labath2019-02-151-12/+5
| | | | | | | | | | This applies the same fix that was done in r354106 to the lldb-server test: bitcasting the string to a bytes object before sending it over a socket. Since the gdb-remote protocol occasionally contains binary data, and it does not assign any particular encoding to them, this is the right thing to do here. llvm-svn: 354114
* [ARM GlobalISel] Support branches for Thumb2Diana Picus2019-02-155-44/+100
| | | | | | Just like arm mode, but with different opcodes. llvm-svn: 354113
* Sort files in source/Host/CMakeLists.txtPavel Labath2019-02-151-4/+4
| | | | llvm-svn: 354112
* [RISCV] Add assembler support for LA pseudo-instructionAlex Bradbury2019-02-154-20/+145
| | | | | | | | | | This patch also introduces the emitAuipcInstPair helper, which is then used for both emitLoadAddress and emitLoadLocalAddress. Differential Revision: https://reviews.llvm.org/D55325 Patch by James Clarke. llvm-svn: 354111
* [RISCV] Support assembling %got_pcrel_hi operatorAlex Bradbury2019-02-1510-14/+72
| | | | | | | Differential Revision: https://reviews.llvm.org/D55279 Patch by James Clarke. llvm-svn: 354110
* Revert "[Analysis] -Wunreachable-code shouldn't fire on the increment of a ↵Sam McCall2019-02-152-9/+0
| | | | | | | | foreach loop" This reverts commit r354102. llvm-svn: 354109
* [ARM CGP] Fix ConvertTruncsSam Parker2019-02-153-103/+123
| | | | | | | | | | | | | ConvertTruncs is used to replace a trunc for an AND mask, however this function wasn't working as expected. By performing the change later, we can create a wide type integer mask instead of a narrow -1 value, which could then be simply removed (incorrectly). Because we now perform this action later, it's necessary to cache the trunc type before we perform the promotion. Differential Revision: https://reviews.llvm.org/D57686 llvm-svn: 354108
* [NFC] Tweak SplitBlockAndInsertIfThen to use existing ThenBlockMax Kazantsev2019-02-152-10/+20
| | | | llvm-svn: 354107
* Fix lldb-server test suite for python3Pavel Labath2019-02-156-16/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch finishes the python3-ification of the lldb-server test suite. It reverts the partial attempt in r352709 to encode/decode the string via utf8 before writing to the socket. This wasn't enough because the gdb-remote protocol can sometimes (but not very often) carry binary data, and the utf8 codec chokes on that. Instead I add utility functions to the "seven" module for performing "identity" transformations on the byte data. This basically drills back the hole in the python type system that the string/bytes distinction was supposed to plug. That is not ideal, but was the best solution of the alternatives I could come up with. The options I considered were: - make use of the type system to add type safety to the test suite: This required making a lot of changes to the test suite, since most of the strings would now become byte objects instead, and it was not even fully clear to me where to draw the line. One extreme solution would be to just use byte objects everywhere, as the protocol doesn't support non-ascii characters anyway. However, this appeared to be: a) weird, because most of the protocol actually deals with strings, but we would have to prefix everything with 'b' b) clunky, because the handling of the bytes objects is sufficiently different in PY2 and PY3 (e.g. b'a'[0] is a string in PY2, but an int in PY3). - using the latin1 codec (which gives an identity transformation for the first 256 code points of unicode) instead of the custom bytes_to_string functions. This almost could work, but it was still slightly different between python 2 and 3, because in PY2 in would return a unicode object, which would then cause problems when combined with regular strings if it contained 8-bit chars. With this in mind, I think the best solution for the time being is to just coerce everything into the string type as early as possible, and have things proceed indentically on both python versions. Once we stop supporting python3, we can revisit the idea of using bytes objects more prevasively. Reviewers: davide, zturner, serge-sans-paille Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D58177 llvm-svn: 354106
* Use sys.executable in lldb-dotestPavel Labath2019-02-151-1/+1
| | | | | | | | | | | Without that, dotest.py would be executed with the default python interpreter, which may not be the same one that lldb is built with. This still requires the user do know which python interpreter to use when running lldb-dotest, but now he is at least able to choose it, if he knows which one to use. llvm-svn: 354105
* Embed swig version into lldb.py in a different wayPavel Labath2019-02-153-22/+44
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of doing string chopping on the resulting python file, get swig to output the version for us. The two things which make slightly non-trivial are: - in order to get swig to expand SWIG_VERSION for us, we cannot use %pythoncode directly, but we have to go through an intermediate macro. - SWIG_VERSION is a hex number, but it's components are supposed to be interpreted decimally, so there is a bit of integer magic needed to get the right number to come out. I've tested that this approach works both with the latest (3.0.12) and oldest (1.3.40) supported swig. Reviewers: zturner, jingham, serge-sans-paille Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D58172 llvm-svn: 354104
* Remove redundant semicolon after namespace-closing '}'Pavel Labath2019-02-151-1/+1
| | | | llvm-svn: 354103
* [Analysis] -Wunreachable-code shouldn't fire on the increment of a foreach loopSam McCall2019-02-152-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The idea is that the code here isn't written, so doesn't indicate a bug. Similar to code expanded from macros. This means the warning no longer fires on this code: for (auto C : collection) { process(C); return; } handleEmptyCollection(); Unclear whether this is more often a bug or not in practice, I think it's a reasonable idiom in some cases. Either way, if we want to warn on "loop that doesn't loop", I think it should be a separate warning, and catch `while(1) break;` Reviewers: ilya-biryukov, ioeric Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58134 llvm-svn: 354102
* [TEST] Update test comments, refactor checks with update_test_checks.pyMax Kazantsev2019-02-151-90/+216
| | | | | | | This patch changes messages in guards-related tests to adequately reflect reality. llvm-svn: 354101
* Fix for build bot problem from last changeAaron Smith2019-02-151-3/+3
| | | | llvm-svn: 354100
* Implement GetLoadAddress for the Windows process pluginAaron Smith2019-02-155-41/+111
| | | | | | | | | | | | | | | | Summary: When a process is loaded, update its sections with the load address to resolve any created breakpoints. For the remote debugging case, the debugged process is launched remotely so GetLoadAddress is intended to pass the load address from remote to LLDB (client). Reviewers: zturner, llvm-commits, clayborg, labath Reviewed By: labath Subscribers: mgorny, sas, Hui, clayborg, labath, lldb-commits Differential Revision: https://reviews.llvm.org/D56237 llvm-svn: 354099
* X86: Replace isSafeToClobberEFLAGS implementationMatt Arsenault2019-02-152-86/+5
| | | | | | Also use modifiesRegister instead of looping over operands. llvm-svn: 354098
* Revert "Fix implementation of [temp.local]p4."Francis Visoiu Mistrih2019-02-159-184/+89
| | | | | | | | | This reverts commit 40bd10b770813bd1471d46f514545437516aa4ba. This seems to now emit an error when building the sanitizer tests: http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/53965/consoleFull. llvm-svn: 354097
* Revert "[SystemZ] Do not emit VEXTEND or VROUND nodes without vector support."Francis Visoiu Mistrih2019-02-152-58/+0
| | | | | | | | | This reverts commit aa0b77d3395dc6ab91647138139c1a15a3aa088d. This fails to pass the machine verifier: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/13579/ llvm-svn: 354096
* [lit][NFC] Cleanup copy&paste naming mistakeJulian Lettner2019-02-152-5/+5
| | | | llvm-svn: 354095
* [llvm-cxxfilt] Fix a comment typo. NFC.Matt Davis2019-02-151-1/+1
| | | | llvm-svn: 354094
* [GISel][NFC]: Add methods to speed up insertion into GISelWorklistAditya Nandakumar2019-02-153-4/+46
| | | | | | | | | | | | | https://reviews.llvm.org/D58073 Speed up insertion during the initial populating phase into the GISelWorkList by deferring repeatedly resizing the DenseMap. This results in ~10% improvement in the combiner passes, and ~3% speedup in the Legalizer. reviewed by: aemerson. llvm-svn: 354093
OpenPOWER on IntegriCloud