summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Remove LLDB_TEST_USE_CUSTOM_C(XX)_COMPILERJonas Devlieghere2019-08-203-15/+4
| | | | | | | | | | | | Given that LLDB_TEST_USE_CUSTOM_C_COMPILER and LLDB_TEST_C_COMPILER are both set at configuration time, I don't really see the point of having both. This patch simplifies things and uses the custom C/C++ compiler when the variable is set, and uses the default one when it's not set. The variable can be unset by passing -ULLDB_TEST_C_COMPILER to CMake. Differential revision: https://reviews.llvm.org/D66429 llvm-svn: 369435
* [X86] Add a DAG combine to transform (i8 (bitcast (v8i1 (extract_subvector ↵Craig Topper2019-08-204-154/+164
| | | | | | | | | | (v16i1 X), 0)))) -> (i8 (trunc (i16 (bitcast (v16i1 X))))) on KNL target Without AVX512DQ we don't have KMOVB so we can't really copy 8-bits of a k-register to a GPR. We have to copy 16 bits instead. We do this even if the DAG copy is from v8i1->v16i1. If we detect the (i8 (bitcast (v8i1 (extract_subvector (v16i1 X), 0)))) we should rewrite the types to match the copy we do support. By doing this, we can help known bits to propagate without losing the upper 8 bits of the input to the extract_subvector. This allows some zero extends to be removed since we have an isel pattern to use kmovw for (zero_extend (i16 (bitcast (v16i1 X))). Differential Revision: https://reviews.llvm.org/D66489 llvm-svn: 369434
* [GWP-ASan] Fix typos.Mitch Phillips2019-08-201-3/+3
| | | | | | | | | | | | | | | | | | Summary: Fix two spelling typos and de-indent a guarded #define so that it's consistent with clang-format. Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D66311 llvm-svn: 369433
* [OPENMP]Fix delayed diagnostics for standalone declare target directive.Alexey Bataev2019-08-205-10/+43
| | | | | | | If the function is marked as declare target in a standalone directive, the delayed diagnostics is not emitted. Patch fixes this problem. llvm-svn: 369432
* [X86] Add isel patterns for (i64 (zext (i8 (bitcast (v16i1 X))))) to use a ↵Craig Topper2019-08-204-216/+15
| | | | | | | | | | | | | | | | | | | | | | | | KMOVW and a SUBREG_TO_REG. Similar for i8 and anyextend. We already had patterns for extending to i32 to take advantage of the impliciting zeroing of the upper bits of a 32-bit GPR that is done by KMOVW/KMOVB. But the extend might be all the way to i64, in which case the existing patterns would fail and we'd get a KMOVW/B followed by a MOVZX. By adding patterns for i64 we can use the fact that KMOVW/B zero the upper bits of the 32-bit GPR and the normal property that 32-bit GPR writes implicitly zero the upper 32-bits of the full 64-bit GPR. The anyextend patterns are slightly different since we don't care about the upper zeros. For the i8->i64 I think this avoids selecting the anyextend as a MOVZX to prevent a partial register issue that doesn't exist. For i16->i64 I think we would have just emitted an insert_subreg on top of the extract_subreg that the vXi16->i16 bitcast pattern emits. The register coalescer or peephole pass should combine those, but this saves that work and makes i8/16 consistent. llvm-svn: 369431
* Force honoring nthreads-var and thread-limit-var inside teams construct on hostJonathan Peyton2019-08-201-4/+17
| | | | | | | | | | | | | This patch fixes https://bugs.llvm.org/show_bug.cgi?id=42906, via adding adjustment of number of threads on enter to the teams construct on host according to user settings. This allows to pass checks and avoid assertions at time of team of threads creation. Patch by Andrey Churbanov Differential Revision: https://reviews.llvm.org/D66351 llvm-svn: 369430
* [libc++] Avoid implicit conversion warning in a <random> testLouis Dionne2019-08-201-23/+16
| | | | | | | | | | By stashing the computation of `E::max() - E::min()` in a variable, we avoid the warning introduced in r367497. Note that we use `auto` to avoid having to deduce the type of the computation, which is not a problem since Clang provides `auto` as an extension even in C++03 (and we disable warnings related to using C++11 extensions in the test suite). llvm-svn: 369429
* fix buildbot start script to no longer hangEric Fiselier2019-08-201-1/+1
| | | | llvm-svn: 369428
* [Sema][Typo] Fix assertion failure for expressions with multiple typosDavid Goldman2019-08-204-42/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As Typo Resolution can create new TypoExprs while resolving typos, it is necessary to recurse through the expression to search for more typos. This should fix the assertion failure in `clang::Sema::~Sema()`: `DelayedTypos.empty() && "Uncorrected typos!"` Notes: - In case some TypoExprs are created but thrown away, Sema now has a Vector that is used to keep track of newly created typos. - For expressions with multiple typos, we only give suggestions if we are able to resolve all typos in the expression - This patch is similar to D37521 except that it does not eagerly commit to a correction for the first typo in the expression. Instead, it will search for corrections which fix all of the typos in the expression. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62648 llvm-svn: 369427
* [TargetMachine] Don't try to create COFFSTUB references on windows on non-COFFMartin Storsjo2019-08-203-3/+15
| | | | | | | | This avoids spurious relocation types for windows/elf targets. Differential Revision: https://reviews.llvm.org/D66401 llvm-svn: 369426
* [COFF] Print the file name on errors writing the pdb fileMartin Storsjo2019-08-201-0/+1
| | | | | | | | | | | This avoids confusing contextless error messages such as "No such file or directory" if e.g. the pdb output file should be written to a nonexistent directory. (This can happen with linkrepro scripts, at least old ones.) Differential Revision: https://reviews.llvm.org/D66466 llvm-svn: 369425
* [ClangExpressionParser] Add ClangDeclVendorAlex Langford2019-08-207-29/+81
| | | | | | | | | | | | | | | | Summary: This introduces a layer between DeclVendor and the currently implemented DeclVendors (ClangModulesDeclVendor and AppleObjCDeclVendor). This allows the removal of DeclVendor::GetImporterSource which is extremely clang-specific, freeing up the interface to be more general. A good follow up to this would be to remove the remaining instances of clang in DeclVendor, either by moving things to ClangDeclVendor or by using wrappers (e.g. CompilerDecl instead of clang::NamedDecl). Differential Revision: https://reviews.llvm.org/D66451 llvm-svn: 369424
* [WebAssembly][lld] Fix crash when applying relocations to debug sectionsSam Clegg2019-08-204-2/+26
| | | | | | | | | | | | | | Debug sections are special in that they can contain relocations against symbols that are not present in the final output (i.e. not live). However it is also possible to have R_WASM_TABLE_INDEX relocations against symbols that don't have a table index assigned (since they are not address taken by actual code. Fixes: https://github.com/emscripten-core/emscripten/issues/9023 Differential Revision: https://reviews.llvm.org/D66435 llvm-svn: 369423
* [libc++] Implement LWG 3199Louis Dionne2019-08-203-3/+14
| | | | | | | | | | | | | | | | Summary: The resolution of LWG 3199 makes sure that input-streaming into an empty bitset does not set the failbit on the input stream. Reviewers: mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D65105 llvm-svn: 369422
* [InstCombine] add helper function for icmp+zext/sext; NFCSanjay Patel2019-08-201-69/+75
| | | | llvm-svn: 369421
* [libc++] Precise XFAIL for AppleClang 11Louis Dionne2019-08-201-1/+1
| | | | | | This test doesn't fail on all patch levels of AppleClang 11 llvm-svn: 369420
* Fix typo in comment. NFCI.Simon Pilgrim2019-08-201-1/+1
| | | | llvm-svn: 369419
* Fix name of the error message, NFC.Alexey Bataev2019-08-202-2/+2
| | | | llvm-svn: 369418
* Revert "AMDGPU: Fix iterator error when lowering SI_END_CF"Matt Arsenault2019-08-208-307/+84
| | | | | | | This reverts r367500 and r369203. This is causing various test failures. llvm-svn: 369417
* bump lld version used by buildbotsEric Fiselier2019-08-201-2/+2
| | | | llvm-svn: 369416
* [Attr] Support _attribute__ ((fallthrough))Nathan Huckleberry2019-08-208-57/+110
| | | | | | | | | | | | | | | | Summary: Fixed extraneous matches of non-NullStmt Reviewers: aaron.ballman, rsmith, efriedma, xbolva00 Reviewed By: aaron.ballman, rsmith, xbolva00 Subscribers: riccibruno, arphaman, ziangwan, ojeda, xbolva00, nickdesaulniers, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64838 llvm-svn: 369414
* [libc++] fix test for unsigned charZoe Carver2019-08-201-1/+7
| | | | | | | | | On some systems char is unsigned. If that is the case, we will now test signed char twice in std::abs. NFC. Fixes the build bots. llvm-svn: 369413
* [X86][BtVer2] Use ReadAfterLd entries for the register operands of CMPXCHG.Andrea Di Biagio2019-08-202-3/+298
| | | | | | This is a follow-up of r369365. llvm-svn: 369412
* [InstCombine] make fold for icmp with sext more efficient; NFCSanjay Patel2019-08-201-13/+7
| | | | | | | We were creating 2 instructions and relying on a subsequent fold to invert a not(icmp). Create the final icmp directly instead. llvm-svn: 369411
* [X86] Use isNullConstant instead of getConstantOperandVal == 0. NFCCraig Topper2019-08-201-2/+2
| | | | llvm-svn: 369410
* [libc++] Disable <chrono> ""d and ""y literal tests on AppleClang 10.0.0Louis Dionne2019-08-202-0/+2
| | | | | | | | In r368882, I enabled those tests for all AppleClang's above version 9. However, it turns out that the feature is only supported starting with AppleClang 10.0.1, not AppleClang 10.0.0. This commit fixes that hole. llvm-svn: 369409
* [LifetimeAnalysis] Add support for free functionsGabor Horvath2019-08-202-4/+57
| | | | | | Differential Revision: https://reviews.llvm.org/D66303 llvm-svn: 369408
* Make the FindTypes(std::vector<CompilerContext>, ...) API testable in lldb-testAdrian Prantl2019-08-203-3/+87
| | | | | | | | | | | | | This adds a -compiler-context=<...> option to lldb-test that trakes a comma-separated string that is a list of kind/name pairs and translates it into a std::vector<CompilerContext>, a CompilerContext being a pair of context-kind and name. Differential Revision: https://reviews.llvm.org/D66453 <rdar://problem/54471165> llvm-svn: 369407
* [libc++] Populate a lit feature including the compiler patch levelLouis Dionne2019-08-201-1/+3
| | | | | | | | | | | | | | If the compiler is (for example) AppleClang 10.0.1, we would previously populate the following lit features: apple-clang apple-clang-10 apple-clang-10.0 This patch additionally populates a feature called 'apple-clang-10.0.1', which allows more precise enabling/disabling of tests. llvm-svn: 369406
* [CodeGen] Add EarlyIfConvert test missed in previous commitThomas Raoux2019-08-201-0/+81
| | | | llvm-svn: 369405
* [ARM] Select vaddvaSam Tebbs2019-08-202-2/+84
| | | | | | | | This patch adds vaddva selection. Differential revision: https://reviews.llvm.org/D66410 llvm-svn: 369404
* [GlobalISel] Handle multiple registers in dbg.value intrinsicAditya Nandakumar2019-08-202-6/+43
| | | | | | | | | | | | | | | | https://reviews.llvm.org/D66077 The value passed into dbg.value may relate to multiple registers, each of which need a DBG_VALUE. This fix calls MIRBuilder.buildDirectDbgValue for each register. Without this, IR passed in from flang-compiler/flang may fail an assertion in getOrCreateVReg. Patch by : peterwaller-arm. llvm-svn: 369403
* win: Enable /Zc:twoPhase by default if targeting MSVC 2017 update 3 or newerNico Weber2019-08-204-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | MSVC 2017 update 3 (_MSC_VER 1911) enables /Zc:twoPhase by default, and so should clang-cl: https://docs.microsoft.com/en-us/cpp/build/reference/zc-twophase clang-cl takes the MSVC version it emulates from the -fmsc-version flag, or if that's not passed it tries to check what the installed version of MSVC is and uses that, and failing that it uses a default version that's currently 1911. So this changes the default if no -fmsc-version flag is passed and no installed MSVC is detected. (It also changes the default if -fmsc-version is passed or MSVC is detected, and either indicates _MSC_VER >= 1911.) As mentioned in the MSDN article, the Windows SDK header files in version 10.0.15063.0 (Creators Update or Redstone 2) and earlier versions do not work correctly with /Zc:twoPhase. If you need to use these old SDKs with a new clang-cl, explicitly pass /Zc:twoPhase- to get the old behavior. Fixes PR43032. Differential Revision: https://reviews.llvm.org/D66394 llvm-svn: 369402
* gn build: Merge r369298Nico Weber2019-08-201-0/+1
| | | | llvm-svn: 369401
* [scudo][standalone] Fix malloc_iterateKostya Kortchinsky2019-08-203-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: cferris's Bionic tests found an issue in Scudo's `malloc_iterate`. We were inclusive of both boundaries, which resulted in a `Block` that was located on said boundary to be possibly accounted for twice, or just being accounted for while iterating on regions that are not ours (usually the unmapped ones in between Primary regions). The fix is to exclude the upper boundary in `iterateOverChunks`, and add a regression test. This additionally corrects a typo in a comment, and change the 64-bit Primary iteration function to not assume that `BatchClassId` is 0. Reviewers: cferris, morehouse, hctim, vitalybuka, eugenis Reviewed By: hctim Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D66231 llvm-svn: 369400
* Fix availability of __thread_id on builds with external threading. Reviewed ↵Marshall Clow2019-08-201-8/+11
| | | | | | as https://reviews.llvm.org/D66480 llvm-svn: 369399
* [lldb] Use the new Regex::isValid() with no parameterJan Kratochvil2019-08-201-4/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D66463 llvm-svn: 369398
* [clang] Use the new Regex::isValid() with no parameterJan Kratochvil2019-08-201-2/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D66463 llvm-svn: 369397
* Regex: Add isValid() with no parameterJan Kratochvil2019-08-201-0/+1
| | | | | | | | | There will be some performance (only a little) improvement for LLDB's RegularExpression::Execute. Differential Revision: https://reviews.llvm.org/D66463 llvm-svn: 369396
* [CodeGen] Add a pass to do block predication on SSA machine IR.Thomas Raoux2019-08-204-49/+290
| | | | | | | | | | | | | For targets requiring aggressive scheduling and/or software pipeline we need to apply predication before preRA scheduling. This adds a pass re-using the early if-cvt infrastructure but generating predicated instructions instead of speculatively executing instructions. It allows doing if conversion on blocks containing instructions with side-effects. The pass re-use the target hook from postRA if-conversion to let the target decide on the heuristic to apply. Differential Revision: https://reviews.llvm.org/D66190 llvm-svn: 369395
* [libc++] std::abs should not return doubleZoe Carver2019-08-203-1/+98
| | | | | | | | Implement LWG Issue 2735 by adding std::abs tests for several types and checking their return value. NFC. llvm-svn: 369394
* [libc++] Explicitly cast in generate_canonicalLouis Dionne2019-08-201-1/+1
| | | | | | | | | | A new clang warning introduced in r367497 was complaining about the change in value. Thanks to Brian Cain for the patch. Differential Revision: https://reviews.llvm.org/D66422 llvm-svn: 369393
* [llvm-objcopy][test] Add a test to show that argv[0] is included in ↵Fangrui Song2019-08-201-0/+20
| | | | | | | | | | | | error/warning messages test/llvm-objcopy/ELF/error-format.test is similar to test/llvm-readobj/error-format.test added in D66425. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D66476 llvm-svn: 369392
* [llvm-objcopy] Append '\n' to warning messagesFangrui Song2019-08-202-4/+5
| | | | | | | | | | | | | Currently the warning message of `llvm-strip %t.o %t.o` does not include the trailing newline. Fix this by appending a '\n'. This is the only warning llvm-objcopy and llvm-strip can issue. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D66475 llvm-svn: 369391
* [InstCombine] improve readability for icmp with cast folds; NFCSanjay Patel2019-08-202-47/+42
| | | | | | | | 1. Update function name and stale code comments. 2. Use variable names that are less ambiguous. 3. Move operand checks into the function as early exits. llvm-svn: 369390
* [BlockExtractor] Avoid assert with wrong line formatJinsong Ji2019-08-202-0/+11
| | | | | | | | | | | | | | | | | | | | | Summary: When the line format is wrong, we may end up accessing out of bound memory. eg: the test with invalide line will cause assert. Assertion `idx < size()' failed The fix is to report fatal when we found mismatched line format. Reviewers: qcolombet, volkan Reviewed By: qcolombet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66444 llvm-svn: 369389
* [X86][BtVer2] Fix latency and throughput of atomic INC/DEC/NEG/NOT.Andrea Di Biagio2019-08-202-33/+47
| | | | | | | | | Latency and throughput of LOCK INC/DEC/NEG/NOT is always 19cy. Number of uOPs is still 1. Differential Revision: https://reviews.llvm.org/D66469 llvm-svn: 369388
* [clangd] Fix one testcase in XRefsTests.Haojian Wu2019-08-202-20/+30
| | | | | | | | | | | | | | | | | | Summary: The test didn't test anything actually -- it used "[]" as annotation which should be "[[]]". This patch also fixes a bug in XRef where we may return duplicated refs. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66349 llvm-svn: 369387
* [InstCombine] simplify min/max of min/max with same operands (PR35607)Sanjay Patel2019-08-202-96/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the original integer variant requested in: https://bugs.llvm.org/show_bug.cgi?id=35607 As noted in the TODO and several similar TODOs around this block, we could do this in instsimplify, but then it would cost more because we would be trying to match min/max via ValueTracking in 2 different places. There are 4 commuted variants for each of smin/smax/umin/umax that are not matched here. There are also icmp predicate variants that are not included in the affected test file because they are already handled by instsimplify by folding the final icmp to true/false. https://rise4fun.com/Alive/3KVc Name: smax(smax, smin) %c1 = icmp slt i32 %x, %y %c2 = icmp slt i32 %y, %x %min = select i1 %c1, i32 %x, i32 %y %max = select i1 %c2, i32 %x, i32 %y %c3 = icmp sgt i32 %max, %min %r = select i1 %c3, i32 %max, i32 %min => %r = %max Name: smin(smax, smin) %c1 = icmp slt i32 %x, %y %c2 = icmp slt i32 %y, %x %min = select i1 %c1, i32 %x, i32 %y %max = select i1 %c2, i32 %x, i32 %y %c3 = icmp sgt i32 %max, %min %r = select i1 %c3, i32 %min, i32 %max => %r = %min Name: umax(umax, umin) %c1 = icmp ult i32 %x, %y %c2 = icmp ult i32 %y, %x %min = select i1 %c1, i32 %x, i32 %y %max = select i1 %c2, i32 %x, i32 %y %c3 = icmp ult i32 %min, %max %r = select i1 %c3, i32 %max, i32 %min => %r = %max Name: umin(umax, umin) %c1 = icmp ult i32 %x, %y %c2 = icmp ult i32 %y, %x %min = select i1 %c1, i32 %x, i32 %y %max = select i1 %c2, i32 %x, i32 %y %c3 = icmp ult i32 %min, %max %r = select i1 %c3, i32 %min, i32 %max => %r = %min llvm-svn: 369386
* [Syntax] Added function to get macro expansion tokens to TokenBuffer.Johan Vikstrom2019-08-203-0/+48
| | | | | | | | | | | | | | | | Summary: Returns the first token in every mapping where the token is an identifier. This API is required to be able to highlight macro expansions in clangd. Reviewers: hokein, ilya-biryukov Subscribers: kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66470 llvm-svn: 369385
OpenPOWER on IntegriCloud