summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Print information about various type nodes when dumping the AST to JSON.Aaron Ballman2019-06-216-2243/+2418
| | | | llvm-svn: 364043
* [lldb] [Process] Introduce common helpers to split/recombine YMM dataMichal Gorny2019-06-213-58/+32
| | | | | | | | | | | | | | | | | Introduce two common helpers to take care of splitting and recombining YMM registers to/from XSAVE-like data. Since FreeBSD, Linux and NetBSD all use XSAVE-like data structures but with potentially different field layouts, the function takes two pointers -- to XMM register and to YMM high bits, and copies the data from/to YMMReg type. While at it, remove support for big endian. To mine and Pavel Labath's combined knowledge, there is no such thing on x86. Furthermore, assuming that the YMM register data would be swapped for big endian seems to be a weird assumption. Differential Revision: https://reviews.llvm.org/D63610 llvm-svn: 364042
* [ARM] Add MVE 64-bit GPR <-> vector move instructions.Simon Tatham2019-06-217-0/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These instructions let you load half a vector register at once from two general-purpose registers, or vice versa. The assembly syntax for these instructions mentions the vector register name twice. For the move _into_ a vector register, the MC operand list also has to mention the register name twice (once as the output, and once as an input to represent where the unchanged half of the output register comes from). So we can conveniently assign one of the two asm operands to be the output $Qd, and the other $QdSrc, which avoids confusing the auto-generated AsmMatcher too much. For the move _from_ a vector register, there's no way to get round the fact that both instances of that register name have to be inputs, so we need a custom AsmMatchConverter to avoid generating two separate output MC operands. (And even that wouldn't have worked if it hadn't been for D60695.) Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62679 llvm-svn: 364041
* [ARM] Add MVE vector instructions that take a scalar input.Simon Tatham2019-06-2110-9/+1580
| | | | | | | | | | | | | | | | | | | This adds the `MVE_qDest_rSrc` superclass and all its instances, plus a few other instructions that also take a scalar input register or two. I've also belatedly added custom diagnostic messages to the operand classes for odd- and even-numbered GPRs, which required matching changes in two of the existing MVE assembly test files. Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62678 llvm-svn: 364040
* Fix a crash with assembler source and -g.Paul Robinson2019-06-213-8/+35
| | | | | | | | | | | | | | | llvm-mc or clang with -g normally produces debug info describing the assembler source itself; however, if that source already contains some .file/.loc directives, we should instead emit the debug info described by those directives. For certain assembler sources seen in the wild (particularly in the Chrome build) this was causing a crash due to incorrect assumptions about legal sequences of assembler source text. Fixes PR38994. Differential Revision: https://reviews.llvm.org/D63573 llvm-svn: 364039
* [X86] X86ISD::ANDNP is a (non-commutative) binopSimon Pilgrim2019-06-213-12/+14
| | | | | | The sat add/sub tests still have unnecessary extract_subvector((vandnps ymm, ymm), 0) uses that should be split to (vandnps (extract_subvector(ymm, 0), extract_subvector(ymm, 0)), but its getting better. llvm-svn: 364038
* [ARM] Add a batch of similarly encoded MVE instructions.Simon Tatham2019-06-215-1/+1277
| | | | | | | | | | | | | | | | | | | | | | | Summary: This adds the `MVE_qDest_qSrc` superclass and all instructions that inherit from it. It's not the complete class of _everything_ with a q-register as both destination and source; it's a subset of them that all have similar encodings (but it would have been hopelessly unwieldy to call it anything like MVE_111x11100). This category includes add/sub with carry; long multiplies; halving multiplies; multiply and accumulate, and some more complex instructions. Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62677 llvm-svn: 364037
* [binutils] Add response file option to help and docsJames Henderson2019-06-2118-6/+80
| | | | | | | | | | | | | | | | | | | | | Many LLVM-based tools already support response files (i.e. files containing a list of options, specified with '@'). This change simply updates the documentation and help text for some of these tools to include it. I haven't attempted to fix all tools, just a selection that I am interested in. I've taken the opportunity to add some tests for --help behaviour, where they were missing. We could expand these tests, but I don't think that's within scope of this patch. This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and https://bugs.llvm.org/show_bug.cgi?id=42236. Reviewed by: grimar, MaskRay, jkorous Differential Revision: https://reviews.llvm.org/D63597 llvm-svn: 364036
* [unittests] Simplify CMakeLists with object libraryTatyana Krasnukha2019-06-211-19/+2
| | | | | | | | The solution suggested by Chris Bieneman works for all versions of CMake. Differential Revision: https://reviews.llvm.org/D63544 llvm-svn: 364035
* Fix test/AST/ast-dump-records-json.cpp after ConstantExpr change in D63376Fangrui Song2019-06-211-0/+6
| | | | llvm-svn: 364033
* [Sema] Fix diagnostic for addr spaces in reference bindingAnastasia Stulova2019-06-213-9/+29
| | | | | | | | Extend reference binding behavior to account for address spaces. Differential Revision: https://reviews.llvm.org/D62914 llvm-svn: 364032
* Remove dead config now that C++03 requires Clang.Eric Fiselier2019-06-211-16/+0
| | | | llvm-svn: 364031
* [X86] createMMXBuildVector - call with BuildVectorSDNode directly. NFCI.Simon Pilgrim2019-06-211-7/+5
| | | | llvm-svn: 364030
* [llvm-dwarfdump] Remove unnecessary explicit -h behaviourJames Henderson2019-06-213-16/+4
| | | | | | | | | | | | | | | | | --help and -h are automatically supported by the command-line parser, unless overridden by the tool. The behaviour of the PrintHelpMessage being used for -h prior to this patch is subtly different to that provided by --help automatically (it omits certain elements of help text and options, such as --help-list), so overriding the default is not desirable, without good reason. This patch removes the explicit specification of -h and its behaviour, so that the default behaviour is used. Reviewed by: hintonda Differential Revision: https://reviews.llvm.org/D63565 llvm-svn: 364029
* [ARM] Fix -Wimplicit-fallthrough after D62675Fangrui Song2019-06-211-0/+2
| | | | llvm-svn: 364028
* [ARM] Add MVE vector compare instructions.Simon Tatham2019-06-215-6/+679
| | | | | | | | | | | | | | | | | | Summary: These take a pair of vector register to compare, and a comparison type (written in the form of an Arm condition suffix); they output a vector of booleans in the VPR register, where predication can conveniently use them. Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62676 llvm-svn: 364027
* [X86] combineAndnp - use isNOT instead of manually checking for (XOR x, -1)Simon Pilgrim2019-06-211-5/+3
| | | | llvm-svn: 364026
* [Symbolize] Avoid lifetime extension and simplify std::map find/insert. NFCFangrui Song2019-06-211-33/+26
| | | | llvm-svn: 364025
* [X86] foldVectorXorShiftIntoCmp - use isConstOrConstSplat. NFCI.Simon Pilgrim2019-06-211-7/+4
| | | | | | Use the isConstOrConstSplat helper instead of inspecting the build vector manually. llvm-svn: 364024
* [Sema] Improved diagnostic for qualifiers in reference bindingAnastasia Stulova2019-06-2110-52/+51
| | | | | | | | | Improved wording and also simplified by using printing method from qualifiers. Differential Revision: https://reviews.llvm.org/D62914 llvm-svn: 364023
* [X86][AVX] isNOT - handle concat_vectors(xor X, -1, xor Y, -1) patternSimon Pilgrim2019-06-215-320/+306
| | | | llvm-svn: 364022
* [cmake] Add llvm-dwarfdump to clang test dependenciesSven van Haastregt2019-06-211-0/+1
| | | | | | | | Commit r363496 ("[Clang] Harmonize Split DWARF options with llc", 2019-06-15) introduced the use of llvm-dwarfdump in the clang tests, so ensure the clang tests are dependent on llvm-dwarfdump. llvm-svn: 364021
* [OpenCL] Remove duplicate read_image declarationsSven van Haastregt2019-06-211-47/+0
| | | | | | Patch by Pierre Gondois. llvm-svn: 364020
* [docs][llvm-objdump] Improve llvm-objdump documentationJames Henderson2019-06-211-36/+240
| | | | | | | | | | | | | | | | | | The llvm-objdump document was missing many options, and there were also some style issues with it. This patches fixes all but the first issue listed in https://bugs.llvm.org/show_bug.cgi?id=42249 by: 1. Adding missing options and commands. 2. Standardising on double dashes for long-options throughout. 3. Moving Mach-O specific options to a separate section. 4. Removing options that don't exist or aren't relevant to llvm-objdump. Reviewed by: MaskRay, mtrent, alexshap Differential Revision: https://reviews.llvm.org/D63606 llvm-svn: 364019
* [RISC-V] Add -msave-restore and -mno-save-restore to clang driverSam Elliott2019-06-213-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The GCC RISC-V toolchain accepts `-msave-restore` and `-mno-save-restore` to control whether libcalls are used for saving and restoring the stack within prologues and epilogues. Clang currently errors if someone passes -msave-restore or -mno-save-restore. This means that people need to change build configurations to use clang. This patch adds these flags, so that clang invocations can now match gcc. As the RISC-V backend does not currently have a `save-restore` target feature, we emit a warning if someone requests `-msave-restore`. LLVM does not error if we pass the (unimplemented) target features `+save-restore` or `-save-restore`. Reviewers: asb, luismarques Reviewed By: asb Subscribers: rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63498 llvm-svn: 364018
* [GN] Fix check-clang by disabling pluginsVitaly Buka2019-06-211-1/+2
| | | | | | We can't link Analysis/plugins without -fPIC llvm-svn: 364016
* [GN] Put libcxx include into the same place as cmake to fix ↵Vitaly Buka2019-06-212-2/+2
| | | | | | Driver/print-file-name.c test llvm-svn: 364015
* [git-clang-format] recognize hxx as a C++ fileMiklos Vajna2019-06-211-1/+1
| | | | | | | | | | | clangd, clang-tidy, etc does that already, no reason why git-clang-format should skip hxx files. Reviewed By: ilya-biryukov Differential Revision: https://reviews.llvm.org/D63621 llvm-svn: 364014
* [ARM] Add a batch of MVE floating-point instructions.Simon Tatham2019-06-215-4/+1077
| | | | | | | | | | | | | | | | | Summary: This includes floating-point basic arithmetic (add/sub/multiply), complex add/multiply, unary negation and absolute value, rounding to integer value, and conversion to/from integer formats. Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62675 llvm-svn: 364013
* [libc++] Avoid using timespec when it might not be availableMikhail Maltsev2019-06-213-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The type timespec is unconditionally used in __threading_support. Since the C library is only required to provide it in C11, this might cause problems for platforms with external thread porting layer (i.e. when _LIBCPP_HAS_THREAD_API_EXTERNAL is defined) with pre-C11 C libraries. In our downstream port of libc++ we used to provide a definition of timespec in __external_threading, but this solution is not ideal because timespec is not a reserved name. This patch renames timespec into __libcpp_timespec_t in the thread-related parts of libc++. For all cases except external threading this type is an alias for ::timespec (and no functional changes are intended). In case of external threading it is expected that the __external_threading header will either provide a similar typedef (if timespec is available in the vendor's C library) or provide a definition of __libcpp_timespec_t compatible with POSIX timespec. Reviewers: ldionne, mclow.lists, EricWF Reviewed By: ldionne Subscribers: dexonsmith, libcxx-commits, christof, carwil Tags: #libc Differential Revision: https://reviews.llvm.org/D63328 llvm-svn: 364012
* [clang] Small improvments after Adding APValue to ConstantExprGauthier Harnisch2019-06-218-35/+61
| | | | | | | | | | | | | | | | | | | | | | | Summary: this patch has multiple small improvements related to the APValue in ConstantExpr. changes: - APValue in ConstantExpr are now cleaned up using ASTContext::addDestruction instead of there own system. - ConstantExprBits Stores the ValueKind of the result beaing stored. - VerifyIntegerConstantExpression now stores the evaluated value in ConstantExpr. - the Constant Evaluator uses the stored value of ConstantExpr when available. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63376 llvm-svn: 364011
* [clang-tidy] Fix a typo in the doc.Haojian Wu2019-06-211-1/+1
| | | | llvm-svn: 364010
* DWARF: Add "dwo_num" field to the DIERef classPavel Labath2019-06-2124-138/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When dwo support was introduced, it used a trick where debug info entries were referenced by the offset of the compile unit in the main file, but the die offset was relative to the dwo file. Although there was some elegance to it, this representation was starting to reach its breaking point: - the fact that the skeleton compile unit owned the DWO file meant that it was impossible (or at least hard and unintuitive) to support DWO files containing more than one compile unit. These kinds of files are produced by LTO for example. - it made it impossible to reference any DIEs in the skeleton compile unit (although the skeleton units are generally empty, clang still puts some info into them with -fsplit-dwarf-inlining). - (current motivation) it made it very hard to support type units placed in DWO files, as type units don't have any skeleton units which could be referenced in the main file This patch addresses this problem by introducing an new "dwo_num" field to the DIERef class, whose purpose is to identify the dwo file. It's kind of similar to the dwo_id field in DWARF5 unit headers, but while this is a 64bit hash whose main purpose is to catch file mismatches, this is just a smaller integer used to indentify a loaded dwo file. Currently, this is based on the index of the skeleton compile unit which owns the dwo file, but it is intended to be eventually independent of that (to support the LTO use case). Simultaneously the cu_offset is dropped to conserve space, as it is no longer necessary. This means we can remove the "BaseObjectOffset" field from the DWARFUnit class. It also means we can remove some of the workarounds put in place to support the skeleton-unit+dwo-die combo. More work is needed to remove all of them, which is out of scope of this patch. Reviewers: JDevlieghere, clayborg, aprantl Subscribers: mehdi_amini, dexonsmith, arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D63428 llvm-svn: 364009
* [clang-tidy] Move test files of rL363975 into Inputs directoryKadir Cetinkaya2019-06-212-1/+1
| | | | llvm-svn: 364008
* Use std::iterator_traits to infer result type of llvm::enumerate iterator ↵Mehdi Amini2019-06-211-2/+5
| | | | | | | | | | | | | | | wrapper Update the llvm::enumerate helper class result_pair<R> to use the 'iterator_traits<R>::reference' type as the result of 'value()' instead 'ValueOfRange<R> &'. This enables support for iterators that return value types, i.e. non reference. This is a common pattern for some classes of iterators, e.g. mapped_iterator. Patch by: River Riddle <riverriddle@google.com> Differential Revision: https://reviews.llvm.org/D63632 llvm-svn: 364007
* Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFCFangrui Song2019-06-2126-101/+64
| | | | llvm-svn: 364006
* [LICM & MSSA] Fixed test to run only with assertions enabled as it uses ↵Yevgeny Rouban2019-06-211-0/+1
| | | | | | -debug-only llvm-svn: 364005
* [GN] Fix buildVitaly Buka2019-06-214-8/+3
| | | | llvm-svn: 364004
* [MIPS GlobalISel] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off ↵Fangrui Song2019-06-212-2/+4
| | | | | | builds after D63541 llvm-svn: 364003
* [libFuzzer] split DataFlow.cpp into two .cpp files, one of which can be ↵Kostya Serebryany2019-06-216-104/+154
| | | | | | compiled w/o dfsan to speed things up (~25% speedup) llvm-svn: 364002
* [GlobalISel][Localizer] Allow localization of G_INTTOPTR and chains of ↵Amara Emerson2019-06-213-17/+83
| | | | | | | | | | | | | | | | | | | | instructions. G_INTTOPTR can prevent the localizer from moving G_CONSTANTs, but since it's essentially a side effect free cast instruction we can remat both instructions. This patch changes the localizer to enable localization of the chains by iterating over the entry block instructions in reverse order. That way, uses will localized first, and then the defs are free to be localized as well. This also changes the previous SmallPtrSet of localized instructions to use a SetVector instead. We're dealing with pointers and need deterministic iteration order. Overall, this change improves ARM64 -O0 CTMark code size by around 0.7% geomean. Differential Revision: https://reviews.llvm.org/D63630 llvm-svn: 364001
* [llvm-objcopy][MachO] Rebuild the symbol/string table in the writerSeiya Nuta2019-06-217-76/+136
| | | | | | | | | | | | | | | | Summary: Build the string table using StringTableBuilder, reassign symbol indices, and update symbol indices in relocations to allow adding/modifying/removing symbols from the object. Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap Subscribers: mgorny, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63309 llvm-svn: 364000
* Revert "Fix a crash in option parsing."Davide Italiano2019-06-203-9/+0
| | | | | | This fails on the bots around 1/10 of the time. llvm-svn: 363999
* [Reassociate] Remove bogus assert reported in PR42349.Cameron McInally2019-06-202-5/+19
| | | | | | | | Also, add a FIXME for the unsafe transform on a unary FNeg. A unary FNeg can only be transformed to a FMul by -1.0 when the nnan flag is present. The unary FNeg project is a WIP, so the unsafe transformation is acceptable until that work is complete. The bogus assert with introduced in D63445. llvm-svn: 363998
* [InstSimplify] simplify power-of-2 (single bit set) sequencesSanjay Patel2019-06-202-8/+12
| | | | | | | | | | | | | | | | | | | | As discussed in PR42314: https://bugs.llvm.org/show_bug.cgi?id=42314 Improving the canonicalization for these patterns: rL363956 ...means we should adjust/enhance the related simplification. https://rise4fun.com/Alive/w1cp Name: isPow2 or zero %x = and i32 %xx, 2048 %a = add i32 %x, -1 %r = and i32 %a, %x => %r = i32 0 llvm-svn: 363997
* [CodeGen][test] Use FileCheck variable matchers for better test supportJordan Rupprecht2019-06-201-5/+12
| | | | | | | | | | | | | | | | Summary: Depending on how clang is built, it may discard the IR names and use names like `%2` instead of `%result.ptr`, causing tests that rely on the IR name to fail. Using FileCheck matchers makes the test work regardless of how clang is built. This test passes with both `-fno-discard-value-names` and `-fdiscard-value-names` to make sure it passes regardless of the build mode. Reviewers: rnk, akhuang, aprantl, lebedev.ri Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63625 llvm-svn: 363996
* [analyzer] DeadStores: Update the crude suppression for files generated by IIG.Artem Dergachev2019-06-202-2/+2
| | | | | | They changed the comments that we were looking for. llvm-svn: 363995
* [X86] Change LL to O in the definitions for the vp2intersect builtins.Craig Topper2019-06-201-3/+3
| | | | | | | | | This is needed to support OpenCL where long long is 128 bits. This was done for the other builtins already, but I think vp2intersect was in phabricator at the time. llvm-svn: 363994
* [libc++] Recommit r363692 to implement P0608R3Zhihao Yuan2019-06-206-6/+238
| | | | | | | | | | | | Re-apply the change which was reverted in r363764 as-is after breakages being resolved. Thanks Eric Fiselier for working hard on this. See also: https://bugs.llvm.org/show_bug.cgi?id=42330 Differential Revision: https://reviews.llvm.org/D44865 llvm-svn: 363993
* [CodeGen] Refactor check of suitability for a jump table (NFC)Evandro Menezes2019-06-201-10/+10
| | | | llvm-svn: 363992
OpenPOWER on IntegriCloud