summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [GlobalISel][NFC] Regression test cases for aarch64 legalizer (s128 sext+icmp).Puyan Lotfi2019-09-012-0/+32
| | | | | | | | There were legalizer asserts in aarch64 globalisel (in debug mode) with s128 sext+icmp before r367060 and r366943 landed. These are just a couple reduced mir and ir regression tests that came from a build where these were encountered. llvm-svn: 370602
* [X86] Replace some COPY_TO_REGCLASS from GR32/GR64 to VR128 in isel patterns ↵Craig Topper2019-08-311-22/+18
| | | | | | | | | | with VMOVDI2PDIrr/VMOV64toPQIrr. This is what the copies will eventually be turned into. We don't use COPY_TO_REGCLASS for scalar_to_vector patterns. So we should use the real instruction here too. llvm-svn: 370601
* [X86] Compress the flag bits in the folding tables to make room for more ↵Craig Topper2019-08-312-13/+18
| | | | | | bits in an upcoming patch. llvm-svn: 370600
* [libc++] Fix directory_iterator compilation on Win32Nico Weber2019-08-311-6/+6
| | | | | | | | | | | | This patch fixes some typos and other small errors in directory_iterator.cpp that prevented this file from being compiled for Win32. Patch by Stefan Schmidt <thrimbor.github@gmail.com>! Differential Revision: https://reviews.llvm.org/D66986 llvm-svn: 370599
* [clang] Devirtualization for classes with destructors marked as 'final'David Bolvansky2019-08-312-3/+21
| | | | | | | | | | | A class with a destructor marked final cannot be derived from, so it should afford the same devirtualization opportunities as marking the entire class final. Patch by logan-5 (Logan Smith) Reviewed by rsmith Differential Revision: https://reviews.llvm.org/D66621 llvm-svn: 370597
* [NFC] Fixed -Wdocumentation warningDavid Bolvansky2019-08-311-8/+8
| | | | | | | /srv/llvm-buildbot-srcatch/llvm-build-dir/clang-x86_64-debian-fast/llvm.src/lib/Target/AMDGPU/AMDGPUGenRegisterBankInfo.def:98:1: warning: not a Doxygen trailing comment [-Wdocumentation] 1 warning generated. llvm-svn: 370596
* [NFC] Fix for rL370594David Bolvansky2019-08-312-0/+6
| | | | llvm-svn: 370595
* [clang] Warning for non-final classes with final destructorsDavid Bolvansky2019-08-313-0/+31
| | | | | | | | | | | | Marking a class' destructor final prevents the class from being inherited from. However, it is a subtle and awkward way to express that at best, and unintended at worst. It may also generate worse code (in other compilers) than marking the class itself final. For these reasons, this revision adds a warning for nonfinal classes with final destructors, with a note to suggest marking the class final to silence the warning. See https://reviews.llvm.org/D66621 for more background. Patch by logan-5 (Logan Smith) Differential Revision: https://reviews.llvm.org/D66711 llvm-svn: 370594
* [InstCombine] mempcpy(d,s,n) to memcpy(d,s,n) + nDavid Bolvansky2019-08-313-6/+43
| | | | | | | | | | | | | | | | | | | | Summary: Back-end currently expands mempcpy, but middle-end should work with memcpy instead of mempcpy to enable more memcpy-optimization. GCC backend emits mempcpy, so LLVM backend could form it too, if we know mempcpy libcall is better than memcpy + n. https://godbolt.org/z/dOCG96 Reviewers: efriedma, spatel, craig.topper, RKSimon, jdoerfert Reviewed By: efriedma Subscribers: hjl.tools, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65737 llvm-svn: 370593
* [X86] EltsFromConsecutiveLoads - Don't confuse elt count with vector element ↵Simon Pilgrim2019-08-312-11/+54
| | | | | | | | count (PR43170) EltsFromConsecutiveLoads was assuming that the number of input elts was the same as the number of elements in the output vector type when creating a zeroing shuffle, causing an assert when subvectors were being combined instead of just scalars. llvm-svn: 370592
* [X86][AVX512] Regenerate tests with common prefixesSimon Pilgrim2019-08-311-723/+322
| | | | llvm-svn: 370591
* [AArch64][x86] increase value type coverage in tests; NFCSanjay Patel2019-08-312-109/+127
| | | | | | This goes with D67021. llvm-svn: 370590
* Fix shadow variable warning by making CondCodes names more explicit. NFCI.Simon Pilgrim2019-08-311-10/+10
| | | | llvm-svn: 370589
* Revert [Clang Interpreter] Initial patch for the constexpr interpreterNandor Licker2019-08-3168-8989/+386
| | | | | | This reverts r370584 (git commit afcb3de117265a69d21e5673356e925a454d7d02) llvm-svn: 370588
* [DAGCombiner] clean up code in visitShiftByConstant()Sanjay Patel2019-08-311-25/+20
| | | | | | | This is not quite NFC because the SDLoc propagation is changed, but there are no regression test diffs from that. llvm-svn: 370587
* Fix shadow variable warning. NFCI.Simon Pilgrim2019-08-311-2/+2
| | | | llvm-svn: 370585
* [Clang Interpreter] Initial patch for the constexpr interpreterNandor Licker2019-08-3168-386/+8989
| | | | | | | | | | | | | | | | | | Summary: This patch introduces the skeleton of the constexpr interpreter, capable of evaluating a simple constexpr functions consisting of if statements. The interpreter is described in more detail in the RFC. Further patches will add more features. Reviewers: Bigcheese, jfb, rsmith Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64146 llvm-svn: 370584
* [X86ISelLowering] combineCMov - cleanup CMOV->LEA codegen. NFCI.Simon Pilgrim2019-08-311-5/+5
| | | | | | Only compute the diff once and we don't need the truncation code (assert the bitwidth is correct just to be safe). llvm-svn: 370583
* [X86ISelLowering] LowerSELECT - remove duplicate value type. NFCI.Simon Pilgrim2019-08-311-2/+0
| | | | | | VT of SELECT result and selection ops will be the same. llvm-svn: 370581
* Fix cppcheck shadow variable and variable scope warnings. NFCI.Simon Pilgrim2019-08-311-6/+5
| | | | llvm-svn: 370580
* [DAGCombiner] Match (add X, X) as (shl X, 1) when detecting rotate.Amaury Sechet2019-08-313-25/+35
| | | | | | | | | | | | | | Summary: The combiner transforms (shl X, 1) into (add X, X). Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66882 llvm-svn: 370578
* [llvm-objcopy] Simplify alignToAddr with llvm::alignToFangrui Song2019-08-311-15/+2
| | | | llvm-svn: 370577
* [DAGCombiner] Don't create illegal narrow storesJames Molloy2019-08-311-2/+7
| | | | | | | | | | | | | Narrowing stores when the target doesn't support the narrow version forces the target to expand into a load-modify-store sequence, which is highly suboptimal. The information narrowing throws away (legality of the inverse transform) is hard to re-analyze. If the target doesn't support a store of the narrow type, don't narrow even in pre-legalize mode. No test as this is DAGCombiner and depends on target bits. llvm-svn: 370576
* [LVI] Extract solveBlockValueExtractValue(); NFCNikita Popov2019-08-311-3/+15
| | | | | | | Extract this method in preparation for additional extractvalue support. llvm-svn: 370575
* [CVP] Add tests for simplified with.overflow + icmp; NFCNikita Popov2019-08-311-0/+278
| | | | | | These tests are based on D19867. llvm-svn: 370574
* [CVP] Generate simpler code for elided with.overflow intrinsicsNikita Popov2019-08-312-114/+103
| | | | | | | | | | Use a { iN undef, i1 false } struct as the base, and only insert the first operand, instead of using { iN undef, i1 undef } as the base and inserting both. This is the same as what we do in InstCombine. Differential Revision: https://reviews.llvm.org/D67034 llvm-svn: 370573
* [lldb] Unify target checking in CommandObjectRaphael Isemann2019-08-319-800/+669
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently have several CommandObjects that manually reimplement the checking for a selected target or a target in the execution context (which is the selected target when they are invoked). This patch removes all these checks and replaces them by setting the eCommandRequiresTarget flag that Pavel suggested. With this flag we are doing the same check but without having to duplicate this code in all these CommandObjects. I also added a `GetSelectedTarget()` variant of the `GetSelectedOrDummyTarget()` function to the CommandObject that checks that the flag is set and then returns a reference to the target. I didn't rewrite all the `target` variables from `Target *` to `Target &` in this patch as last time this change caused a lot of merge conflicts in Swift and I would prefer having that in a separate NFC commit. Reviewers: labath, clayborg Reviewed By: labath, clayborg Subscribers: clayborg, JDevlieghere, jingham, amccarth, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66863 llvm-svn: 370571
* [lldb][NFC] Remove unused prompt variable in TestMultilineCompletion.pyRaphael Isemann2019-08-311-2/+0
| | | | llvm-svn: 370570
* [CodeGen] Refactor DAGTypeLegalizer::ExpandIntRes_MULFIX. NFCBjorn Pettersson2019-08-311-87/+92
| | | | | | | | | Restructured the code a little bit in preparation for adding UMULFIXSAT. I think it will be easier to understand the code if not interleaving the codegen for signed/unsigned/saturated cases that much. llvm-svn: 370569
* [LangRef] Update saturating examples for llvm.smul.fix.sat. NFCBjorn Pettersson2019-08-311-3/+3
| | | | | | | | Some saturation examples for llvm.smul.fix.sat were not showing the correct result. I've adjusted the operands to make sure that we actually trigger overflow in those examples. llvm-svn: 370566
* Fix some errors introduced by rL370563 which were not exposed on my local ↵Wei Mi2019-08-313-3/+4
| | | | | | | | | machine. 1. zlib::compress accept &size_t but the param is an uint64_t. 2. Some systems don't have zlib installed. Don't use compression by default. llvm-svn: 370564
* [SampleFDO] Add profile symbol list section to discriminate function beingWei Mi2019-08-3117-26/+484
| | | | | | | | | | | | | | | | | | | cold versus function being newly added. This is the second half of https://reviews.llvm.org/D66374. Profile symbol list is the collection of function symbols showing up in the binary which generates the current profile. It is used to discriminate function being cold versus function being newly added. Profile symbol list is only added for profile with ExtBinary format. During profile use compilation, when profile-sample-accurate is enabled, a function without profile will be regarded as cold only when it is contained in that list. Differential Revision: https://reviews.llvm.org/D66766 llvm-svn: 370563
* Introduce a DirectoryEntryRef that stores both a reference and anAlex Lorenz2019-08-3110-41/+87
| | | | | | | | | | | | | | accessed name to the directory entry This commit introduces a parallel API that returns a DirectoryEntryRef to the FileManager, similar to the parallel FileEntryRef API. All uses will have to be update in follow-up patches. The immediate use of the new API in this patch fixes the issue where a file manager was reused in clang-scan-deps, but reported an different file path whenever a framework lookup was done through a symlink. Differential Revision: https://reviews.llvm.org/D67026 llvm-svn: 370562
* llvm-dwarfdump: Cache CU low_pc when computing statistics.David Blaikie2019-08-311-6/+6
| | | | llvm-svn: 370559
* [c++20] Add support for designated direct-list-initialization syntax.Richard Smith2019-08-316-5/+83
| | | | | | This completes the implementation of P0329R4. llvm-svn: 370558
* [WebAssembly] Add SIMD QFMA/QFMSThomas Lively2019-08-317-2/+146
| | | | | | | | | | | | | | | | | | | Summary: Adds clang builtins and LLVM intrinsics for these experimental instructions. They are not implemented in engines yet, but that is ok because the user must opt into using them by calling the builtins. Reviewers: aheejin, dschuff Reviewed By: aheejin Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D67020 llvm-svn: 370556
* [c++20] Disallow template argument deduction from a braced-init-listRichard Smith2019-08-313-2/+32
| | | | | | | | | | | | containing designators. The C++20 wording doesn't actually say what happens in this case, but treating this as a non-deduced context seems like the most natural behavior. (We might want to consider deducing through array designators as an extension in the future, but will need to be careful to deduce the array bound properly if we do so. That's not permitted herein.) llvm-svn: 370555
* Revert "Add gdb pretty printers for a wide variety of libc++ data structures."Sterling Augustine2019-08-313-1735/+0
| | | | | | This reverts commit d8c9f2f572fe06a34ccfc28ee9223b64d7d275d3. llvm-svn: 370553
* [test] Make sys.stdout compatible with both Python 2 & 3Jonas Devlieghere2019-08-301-1/+2
| | | | | | This time's the charm. llvm-svn: 370552
* Add gdb pretty printers for a wide variety of libc++ data structures.Sterling Augustine2019-08-303-0/+1735
| | | | | | | | | | | | | | | | | | | | Summary: Also add a test suite. Reviewers: EricWF Subscribers: christof, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65609 Run a pep8 formatter. Run pep8 formatter. Convert to PEP8, address other comments from code review. llvm-svn: 370551
* Revert "[lld-link] implement -start-lib and -end-lib"Vlad Tsyrklevich2019-08-3015-316/+70
| | | | | | | This reverts commit r370487 as it is causing ASan/MSan failures on sanitizer-x86_64-linux-fast llvm-svn: 370550
* [lit] Only set DYLD_LIBRARY_PATH for shared buildsJonas Devlieghere2019-08-304-9/+9
| | | | | | | | | | | | In r370135 I committed a temporary workaround for the sanitized bot to not set (DY)LD_LIBRARY_PATH when (DY)LD_INSERT_LIBRARIES was set. Setting (DY)LD_LIBRARY_PATH is only necessary for (standalone) shared-library builds, so a better solution is to only set the environment variable when necessary. Differential revision: https://reviews.llvm.org/D67012 llvm-svn: 370549
* [MemorySSA] Rename all phi entries.Alina Sbirlea2019-08-302-3/+59
| | | | | | | When renaming Phis incoming values, there may be multiple edges incoming from the same block (switch). Rename all. llvm-svn: 370548
* [GVN] Verify value equality before doing phi translation for call instructionWei Mi2019-08-303-1/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | This is an updated version of https://reviews.llvm.org/D66909 to fix PR42605. Basically, current phi translatation translates an old value number to an new value number for a call instruction based on the literal equality of call expression, without verifying there is no clobber in between. This is incorrect. To get a finegrain check, use MachineDependence analysis to do the job. However, this is still not ideal. Although given a call instruction, `MemoryDependenceResults::getCallDependencyFrom` returns identical call instructions without clobber in between using MemDepResult with its DepType to be `Def`. However, identical is too strict here and we want it to be relaxed a little to consider phi-translation -- callee is the same, param operands can be different. That means changing the semantic of `MemDepResult::Def` and I don't know the potential impact. So currently the patch is still conservative to only handle MemDepResult::NonFuncLocal, which means the current call has no function local clobber. If there is clobber, even if the clobber doesn't stand in between the current call and the call with the new value, we won't do phi-translate. Differential Revision: https://reviews.llvm.org/D67013 llvm-svn: 370547
* ASTReader: Bypass overridden files when reading PCHsDuncan P. N. Exon Smith2019-08-306-37/+116
| | | | | | | | | | | | | | | | | | | | | If contents of a file that is part of a PCM are overridden when reading it, but weren't overridden when the PCM was being built, the ASTReader will emit an error. Now it creates a separate FileEntry for recovery, bypassing the overridden content instead of discarding it. The pre-existing testcase clang/test/PCH/remap-file-from-pch.cpp confirms that the new recovery method works correctly. This resolves a long-standing FIXME to avoid hypothetically invalidating another precompiled module that's already using the overridden contents. This also removes ContentCache-related API that would be unsafe to use across `CompilerInstance`s in an implicit modules build. This helps to unblock us sinking it from SourceManager into FileManager in the future, which would allow us to delete `InMemoryModuleCache`. https://reviews.llvm.org/D66710 llvm-svn: 370546
* [test] Fix 'argument must be str, not bytes' for Python 3.Jonas Devlieghere2019-08-301-2/+2
| | | | | | Use `sys.stdout.buffer` instead of `sys.stdout` in lldbpexpect.py. llvm-svn: 370545
* [c++20] Implement semantic restrictions for C++20 designatedRichard Smith2019-08-3029-166/+513
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializers. This has some interesting interactions with our existing extensions to support C99 designated initializers as an extension in C++. Those are resolved as follows: * We continue to permit the full breadth of C99 designated initializers in C++, with the exception that we disallow a partial overwrite of an initializer with a non-trivially-destructible type. (Full overwrite is OK, because we won't run the first initializer at all.) * The C99 extensions are disallowed in SFINAE contexts and during overload resolution, where they could change the meaning of valid programs. * C++20 disallows reordering of initializers. We only check for that for the simple cases that the C++20 rules permit (designators of the form '.field_name =' and continue to allow reordering in other cases). It would be nice to improve this behavior in future. * All C99 designated initializer extensions produce a warning by default in C++20 mode. People are going to learn the C++ rules based on what Clang diagnoses, so it's important we diagnose these properly by default. * In C++ <= 17, we apply the C++20 rules rather than the C99 rules, and so still diagnose C99 extensions as described above. We continue to accept designated C++20-compatible initializers in C++ <= 17 silently by default (but naturally still reject under -pedantic-errors). This is not a complete implementation of P0329R4. In particular, that paper introduces new non-C99-compatible syntax { .field { init } }, and we do not support that yet. This is based on a previous patch by Don Hinton, though I've made substantial changes when addressing the above interactions. Differential Revision: https://reviews.llvm.org/D59754 llvm-svn: 370544
* Fix SEH_NoReturn machine verifier errorReid Kleckner2019-08-301-1/+1
| | | | llvm-svn: 370543
* [MC] Avoid crashes from improperly nested or wrong target .seh_handlerdata ↵Reid Kleckner2019-08-304-3/+14
| | | | | | directives llvm-svn: 370540
* Revert [Clang Interpreter] Initial patch for the constexpr interpreterNandor Licker2019-08-3065-8946/+384
| | | | | | This reverts r370531 (git commit d4c1002e0bbbbab50f6891cdd2f5bd3a8f3a3584) llvm-svn: 370535
OpenPOWER on IntegriCloud