summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Reproducers] Make clang use lldb's VFS.Jonas Devlieghere2019-02-1815-13/+82
| | | | | | | | | | In r353906 we hooked up clang and lldb's reproducer infrastructure to capture files used by clang. This patch adds the necessary logic to have clang reuse the files from lldb's reproducer during replay. Differential revision: https://reviews.llvm.org/D58309 llvm-svn: 354283
* [Sanitizer] On Darwin `__sanitizer_print_stack_trace` only prints topmost frameJulian Lettner2019-02-185-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In compiler-rt we have the notion of a `fast` and a `slow` stack unwinder. Darwin currently only supports the fast unwinder. From reading the code, my understanding is that `BufferedStackTrace::Unwind` can be called with `bp=0, stack_top=0, stack_bottom=0, request_fast_unwind=false`. If `request_fast_unwind=true`, then we alos need to supply bp, stack_top, and stack_bottom. However, `BufferedStackTrace::Unwind` uses `StackTrace::WillUseFastUnwind` which will adapt `request_fast_unwind` if the requested unwinder is not supported. On Darwin, the result is that we don't pass actual values for bp, stack_top, and stack_bottom, but end up using the fast unwinder. The tests then fail because we only print the topmost stack frame. This patch adds a check to `WillUseFastUnwind` at the point of usage to avoid the mismatch between `request_fast_unwind` and what `Unwind` actually does. I am also interested in cleaning up the `request_fast_unwind` machinery so this patch just the simplest thing possible so I can enable the tests. Reviewers: vitalybuka, vsk Differential Revision: https://reviews.llvm.org/D58156 llvm-svn: 354282
* GlobalISel: Fix double count of offset for irregular vector breakdownsMatt Arsenault2019-02-182-1/+48
| | | | | | | Fixes cases with odd vectors that break into multiple requested size pieces. llvm-svn: 354280
* [x86] split more v8f32/v8i32 shuffles in loweringSanjay Patel2019-02-1820-688/+666
| | | | | | | | | | | | | | Similar to D57867 - this is a small patch with lots of test diffs. With half-vector-width narrowing potential, using an extract + 128-bit vshufps is a win because it replaces a 256-bit shuffle with a 128-bit shufle. This seems like it should be a win even for targets with 'fast-variable-shuffle', but we are intentionally deferring that to an independent change to make sure that is true. Differential Revision: https://reviews.llvm.org/D58181 llvm-svn: 354279
* Un-XFAIL TestLinuxCore for windowsPavel Labath2019-02-181-11/+0
| | | | | | | It turns out all that was needed to get this test passing was to fix the python3 incompatibility. llvm-svn: 354278
* Revert "[InstCombine] reduce even more unsigned saturated add with 'not' op"Sanjay Patel2019-02-182-42/+35
| | | | | | | This reverts commit 079b610c29b4a428b3ae7b64dbac0378facf6632. Bots are failing after this change on a stage 2 compile of clang. llvm-svn: 354277
* [InstCombine] reduce even more unsigned saturated add with 'not' opSanjay Patel2019-02-182-35/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to use the sum in the icmp to allow matching with m_UAddWithOverflow and eliminate the 'not'. This is discussed in D51929 and is another step towards solving PR14613: https://bugs.llvm.org/show_bug.cgi?id=14613 Name: uaddsat, -1 fval %notx = xor i32 %x, -1 %a = add i32 %x, %y %c = icmp ugt i32 %notx, %y %r = select i1 %c, i32 %a, i32 -1 => %a = add i32 %x, %y %c2 = icmp ugt i32 %y, %a %r = select i1 %c2, i32 -1, i32 %a Name: uaddsat, -1 fval + ult %notx = xor i32 %x, -1 %a = add i32 %x, %y %c = icmp ult i32 %y, %notx %r = select i1 %c, i32 %a, i32 -1 => %a = add i32 %x, %y %c2 = icmp ugt i32 %y, %a %r = select i1 %c2, i32 -1, i32 %a https://rise4fun.com/Alive/nTp llvm-svn: 354276
* Fix TestLinuxCore for python3Pavel Labath2019-02-181-4/+4
| | | | | | | - dictionaries don't have iteritems() - division returns floats llvm-svn: 354273
* [clangd] Add tests for template specializationsKadir Cetinkaya2019-02-181-0/+52
| | | | | | | | | | Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58190 llvm-svn: 354272
* [MCA] Correctly update register definitions in the PRF after move elimination.Andrea Di Biagio2019-02-182-14/+128
| | | | | | | | | | This patch fixes a bug where register writes performed by optimizable register moves were sometimes wrongly treated like partial register updates. Before this patch, llvm-mca wrongly predicted a 1.50 IPC for test reg-move-elimination-6.s (added by this patch). With this patch, llvm-mca correctly updates the register defintions in the PRF, and the IPC for that test is now correctly reported as 2. llvm-svn: 354271
* [llvm-readobj] - Simplify .gnu.version_d dumping.George Rimar2019-02-181-10/+1
| | | | | | | | | | | | This is similar to D58048. Instead of scanning the dynamic table to read the DT_VERDEFNUM, we could take it from the sh_info field. (https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-94076/index.html) The patch does this. llvm-svn: 354270
* [clangd] Cache include fixes for diagnostics caused by the same unresolved ↵Eric Liu2019-02-183-21/+113
| | | | | | | | | | | | | | | | | | | | | | name or incomplete type. Summary: Multiple diagnostics can be caused by the same unresolved name or incomplete type, especially if the code is copy-pasted without #includes. The cache can avoid making repetitive index requests, and thus reduce latency and allow more diagnostics to be fixed (we limit the number of index requests for each parse). Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58239 llvm-svn: 354268
* [ASTImporter] Find previous friend function templateGabor Marton2019-02-182-1/+31
| | | | | | | | | | | | Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57910 llvm-svn: 354267
* [clang-tidy] Fix links in docs.Alexander Kornienko2019-02-181-5/+6
| | | | llvm-svn: 354266
* [ARM] Add pre-defined macros for ROPI and RWPIOliver Stannard2019-02-186-2/+33
| | | | | | | | | This adds ACLE-defined macros to test for code being compiled in the ROPI and RWPI position-independence modes. Differential revision: https://reviews.llvm.org/D23610 llvm-svn: 354265
* [NFC] Make Optional<T> trivially copyable when T is trivially copyableSerge Guelton2019-02-182-0/+93
| | | | | | | | | | | This is a follow-up to r354246 and a reimplementation of https://reviews.llvm.org/D57097?id=186600 that should not trigger any UB thanks to the use of an union. This may still be subject to the problem solved by std::launder, but I'm unsure how it interacts whith union. /me plans to revert if this triggers any relevant bot failure. At least this validates in Release mode with clang 6.0.1 and gcc 4.8.5. llvm-svn: 354264
* minidump: Add ability to attach (breakpad) symbol files to placeholder modulesPavel Labath2019-02-185-52/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-commits r353677, which was reverted due to test failures on the windows bot. The issue there was that ObjectFilePECOFF vended its base address through the incorrect interface. SymbolFilePDB depended on that, which lead to assertion failures when SymbolFilePDB was attempting to use the placeholder object files as a base. This has been fixed in r354258 It also fixes one small problem in the original patch. The issue was that the Module class would attempt to overwrite the object file we created in CreateModuleFromObjectFile if the file corresponding to the placeholder object file happened to exist (but we have already disqualified it due to UUID mismatch. The fix is simple -- we set the m_did_load_objfile flag to properly record the fact that we have already created an object file for the module. The original commit message was: The reason this wasn't working was that ProcessMinidump was creating odd object-file-less modules, and SymbolFileBreakpad required the module to have an associated object file because it needed to get its base address. This fixes that by introducing a PlaceholderObjectFile to serve as a dummy object file. The general idea for this is taken from D55142, but I've reworked it a bit to avoid the need for the PlaceholderModule class. Now that we have an object file, our modules are sufficiently similar to regular modules that we can use the regular Module class almost out of the box -- the only thing I needed to tweak was the Module::CreateModuleFromObjectFile functon to set the module's FileSpec in addition to it's architecture. This wasn't needed for ObjectFileJIT (the other user of CreateModuleFromObjectFile), but it shouldn't hurt it either, and the change seems like a straightforward extension of this function. Reviewers: clayborg, lemo, amccarth Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D57751 llvm-svn: 354263
* [clang][Index] Fix usage of IndexImplicitInstantiationKadir Cetinkaya2019-02-184-16/+98
| | | | | | | | | | | | | | Summary: Indexing context was skipping explicit template instantiations as well. This patch makes sure it only skips implicit ones. Subscribers: arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58189 llvm-svn: 354262
* [MCA] Slightly refactor method writeStartEvent in WriteState and ReadState. NFCIAndrea Di Biagio2019-02-184-24/+31
| | | | | | | This is another change in preparation for PR37494. No functional change intended. llvm-svn: 354261
* [ASTImporter] Unify redecl chain tests as type parameterized testsGabor Marton2019-02-181-641/+556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch unifies all those tests which check the correctness of the redecl chains. Previously we had several structurally very similar test cases for each language construct (class, function, variable, function template, ...). We still use value-parameterized tests for the different AST compatibility switches (-fdelayed-template-parsing, -fms-compatibility). Gtest makes it possible to have either value-parameterized or type-parameterized fixtures. However, we cannot have both value- and type-parameterized test fixtures. So we use a value-parameterized test fixture in the gtest sense. We intend to mimic gtest's type-parameters via the type template parameter. We manually instantiate the different tests with the each types. After this patch I am planning to put the "generic redecl chain" related tests into their own separate test file (in another patch). Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Differential Revision: https://reviews.llvm.org/D57236 llvm-svn: 354259
* PECOFF: Implement GetBaseAddressPavel Labath2019-02-185-3/+94
| | | | | | | | | | | | | | | | | | COFF files are modelled in lldb as having one big container section spanning the entire module image, with the actual sections being subsections of that. In this model, the base address is simply the address of the first byte of that section. This also removes the hack where ObjectFilePECOFF was using the m_file_offset field to communicate this information. Using file offset for this purpose is completely wrong, as that is supposed to indicate where is this ObjectFile located in the file on disk. This field is only meaningful for fat binaries, and should normally be 0. Both PDB plugins have been updated to use GetBaseAddress instead of GetFileOffset. llvm-svn: 354258
* Return better error message from GDBRemoteCommunication::ConnectLocallyPavel Labath2019-02-181-3/+4
| | | | llvm-svn: 354256
* Set cmake policy CMP0075 to NEWPavel Labath2019-02-181-0/+4
| | | | | | | | | | | | | | | | | | | Summary: The policy is about cmake_include_files ignoring CMAKE_REQUIRED_LIBRARIES in the OLD behavior. Llvm already sets this policy to NEW, but that is overridden by our cmake_minimum_required command. This makes our cmake policy setup consistent with the llvm build files and avoids a warning when using newer versions of cmake. Reviewers: sgraenitz, xiaobai Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D58279 llvm-svn: 354251
* [llvm-exegesis] [NFC] Fixing typo.Guillaume Chatelet2019-02-181-1/+1
| | | | | | | | | | | | Reviewers: courbet, gchatelet Reviewed By: courbet, gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D54895 llvm-svn: 354250
* Recommit [NFC] Better encapsulation of llvm::Optional StorageSerge Guelton2019-02-181-77/+99
| | | | | | | | | | Second attempt, trying to navigate out of the UB zone using union for storage instead of raw bytes. I'm prepared to revert that commit as soon as validation breaks, which is likely to happen. llvm-svn: 354246
* Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."Clement Courbet2019-02-1812-275/+124
| | | | | | Breaks some bots. llvm-svn: 354245
* [DAGCombiner] Eliminate dead stores to stack.Clement Courbet2019-02-1812-124/+275
| | | | | | | | | | | | | | | Summary: A store to an object whose lifetime is about to end can be removed. See PR40550 for motivation. Reviewers: niravd Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D57541 llvm-svn: 354244
* [MC] Make SubtargetFeatureKV only store one FeatureBitset and use an ↵Craig Topper2019-02-183-18/+18
| | | | | | | | | | | | 'unsigned' to hold the value. This class is used for two difference tablegen generated tables. For one of the tables the Value FeatureBitset only has one bit set. For the other usage the Implies field was unused. This patch changes the Value field to just be an unsigned. For the usage that put a real vector in bitset, we now use the previously unused Implies field and leave the Value field unused instead. This is good for a 16K reduction in the size of llc on my local build with all targets enabled. llvm-svn: 354243
* gn build: Merge r354156Nico Weber2019-02-182-0/+2
| | | | llvm-svn: 354242
* lld-link: Mention comdat selection work in the 9.0.0 wip release notesNico Weber2019-02-181-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D58301 llvm-svn: 354241
* Revert [NFC] Better encapsulation of llvm::Optional StorageSerge Guelton2019-02-171-78/+80
| | | | llvm-svn: 354240
* [NFC] Better encapsulation of llvm::Optional Storage, part IISerge Guelton2019-02-171-3/+3
| | | | | | Fix for better Windows support. llvm-svn: 354239
* [NFC] Better encapsulation of llvm::Optional StorageSerge Guelton2019-02-171-80/+78
| | | | | | | | | | Second attempt, trying to navigate out of the UB zone using union for storage instead of raw bytes. I'm prepared to revert that commit as soon as validation breaks, which is likely to happen. llvm-svn: 354238
* [LLVM-C] Add bindings to create enumeratorsRobert Widmann2019-02-172-0/+21
| | | | | | | | | | | | | | | | Summary: The C API don't have the bindings to create enumerators, needed to create an enumeration. Reviewers: whitequark, CodaFi, harlanhaskins, deadalnix Reviewed By: whitequark, CodaFi, harlanhaskins Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58323 llvm-svn: 354237
* [InstCombine] add even more tests for unsigned saturated add; NFCSanjay Patel2019-02-171-8/+76
| | | | | | | | | The pattern-matching from rL354221 / rL354224 doesn't cover these, so we're up to 8 different commuted possibilities. There may still be 1 more variant of this pattern. llvm-svn: 354236
* [analyzer] Make valist.Uninitialized depend on ValistBaseKristof Umann2019-02-172-2/+13
| | | | | | | Accidentally left this dependency out, resulting in an assert failure if only valist.Uninitialized is enabled from the valist package. llvm-svn: 354235
* [X86] In FP_TO_INTHelper, when moving data from SSE register to X87 register ↵Craig Topper2019-02-173-86/+82
| | | | | | | | | | file via the stack, use the same stack slot we use for the integer conversion. No need for a separate stack slot. The lifetimes don't overlap. Also fix the MachinePointerInfo for the final load after the integer conversion to indicate it came from the stack slot. llvm-svn: 354234
* [NFC] Add a llvm_unreachable to silence a warning in SubstObjCTypeArgsVisitorBruno Ricci2019-02-171-0/+1
| | | | | | All cases in the switch are covered. NFC. llvm-svn: 354233
* Recommit "[AST] Factor out the logic of the various Expr::Ignore*"Bruno Ricci2019-02-172-187/+154
| | | | | | | | | | | | | | | | | | | | (Originally commited in r354215 and reverted in r354216 because of a missed failing clang-tidy test (fix in r354228)) Now that the implementation of all of the Expr::Ignore* is in Expr.cpp we can try to remove some duplication. Do this by separating the logic of the Expr::Ignore* from the iterative loop. This is NFC, except for one change: IgnoreParenImpCasts now skips, among other things, everything that IgnoreImpCasts skips. This means FullExpr are now skipped by IgnoreParenImpCasts. This was likely an oversight when FullExpr was added to the nodes skipped by IgnoreImpCasts. Differential Revision: https://reviews.llvm.org/D57267 Reviewed By: aaron.ballman (with comments from void and rnk) llvm-svn: 354232
* [compiler-rt] Fix broken sanitizer bots (hopefully)Jonas Hahnfeld2019-02-1713-16/+15
| | | | | | | | | | | | | | | | | | | According to the logs and local debugging there were two issues: 1) tsan tests listed libc++.a before the source file. That's usually ok for shared libraries, but the linker will not add symbols from a static library unless needed at that time. As a result the tests that rely upon symbols from the library (and not only include the headers) had undefined references. To solve this I'm adding a new substitution %link_libcxx_tsan which expands to libc++.a if available. 2) The target Fuzzer-x86_64-Test linked in SANITIZER_TEST_CXX_LIBRARIES which defaults to -lstdc++. This resulted in error messages like hidden symbol '_ZdlPv' is not defined locally hidden symbol '_Znwm' is not defined locally when using GNU gold (ld.bfd and lld are fine). Removing the linkage is fine because we build a custom libc++ for that purpose. llvm-svn: 354231
* [TEST] Remove 2>&1 from testsMax Kazantsev2019-02-171-3/+3
| | | | | | Avoid confusing CHECKS with debug dumps of sets that can be printed differently. llvm-svn: 354229
* [clang-tidy][NFCI] DanglingHandleCheck: Remove a superflous IgnoreParenImpCastsBruno Ricci2019-02-171-3/+2
| | | | | | | | | | | | ExprWithCleanups is currently not skipped by IgnoreParenImpCasts, but is skipped by IgnoreImpCasts. In view of fixing this inconsistency in D57267, remove the IgnoreParenImpCasts between the ReturnStmt and the ExprWithCleanups which is not needed since ExprWithCleanups is always created as a direct child of ReturnStmt (by inspection of each ReturnStmt::Create in Sema/SemaStmt.cpp). NFC intended. llvm-svn: 354228
* [NFC] Teach getInnermostLoopFor walk up the loop treesMax Kazantsev2019-02-171-6/+10
| | | | | | | This should be NFC in current use case of this method, but it will help to use it for solving more compex tasks in follow-up patches. llvm-svn: 354227
* [SelectionDAG] Extract [US]MULO expansion into TL method; NFCNikita Popov2019-02-173-153/+132
| | | | | | | | | | | | In preparation for supporting vector expansion. Add an isPostTypeLegalization flag to makeLibCall(), because this expansion relies on the legalized form using MERGE_VALUES. Drop the corresponding variant of ExpandLibCall, which is no longer used. Differential Revision: https://reviews.llvm.org/D58006 llvm-svn: 354226
* Remove unused extern declaration as removed by D32167Jan Kratochvil2019-02-171-2/+0
| | | | llvm-svn: 354225
* [InstCombine] reduce more unsigned saturated add with 'not' opSanjay Patel2019-02-172-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to use the sum in the icmp to allow matching with m_UAddWithOverflow and eliminate the 'not'. This is discussed in D51929 and is another step towards solving PR14613: https://bugs.llvm.org/show_bug.cgi?id=14613 Name: not op %notx = xor i32 %x, -1 %a = add i32 %x, %y %c = icmp ult i32 %notx, %y %r = select i1 %c, i32 -1, i32 %a => %a = add i32 %x, %y %c2 = icmp ult i32 %a, %y %r = select i1 %c2, i32 -1, i32 %a Name: not op ugt %notx = xor i32 %x, -1 %a = add i32 %x, %y %c = icmp ugt i32 %y, %notx %r = select i1 %c, i32 -1, i32 %a => %a = add i32 %x, %y %c2 = icmp ult i32 %a, %y %r = select i1 %c2, i32 -1, i32 %a https://rise4fun.com/Alive/niom (The matching here is still incomplete.) llvm-svn: 354224
* [InstCombine] add more tests for unsigned saturated add; NFCSanjay Patel2019-02-171-2/+38
| | | | | | Extend the pattern-matching from rL354219 / rL354221. llvm-svn: 354223
* [RISCV] Default enable RISCV linker relaxationShiva Chen2019-02-172-1/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D47127 llvm-svn: 354222
* [InstCombine] reduce unsigned saturated add with 'not' opSanjay Patel2019-02-172-20/+35
| | | | | | | | | | | | | We want to use the sum in the icmp to allow matching with m_UAddWithOverflow and eliminate the 'not'. This is discussed in D51929 and is another step towards solving PR14613: https://bugs.llvm.org/show_bug.cgi?id=14613 (The matching here is incomplete. Trying to take minimal steps to make sure we don't induce infinite looping from existing canonicalizations of the 'select'.) llvm-svn: 354221
* [NFC] Fix name and clarifying comment for factored-out functionMax Kazantsev2019-02-171-4/+5
| | | | llvm-svn: 354220
OpenPOWER on IntegriCloud