summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Force libcompression calls to be enabled when building on DarwinJason Molenda2018-12-184-74/+53
| | | | | | | | | | | | | | | | systems. It has been available in the OS over over three years now. If lldb doesn't link against -lcompression, it should be an error. Allocate a scratch buffer for libcompression to use when decoding packets, instead of it having to allocate & free one on every call. Fix a typeo with the size of the buffer that compression_decode_buffer() is expanding into. <rdar://problem/41601084> llvm-svn: 349563
* [lit] Use the new build.py script in the lldb-mi testsStella Stamenova2018-12-1813-46/+15
| | | | | | This allows the tests to pass on Windows as well llvm-svn: 349562
* Emit ASM input in a constant contextBill Wendling2018-12-184-10/+26
| | | | | | | | | | | | | | | | | Summary: Some ASM input constraints (e.g., "i" and "n") require immediate values. At O0, very few code transformations are performed. So if we cannot resolve to an immediate when emitting the ASM input we shouldn't delay its processing. Reviewers: rsmith, efriedma Reviewed By: efriedma Subscribers: rehana, efriedma, craig.topper, jyknight, cfe-commits Differential Revision: https://reviews.llvm.org/D55616 llvm-svn: 349561
* [InstCombine] add tests for extract of vector load; NFCSanjay Patel2018-12-181-0/+57
| | | | | | | | | | There's a mismatch internally about how we are handling these patterns. We count loads as cheapToScalarize(), but then we don't actually scalarize them, so that can leave extra instructions compared to where we started when scalarizing other ops. If it's cheapToScalarize, then we should be scalarizing. llvm-svn: 349560
* Preserve the linkage for objc* intrinsics as clang will set them to ↵Pete Cooper2018-12-182-6/+35
| | | | | | | | | | weak_external in some cases Clang uses weak linkage for objc runtime functions when they are not available on the platform. The intrinsic has this linkage so we just need to pass that on to the runtime call. llvm-svn: 349559
* Add nonlazybind to objc_retain/objc_release when converting from intrinsics.Pete Cooper2018-12-182-3/+15
| | | | | | | | For performance reasons, clang set nonlazybind on these functions. Now that we are using intrinsics instead of runtime calls, we should set this attribute when creating the runtime functions. llvm-svn: 349558
* Reject .so files if -static is given.Rui Ueyama2018-12-183-2/+14
| | | | | | | | | | Previously, if you pass -static to lld, lld searches for only foo.a and skips foo.so for -lfoo option. However, it didn't reject .so files if you directly pass their pathnames via the command line, which is a bug. Differential Revision: https://reviews.llvm.org/D55845 llvm-svn: 349557
* [LAA] Introduce enum for vectorization safety status (NFC).Florian Hahn2018-12-183-13/+76
| | | | | | | | | | | | | | This patch adds a VectorizationSafetyStatus enum, which will be extended in a follow up patch to distinguish between 'safe with runtime checks' and 'known unsafe' dependences. Reviewers: anemet, anna, Ayal, hsaito Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D54892 llvm-svn: 349556
* [asan] Restore ODR-violation detection on vtablesVitaly Buka2018-12-183-3/+29
| | | | | | | | | | | | | | | | | | | Summary: unnamed_addr is still useful for detecting of ODR violations on vtables Still unnamed_addr with lld and --icf=safe or --icf=all can trigger false reports which can be avoided with --icf=none or by using private aliases with -fsanitize-address-use-odr-indicator Reviewers: eugenis Reviewed By: eugenis Subscribers: kubamracek, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55799 llvm-svn: 349555
* [LoopVectorize] auto-generate complete checks; NFCSanjay Patel2018-12-181-9/+132
| | | | | | | | | | | The first test claims to show that the vectorizer will generate a vector load/loop, but then this file runs other passes which might scalarize that op. I'm removing instcombine from the RUN line here to break that dependency. Also, I'm generating full checks to make it clear exactly what the vectorizer has done. llvm-svn: 349554
* Un-conditionalize use of libcompression. debugserver only buildsJason Molenda2018-12-182-151/+54
| | | | | | | | | | | | | | | | | | | | on Darwin systems and libcompression has been in the OS for over three years. Remove use of / linking to zlib. We'll always have libcompression available now. Create a scratch buffer via compression_encode_scratch_buffer_size() and use it in calls to compression_encode_buffer() to avoid compression_encode_buffer having to malloc & free a scratch buffer on each call. Tested by forcing compression to be enabled on macos native (normally only enabled on iOS et al devices), running the testsuite. <rdar://problem/41601084> llvm-svn: 349553
* Rewrite objc intrinsics to runtime methods in PreISelIntrinsicLowering ↵Pete Cooper2018-12-186-286/+399
| | | | | | | | | | instead of SDAG. SelectionDAG currently changes these intrinsics to function calls, but that won't work for other ISel's. Also we want to eventually support nonlazybind and weak linkage coming from the front-end which we can't do in SelectionDAG. llvm-svn: 349552
* [OPENMP] parsing and sema support for 'close' map-type-modifierKelvin Li2018-12-1827-182/+479
| | | | | | | | | | | | A map clause with the close map-type-modifier is a hint to prefer that the variables are mapped using a copy into faster memory. Patch by Ahsan Saghir (saghir) Differential Revision: https://reviews.llvm.org/D55719 llvm-svn: 349551
* TestHelloWorld: Use a file on the target platform for synchronisation.Adrian Prantl2018-12-182-19/+29
| | | | | | Thanks to Pavel Labath for the idea! llvm-svn: 349550
* [AArch64] Avoid crashing on .seh directives in assemblyMartin Storsjo2018-12-182-4/+88
| | | | | | Differential Revision: https://reviews.llvm.org/D55670 llvm-svn: 349549
* [InstCombine] auto-generate complete checks; NFCSanjay Patel2018-12-181-12/+25
| | | | llvm-svn: 349548
* Fix errors with the Clang natvis file.Aaron Ballman2018-12-181-23/+30
| | | | | | | | This updates the FunctionProtoType visualizer to use the proper bits for determining parameter information and the DeclarationName visualizer to use the detail namespace. It also adds support for viewing newer special declaration names (like deduction guides). Patch with help of Bruno Ricci. llvm-svn: 349547
* [CMake] Don't require libcxxabi on darwinJonas Devlieghere2018-12-181-1/+0
| | | | | | Just libcxx should suffice. llvm-svn: 349546
* Revert r349541 (Fix MSVC dependency issue between Clang-tablegen and ↵Alexandre Ganea2018-12-181-6/+0
| | | | | | LLVM-tablegen) llvm-svn: 349545
* [asan] In llvm.asan.globals, allow entries to be non-GlobalVariable and skip ↵Kuba Mracek2018-12-182-1/+17
| | | | | | | | | | over them Looks like there are valid reasons why we need to allow bitcasts in llvm.asan.globals, see discussion at https://github.com/apple/swift-llvm/pull/133. Let's look through bitcasts when iterating over entries in the llvm.asan.globals list. Differential Revision: https://reviews.llvm.org/D55794 llvm-svn: 349544
* [AARCH64] Added test case for PR40091Simon Pilgrim2018-12-181-0/+22
| | | | llvm-svn: 349543
* [CodeGen] Handle mixed-width ops in mixed-sign mul-with-overflow loweringVedant Kumar2018-12-182-5/+35
| | | | | | | | | | | | | | | | | | | | | | The special lowering for __builtin_mul_overflow introduced in r320902 fixed an ICE seen when passing mixed-sign operands to the builtin. This patch extends the special lowering to cover mixed-width, mixed-sign operands. In a few common scenarios, calls to muloti4 will no longer be emitted. This should address the latest comments in PR34920 and work around the link failure seen in: https://bugzilla.redhat.com/show_bug.cgi?id=1657544 Testing: - check-clang - A/B output comparison with: https://gist.github.com/vedantk/3eb9c88f82e5c32f2e590555b4af5081 Differential Revision: https://reviews.llvm.org/D55843 llvm-svn: 349542
* Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegenAlexandre Ganea2018-12-181-0/+6
| | | | | | | | | Previously, when compiling Visual Studio targets, one could see random build errors. This was caused by tablegen projects using the same build folders. This workaround simply chains tablegen projects. Differential Revision: https://reviews.llvm.org/D54153 llvm-svn: 349541
* [OPENMP][NVPTX]Emit shared memory buffer for reduction as 128 bytesAlexey Bataev2018-12-1811-11/+27
| | | | | | | | | | | buffer. Seems to me, nvlink has a bug with the proper support of the weakly linked symbols. It does not allow to define several shared memory buffer with the different sizes even with the weak linkage. Instead we always use 128 bytes buffer to prevent nvlink from the error message emission. llvm-svn: 349540
* [cmake] Make libcxx(abi) a dependency when building in-tree clang for macOSJonas Devlieghere2018-12-181-0/+4
| | | | | | | | | | | | | As discussed on IRC this morning, when building an in-tree clang for testing we have to have libcxx and libcxxabi checked out. This is a common pitfall. Not only are the resulting failures non-obvious, they only manifest when running the test suite, *after* building lldb and clang. By making them a hard dependency (on macOS) we fail earlier with a more useful error message. Differential revision: https://reviews.llvm.org/D55837 llvm-svn: 349539
* Reenable FindLibXml2 on Windows and confirm its at least 2.8 or newerNathan Lanza2018-12-181-11/+5
| | | | | | | | | | | | | | | | | | | | | Summary: GnuWin32 installs libxml2 2.4. This isn't recent enough for lldb's usage and thus the build fails. Searching for libxml2 was disabled due to this build failure. However, the gdb-remote plugin requires libxml2 to parse various gdb-remote protocol packets. Thus check and confirm that the libxml2 version is at least 2.8 and disable it if not. Reviewers: compnerd, zturner Reviewed By: compnerd Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D55583 llvm-svn: 349538
* [llvm-mca] Update the Exynos test cases (NFC)Evandro Menezes2018-12-185-49/+60
| | | | | | Add more entropy to the test cases. llvm-svn: 349537
* [llvm-mca] Dump mask in hexEvandro Menezes2018-12-181-2/+4
| | | | | | Dump the resources masks as hexadecimal. llvm-svn: 349536
* Generate objc intrinsics instead of runtime calls as the ARC optimizer now ↵Pete Cooper2018-12-1866-817/+836
| | | | | | | | | works only on intrinsics Differential Revision: https://reviews.llvm.org/D55802 Reviewers: rjmccall llvm-svn: 349535
* Change the objc ARC optimizer to use the new objc.* intrinsicsPete Cooper2018-12-1850-2009/+1944
| | | | | | | | | | | We're moving ARC optimisation and ARC emission in clang away from runtime methods and towards intrinsics. This is the part which actually uses the intrinsics in the ARC optimizer when both analyzing the existing calls and emitting new ones. Differential Revision: https://reviews.llvm.org/D55348 Reviewers: ahatanak llvm-svn: 349534
* Fix REQUIRES lineAdrian Prantl2018-12-181-1/+1
| | | | llvm-svn: 349533
* [SEH] Add initial support for AArch64Martin Storsjo2018-12-183-2/+75
| | | | | | | | | | | | | This doesn't yet implement inspecting the .pdata/.xdata to find the LSDA pointer (in UnwindCursor::getInfoFromSEH), but normal C++ exception handling seems to run just fine without it. (The only place I can see where it's even referenced is in unwind_phase2_forced, and I can't find a codepath where libcxxabi would end up calling that.) Differential Revision: https://reviews.llvm.org/D55674 llvm-svn: 349532
* [X86] Add BSR to isUseDefConvertible.Craig Topper2018-12-182-6/+30
| | | | | | | | We already had BSF here as part of __builtin_ffs improvements and I was just wondering yesterday whether we should have BSR there. This addresses one issue from PR40090. llvm-svn: 349531
* [InstCombine] Simplify cttz/ctlz + icmp eq/ne into mask checkNikita Popov2018-12-183-37/+68
| | | | | | | | | | | | | Checking whether a number has a certain number of trailing / leading zeros means checking whether it is of the form XXXX1000 / 0001XXXX, which can be done with an and+icmp. Related to https://bugs.llvm.org/show_bug.cgi?id=28668. As a next step, this can be extended to non-equality predicates. Differential Revision: https://reviews.llvm.org/D55745 llvm-svn: 349530
* [AMDGPU] Removed the unnecessary operand size-check-assert from ↵Farhana Aleen2018-12-182-2/+36
| | | | | | | | | | processBaseWithConstOffset(). Summary: 32bit operand sizes are guaranteed by the opcode check AMDGPU::V_ADD_I32_e64 and AMDGPU::V_ADDC_U32_e64. Therefore, we don't any additional operand size-check-assert. Author: FarhanaAleen llvm-svn: 349529
* DebugInfo: Fix missing local imported entities after r349207David Blaikie2018-12-182-3/+36
| | | | | | Post commit review/bug reported by Pavel Labath - thanks! llvm-svn: 349528
* [SCCP] Get rid of redundant call for getPredicateInfoFor (NFC).Florian Hahn2018-12-181-1/+1
| | | | | | We can use the result fetched a few lines above. llvm-svn: 349527
* [X86] Don't use SplitOpsAndApply to create ISD::UADDSAT/ISD::USUBSAT nodes. ↵Craig Topper2018-12-181-30/+8
| | | | | | | | Let type legalization and op legalization deal with it. Now that we've switched to target independent nodes we can rely on generic infrastructure to do the legalization for us. llvm-svn: 349526
* [OPENMP][NVPTX]Added extra sync point to the inter-warp copy function.Alexey Bataev2018-12-182-0/+9
| | | | | | | The parallel reduction operation requires an extra synchronization point in the inter-warp copy function to avoid divergence. llvm-svn: 349525
* [ELF] Place .note in the first page to ensure they are available in core filesFangrui Song2018-12-182-21/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Other large sections (e.g. .rela.dyn .dynstr) may push .note.* off the first page. They won't be available in core files if RLIMIT_CORE is limited. This patch gives priority to alloctable SHT_NOTE sections so that they are assuredly in the first page and will be available in core files. They are small and contain important information (e.g. .note.gnu.build-id identifies the origin of the core, .note.tag stores NT_FREEBSD_ABI_TAG). Note: gold Output_section_order has a similar rule: // Loadable read-only note sections come next so that the PT_NOTE // segment is on the first page of the executable. ORDER_RO_NOTE, Reviewers: ruiu, pcc, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D55800 llvm-svn: 349524
* [InstCombine] refactor isCheapToScalarize(); NFCSanjay Patel2018-12-181-33/+25
| | | | | | | | | As the FIXME indicates, this has the potential to go overboard. So I'm not sure if it's even worth keeping this vs. iteratively doing simple matches, but we might as well clean it up. llvm-svn: 349523
* Rework the C strings tests to use ASSERT_SAME_TYPE. NFC there. Also change ↵Marshall Clow2018-12-185-135/+148
| | | | | | cwchar.pass.cpp to avoid constructing a couple things from zero - since apparently they can be enums in some weird C library. NFC there, either, since the values were never used. llvm-svn: 349522
* [Tests] [OpenMP] XFAIL also for ppc64le.Stefan Pintilie2018-12-182-2/+2
| | | | | | | Two tests were XFAILed for powerpc64le in r349512. They should have also been XFAILed for ppc64le. llvm-svn: 349521
* [X86] Use SADDSAT/SSUBSAT instead of ADDS/SUBSNikita Popov2018-12-188-38059/+499
| | | | | | | | | | | | Migrate the X86 backend from X86ISD opcodes ADDS and SUBS to generic ISD opcodes SADDSAT and SSUBSAT. This also improves scodegen for @llvm.sadd.sat() and @llvm.ssub.sat() intrinsics. This is a followup to D55787 and part of PR40056. Differential Revision: https://reviews.llvm.org/D55833 llvm-svn: 349520
* [X86] Create PSUBUS from (add (umax X, C), -C)Craig Topper2018-12-182-310/+146
| | | | | | | | | | | | InstCombine seems to canonicalize or PSUB patter into a max with the cosntant and an add with an inverse of the constant. This patch recognizes this pattern and turns it into PSUBUS. Future work could improve undef element handling. Fixes some of PR40053 Differential Revision: https://reviews.llvm.org/D55780 llvm-svn: 349519
* Buildfix for r345516 (Clang compilation failing).Alexandre Ganea2018-12-181-1/+1
| | | | llvm-svn: 349518
* [CMake] Default options for faster executables on MSVCAlexandre Ganea2018-12-183-0/+21
| | | | | | | | | | - Disable incremental linking by default. /INCREMENTAL adds extra thunks in the EXE, which makes execution slower. - Set /MT (static CRT lib) by default instead of CMake's default /MD (dll CRT lib). The previous default /MD makes all DLL functions to be thunked, thus making execution slower (memcmp, memset, etc.) - Adds LLVM_ENABLE_INCREMENTAL_LINK which is set to OFF by default. Differential revision: https://reviews.llvm.org/D55056 llvm-svn: 349517
* [llvm-symbolizer] Omit stderr output when symbolizing a crashAlexandre Ganea2018-12-181-3/+11
| | | | | | Differential revision: https://reviews.llvm.org/D55723 llvm-svn: 349516
* [InstCombine] add tests for scalarization; NFCSanjay Patel2018-12-181-4/+59
| | | | | | We miss pattern matching a splat constant if it has undef elements. llvm-svn: 349515
* Add FMF management to common fp intrinsics in GlobalIselMichael Berg2018-12-182-38/+66
| | | | | | | | | | | | | | Summary: This the initial code change to facilitate managing FMF flags from Instructions to MI wrt Intrinsics in Global Isel. Eventually the GlobalObserver interface will be added as well, where FMF additions can be tracked for the builder and CSE. Reviewers: aditya_nandakumar, bogner Reviewed By: bogner Subscribers: rovka, kristof.beyls, javed.absar Differential Revision: https://reviews.llvm.org/D55668 llvm-svn: 349514
OpenPOWER on IntegriCloud