summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [libFuzzer] print new functions as they are discovered in the fork modeKostya Serebryany2019-02-154-11/+33
| | | | llvm-svn: 354092
* Fix implementation of [temp.local]p4.Richard Smith2019-02-159-89/+184
| | | | | | | | | | | | | | | | | | | | When a template-name is looked up, we need to give injected-class-name declarations of class templates special treatment, as they denote a template rather than a type. Previously we achieved this by applying a filter to the lookup results after completing name lookup, but that is incorrect in various ways, not least of which is that it lost all information about access and how members were named, and the filtering caused us to generally lose all ambiguity errors between templates and non-templates. We now preserve the lookup results exactly, and the few places that need to map from a declaration found by name lookup into a declaration of a template do so explicitly. Deduplication of repeated lookup results of the same injected-class-name declaration is done by name lookup instead of after the fact. llvm-svn: 354091
* PR40642: Fix determination of whether the final statement of a statementRichard Smith2019-02-1521-218/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expression is a discarded-value expression. Summary: We used to get this wrong in three ways: 1) During parsing, an expression-statement followed by the }) ending a statement expression was always treated as producing the value of the statement expression. That's wrong for ({ if (1) expr; }) 2) During template instantiation, various kinds of statement (most statements not appearing directly in a compound-statement) were not treated as discarded-value expressions, resulting in missing volatile loads (etc). 3) In all contexts, an expression-statement with attributes was not treated as producing the value of the statement expression, eg ({ [[attr]] expr; }). Also fix incorrect enforcement of OpenMP rule that directives can "only be placed in the program at a position where ignoring or deleting the directive would result in a program with correct syntax". In particular, a label (be it goto, case, or default) should not affect whether directives are permitted. Reviewers: aaron.ballman, rjmccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57984 llvm-svn: 354090
* Fixed failure on Darwin due to r354064Ana Pazos2019-02-151-1/+0
| | | | | | | | | | | | | | | | | Summary: instrprof-darwin-exports.c test fails on Darwin due to r354064. Updated clang list of exported symbols to fix the issue. Reviewers: vsk Reviewed By: vsk Subscribers: davidxl, efriedma Differential Revision: https://reviews.llvm.org/D58259 llvm-svn: 354089
* [libFuzzer] fix the unit testsKostya Serebryany2019-02-153-12/+14
| | | | llvm-svn: 354088
* [libFuzzer] when doing the merge, keep track of the coveraged edges, not ↵Kostya Serebryany2019-02-154-25/+33
| | | | | | just features llvm-svn: 354087
* LLD/AMDGPU: Preserve ABI version during linking ELF for AMDGPUKonstantin Zhuravlyov2019-02-145-3/+38
| | | | | | Differential Revision: https://reviews.llvm.org/D58026 llvm-svn: 354086
* AMDGPU: Set ABI version to 1 for code object v3Konstantin Zhuravlyov2019-02-144-10/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D57811 llvm-svn: 354085
* [Driver][Darwin] Emit an error when using -pg on OS without support for it.Volodymyr Sapsai2019-02-143-14/+29
| | | | | | | | | | | | | | | | | Instead of letting a program fail at runtime, emit an error during compilation. rdar://problem/12206955 Reviewers: dexonsmith, bob.wilson, steven_wu Reviewed By: steven_wu Subscribers: jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D57991 llvm-svn: 354084
* [symbolizer] Avoid collecting symbols belonging to invalid sections.Matt Davis2019-02-142-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: llvm-symbolizer would originally report symbols that belonged to an invalid object file section. Specifically the case where: `*Symbol.getSection() == ObjFile.section_end()` This patch prevents the Symbolizer from collecting symbols that belong to invalid sections. The test (from PR40591) introduces a case where two symbols have address 0, one symbol is defined, 'foo', and the other is not defined, 'bar'. This patch will cause the Symbolizer to keep 'foo' and ignore 'bar'. As a side note, the logic for adding symbols to the Symbolizer's store (`SymbolizableObjectFile::addSymbol`) replaces symbols with the same <address, size> pair. At some point that logic should be revisited as in the aforementioned case, 'bar' was overwriting 'foo' in the Symbolizer's store, and 'foo' was forgotten. This fixes PR40591 Reviewers: jhenderson, rupprecht Reviewed By: rupprecht Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58146 llvm-svn: 354083
* Revert "[INLINER] allow inlining of address taken blocks"Nick Desaulniers2019-02-143-15/+2
| | | | | | This reverts commit 19e95fe61182945b7b68ad15348f144fb996633f. llvm-svn: 354082
* Revert "Revert "[lld] Fix elf::unlinkAsync detached thread""Nick Desaulniers2019-02-141-2/+19
| | | | | | This reverts commit 9934f2ff02dba9fdabe6e27a83f9f95388bf4132. llvm-svn: 354081
OpenPOWER on IntegriCloud