summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ADT] add equality operator for SmallSetFedor Sergeev2019-10-292-0/+50
| | | | | | | Makes it easier to migrate existing code that uses std::set. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D69417
* Break out OrcError and RPCChris Bieneman2019-10-2916-19/+45
| | | | | | | | | | | | | | | | | | | Summary: When createing an ORC remote JIT target the current library split forces the target process to link large portions of LLVM (Core, Execution Engine, JITLink, Object, MC, Passes, RuntimeDyld, Support, Target, and TransformUtils). This occurs because the ORC RPC interfaces rely on the static globals the ORC Error types require, which starts a cycle of pulling in more and more. This patch breaks the ORC RPC Error implementations out into an "OrcError" library which only depends on LLVM Support. It also pulls the ORC RPC headers into their own subdirectory. With this patch code can include the Orc/RPC/*.h headers and will only incur link dependencies on LLVMOrcError and LLVMSupport. Reviewers: lhames Reviewed By: lhames Subscribers: mgorny, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68732
* Suppress useless GCC "bitfield is too small to hold all values of enum ↵Richard Smith2019-10-291-1/+1
| | | | class" warning.
* AMDGPU/GlobalISel: Legalize FDIV32Austin Kerbow2019-10-294-75/+1065
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69581
* [MS] Fix constexpr data member pointer conversionsReid Kleckner2019-10-292-2/+45
| | | | | | | | | | | | | | | Constexpr data member conversions work by starting with the class that originally introduced the field, and converting from there to the type that the user desires. Before this change, Clang was using the inheritance model from the final destination class type instead of the model from the class that originally introduced the field. To fix this, find the relevant FieldDecl and take its parent class instead of using the member pointer type the user provided. Indirect field decls require some special handling to find the parent class. Fixes PR43803
* [lldbsuite] Remove unused test_event filesJonas Devlieghere2019-10-295-451/+0
| | | | | These files don't appear to be used anywhere and the corresponding tests are not run.
* [lldbsuite] Remove the DumpFormatterJonas Devlieghere2019-10-291-22/+0
| | | | This formatter is never used or referenced.
* [lldbsuite] Remove pre_kill_hook packageJonas Devlieghere2019-10-297-418/+0
| | | | This package was only used by dosep.py which has since been removed.
* [lldbsuite] Remove unused support filesJonas Devlieghere2019-10-292-87/+0
| | | | | To the best of my understanding these files or their content is nowhere referenced.
* [lit] Small improvements in cl_arguments.pyJulian Lettner2019-10-292-58/+32
| | | | | | *) `--max-tests` should be positive integer *) `--max-time` should be positive integer *) Remove unnecessary defaults for command line option parsing
* Thread safety analysis: Peel away NoOp implicit casts in initializersAaron Puchert2019-10-302-0/+17
| | | | | | | | | | | | Summary: This happens when someone initializes a variable with guaranteed copy elision and an added const qualifier. Fixes PR43826. Reviewers: aaron.ballman, rsmith Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D69533
* [LLD][ELF] Support --[no-]mmap-output-file with F_no_mmapNick Terrell2019-10-298-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add a flag `F_no_mmap` to `FileOutputBuffer` to support `--[no-]mmap-output-file` in ELF LLD. LLD currently explicitly ignores this flag for compatibility with GNU ld and gold. We need this flag to speed up link time for large binaries in certain scenarios. When we link some of our larger binaries we find that LLD takes 50+ GB of memory, which causes memory pressure. The memory pressure causes the VM to flush dirty pages of the output file to disk. This is normally okay, since we should be flushing cold pages. However, when using BtrFS with compression we need to write 128KB at a time when we flush a page. If any page in that 128KB block is written again, then it must be flushed a second time, and so on. Since LLD doesn't write sequentially this causes write amplification. The same 128KB block will end up being flushed multiple times, causing the linker to many times more IO than necessary. We've observed 3-5x faster builds with -no-mmap-output-file when we hit this scenario. The bad scenario only applies to compressed filesystems, which group together multiple pages into a single compressed block. I've tested BtrFS, but the problem will be present for any compressed filesystem on Linux, since it is caused by the VM. Silently ignoring --no-mmap-output-file caused a silent regression when we switched from gold to lld. We pass --no-mmap-output-file to fix this edge case, but since lld silently ignored the flag we didn't realize it wasn't being respected. Benchmark building a 9 GB binary that exposes this edge case. I linked 3 times with --mmap-output-file and 3 times with --no-mmap-output-file and took the average. The machine has 24 cores @ 2.4 GHz, 112 GB of RAM, BtrFS mounted with -compress-force=zstd, and an 80% full disk. | Mode | Time | |---------|-------| | mmap | 894 s | | no mmap | 126 s | When compression is disabled, BtrFS performs just as well with and without mmap on this benchmark. I was unable to reproduce the regression with any binaries in lld-speed-test. Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D69294
* Replace std::function in PrintingPolicy with a callbacks object.Richard Smith2019-10-294-11/+29
| | | | | This makes PrintingPolicy significantly more lightweight and provides groundwork for more printing customization hooks.
* [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_argsLawrence D'Anna2019-10-296-68/+84
| | | | | | | | | | | | | | | | | | | | Summary: Move breakpoints from the old, bad ArgInfo::count to the new, better ArgInfo::max_positional_args. Soon ArgInfo::count will be no more. It looks like this functionality is already well tested by `TestBreakpointCommandsFromPython.py`, so there's no need to write additional tests for it. Reviewers: labath, jingham, JDevlieghere Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69468
* [Headers] Fix compatibility between arm_acle.h and intrin.hEli Friedman2019-10-292-0/+8
| | | | | | Make sure they don't both define __nop. Differential Revision: https://reviews.llvm.org/D69012
* Accept __is_same_as as a GCC-compatibility synonym for the proper trait name ↵Richard Smith2019-10-294-0/+8
| | | | __is_same.
* [DWARF5] Added support for deleted C++ special member functions.Adrian Prantl2019-10-299-1/+226
| | | | | | | | | | This patch adds support for deleted C++ special member functions in clang and llvm. Also added Defaulted member encodings for future support for defaulted member functions. Patch by Sourabh Singh Tomar! Differential Revision: https://reviews.llvm.org/D69215
* [globalisel][docs] Fix warning treated as errorDaniel Sanders2019-10-291-1/+1
| | | | | | | | | I had hoped that I could have some ``` .. code-block:: MIR ``` sections for MIR examples which causes a warning about pygments not supporting it but we have warnings treated as errors
* [globalisel][docs] Rewrite the IRTranslator documentationDaniel Sanders2019-10-291-27/+65
| | | | | | | | | | | | | | | | | | | | | | Summary: I haven't refreshed the Function Calls section as I don't feel I have sufficient knowledge of that area. It would be appreciated if someone could review that section. Note: I'm aware that pygments doesn't support 'mir' as used in one of the code-block directives. This currently emits a warning and I decided to keep it to enable finding them later. Maybe we can teach pygments to support it. Depends on D69456 Reviewers: volkan, aditya_nandakumar Subscribers: rovka, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69457
* Fix argument numbering confusion when diagnosing a non-viable operator().Richard Smith2019-10-292-2/+11
| | | | | This could lead to crashes if operator() is a variadic template, as we could end up asking for an out-of-bounds argument.
* [ValueObjectDisplay] Generalize the description of an option.Davide Italiano2019-10-291-1/+1
|
* [SelectionDAG] Enable lowering unordered atomics loads w/LoadSDNode (and ↵Philip Reames2019-10-297-172/+78
| | | | | | | | | | stores w/StoreSDNode) by default Enable the new SelectionDAG representation for unordered loads and stores introduced in r371441 by default. As a reminder, the new lowering changes the representation of an unordered atomic load from an AtomicSDNode - which is essentially a black box which gets passed through without combines messing with it - to a LoadSDNode w/a atomic marker on the MMO. The later parallels the way we handle volatiles, and I've audited the code to ensure that every location which checks one checks the other. This has been fairly heavily fuzzed, and I examined diffs in a reasonable large corpus of assembly by hand, so I'm reasonable sure this is correct for the common case. Late in the review for this, it was discovered that I hadn't correctly handled cases which could be legalized into CAS operations. This points out that there's a strong bias in the IR of the frontend I'm working with towards only legal atomics. If there are problems with this patch, the most likely area will be legalization. Differential Revision: https://reviews.llvm.org/D69219
* [Docs] Reflect the slow migration from guard to widenable condition which is ↵Philip Reames2019-10-291-0/+4
| | | | currently in progress.
* [lit] Extend internal diff to support `-` argumentJoel E. Denny2019-10-297-5/+146
| | | | | | | | | | | | | | | | | | | | When using lit's internal shell, RUN lines like the following accidentally execute an external `diff` instead of lit's internal `diff`: ``` # RUN: program | diff file - ``` Such cases exist now, in `clang/test/Analysis` for example. We are preparing patches to ensure lit's internal `diff` is called in such cases, which will then fail because lit's internal `diff` doesn't recognize `-` as a command-line option. This patch adds support for `-` to mean stdin. Reviewed By: probinson, rnk Differential Revision: https://reviews.llvm.org/D67643
* [lit] Make internal diff work in pipelinesJoel E. Denny2019-10-299-271/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using lit's internal shell, RUN lines like the following accidentally execute an external `diff` instead of lit's internal `diff`: ``` # RUN: program | diff file - # RUN: not diff file1 file2 | FileCheck %s ``` Such cases exist now, in `clang/test/Analysis` for example. We are preparing patches to ensure lit's internal `diff` is called in such cases, which will then fail because lit's internal `diff` cannot currently be used in pipelines and doesn't recognize `-` as a command-line option. To enable pipelines, this patch moves lit's `diff` implementation into an out-of-process script, similar to lit's `cat` implementation. A follow-up patch will implement `-` to mean stdin. Also, when lit's `diff` prints differences to stdout in Windows, this patch ensures it always terminate lines with `\n` not `\r\n`. That way, strict FileCheck directives checking the `diff` output succeed in both Linux and Windows. This wasn't an issue when `diff` was internal to lit because `diff` didn't then write to the true stdout, which is where the `\n` -> `\r\n` conversion happened in Python. Reviewed By: probinson, stella.stamenova Differential Revision: https://reviews.llvm.org/D66574
* [X86] Narrow i64 compares with constant to i32 when the upper 32-bits are ↵Craig Topper2019-10-295-14/+26
| | | | | | | | | | | | | | | | known zero. This catches some cases. There are probably ways to improve this. I tried doing it as a combine on the setcc, but that broke some cases involving flag reuse in place of test. I renamed the isX86CCUnsigned to isX86CCSigned and flipped its polarity to make it consistent with the similar functions for ISD::SETCC. This avoids calling EQ/NE as being signed or unsigned. Fixes PR43823. Differential Revision: https://reviews.llvm.org/D69499
* [LLDB] Fix for windows bots broken by unsupported testsshafik2019-10-292-0/+4
|
* [globalisel][docs] Rewrite the pipeline overviewDaniel Sanders2019-10-296-51/+106
| | | | | | | | | | | | | | | | | | | | Summary: Rewrite the pipeline overview to be more focused on the structure and flexibility as well as highlight the increased usefulness of MachineVerifier and increased testability resulting from the smaller incremental passes approach. The diagrams are lifted from the slides for the LLVMDev 2019 talk 'Generating Optimized Code with GlobalISel' and adapted to be readable on the white background used in the docs. Reviewers: volkan Subscribers: rovka, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69456
* [X86][VBMI2] Add vector funnel shift testsSimon Pilgrim2019-10-292-0/+307
| | | | Demonstrates missed opportunity to combine to the VBMI2 SHLDV/SHRDV ops - combineOrShiftToFunnelShift should handle vector ops (and we should eventually move this to DAGCombine).
* [libc++] Force the ABI namespace to be a reserved identifierLouis Dionne2019-10-292-2/+2
| | | | | | | | | | | | | | | | Summary: When the ABI namespace isn't a reserved identifier, we were issuing a warning, but this should have been an error since the beginning. This commit enforces that the ABI namespace is a reserved identifier, and changes the ABI namespace used by LibFuzzer. Reviewers: phosek, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, #sanitizers, libcxx-commits, llvm-commits Tags: #sanitizers, #libc, #llvm Differential Revision: https://reviews.llvm.org/D69408
* Revert "[clang-format] Remove the dependency on frontend"Vlad Tsyrklevich2019-10-292-26/+15
| | | | | | This reverts commit ec66603ac7ea655be5c2c5f508c5bf0d5eaeb65b. It was causing ubsan failures like the following on the ubsan bot: llvm/lib/Support/SourceMgr.cpp:440:48: runtime error: pointer index expression with base 0x000000000000 overflowed to 0xfffffffffffffffa
* [SVE][AArch64] Adding pattern matching for some SVE instructions.Ehsan Amiri2019-10-293-4/+114
| | | | | | | | | Adding patten matching for two SVE intrinsics: frecps and frsqrts. Also added patterns for fsub and fmul - these SDNodes directly correspond to machine instructions. Review: https://reviews.llvm.org/D68476 Patch authored by mgudim (Mikhail Gudim).
* [ELF] Delete redundant comment after D56554. NFCFangrui Song2019-10-291-1/+0
|
* [lld] [ELF] Add '-z nognustack' opt to suppress emitting PT_GNU_STACKMichał Górny2019-10-295-8/+40
| | | | | | | | | Add a new '-z nognustack' option that suppresses emitting PT_GNU_STACK segment. This segment is not supported at all on NetBSD (stack is always non-executable), and the option is meant to be used to disable emitting it. Differential Revision: https://reviews.llvm.org/D56554
* [LLDB][Python] fix another fflush issue on NetBSDLawrence D'Anna2019-10-294-16/+26
| | | | | | | | | | | | | | | | Summary: Here's another instance where we were calling fflush on an input stream, which is illegal on NetBSD. Reviewers: labath, mgorny Reviewed By: mgorny Subscribers: krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69488
* [SLP] Fix -Wunused-variable. NFCFangrui Song2019-10-291-2/+1
|
* isBuiltinFunc() uses StringRef instead of const char*Guillaume Chatelet2019-10-293-4/+3
| | | | | | | | | | | | Summary: This prevents a bug when passing nullptr, StringRef ctor would call strlen(nullptr). Reviewers: vlad.tsyrklevich Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69569
* Reland [AArch64][DebugInfo] Do not recompute CalleeSavedStackSize (Take 2)Sander de Smalen2019-10-2911-89/+287
| | | | | | | | | | | | | | | | llvm/test/DebugInfo/MIR/X86/live-debug-values-reg-copy.mir failed with EXPENSIVE_CHECKS enabled, causing the patch to be reverted in rG2c496bb5309c972d59b11f05aee4782ddc087e71. This patch relands the patch with a proper fix to the live-debug-values-reg-copy.mir tests, by ensuring the MIR encodes the callee-saves correctly so that the CalleeSaved info is taken from MIR directly, rather than letting it be recalculated by the PEI pass. I've done this by running `llc -stop-before=prologepilog` on the LLVM IR as captured in the test files, adding the extra MOV instructions that were manually added in the original test file, then running `llc -run-pass=prologepilog` and finally re-added the comments for the MOV instructions.
* [SLP] Generalization of stores vectorization.Alexey Bataev2019-10-2920-480/+842
| | | | | | | | | Stores are vectorized with maximum vectorization factor of 16. Patch tries to improve the situation and use maximal vectorization factor. Reviewers: spatel, RKSimon, mkuper, hfinkel Differential Revision: https://reviews.llvm.org/D43582
* Fix missing memcpy builtin on ppc64beGuillaume Chatelet2019-10-292-0/+2
| | | | See D68028
* [X86] Pull out combineOrShiftToFunnelShift helper. NFCI.Simon Pilgrim2019-10-291-51/+64
|
* build: make standalone builds work againSaleem Abdulrasool2019-10-291-0/+4
| | | | | | | Apple's greendragon bot uses a standalone build of lldb which would fail to build after a recent change to LLVM as it relied on LLVM setting global flags for its build. Attempt to repair the standalone build for greendragon bot.
* build: workaround stale caches (NFC)Saleem Abdulrasool2019-10-291-1/+1
| | | | | | | | `LLVM_DEFAULT_TARGET_TRIPLE` is a cached variable, which means that it may actually be unset. Furthermore, in standalone builds, the variable may be fully undefined. Apply the regular expression over the empty string in such a case. This should improve the state of the green dragon bot.
* [InstCombine] make icmp vector canonicalization safe for constant with undef ↵Sanjay Patel2019-10-298-9/+21
| | | | | | | | | | | | | | | | | elements This is a fix for: https://bugs.llvm.org/show_bug.cgi?id=43730 ...and as shown there, we have existing test cases that show potential miscompiles. We could just bail out for vector constants that contain any undef elements, or we can do as shown here: allow the transform, but replace the undefs with a safe value. For most of the tests shown, this results in a full splat constant (no undefs) which is probably a win for further IR analysis because we conservatively don't match undefs in most cases. Codegen can probably recover these kinds of undef lanes via demanded elements analysis if that's profitable. Differential Revision: https://reviews.llvm.org/D69519
* [clang] Add no_builtin attributeGuillaume Chatelet2019-10-2910-4/+269
| | | | | | | | | | | | | | | | Summary: This is a follow up on https://reviews.llvm.org/D61634 This patch is simpler and only adds the no_builtin attribute. Reviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert Subscribers: mgrang, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68028 This is a re-submit after it got reverted in https://reviews.llvm.org/rGbd8791610948 since the breakage doesn't seem to come from this patch.
* [lldb][NFC] Make LLVMUserExpression::DoExecute return earlyRaphael Isemann2019-10-291-144/+142
| | | | The giant if-else isn't conforming to LLVM code style.
* [OPENMP]Fix PR43772: No warning in non-combined target regions.Alexey Bataev2019-10-295-7/+38
| | | | | | Need to analyze inner target regions in case of implicit mapping of the data members when target region is created in one of the class member functions.
* [bugpoint] Try to reduce passes after reducing everything.Florian Hahn2019-10-291-1/+15
| | | | | | | | | | | | | | | | In some cases, we fail to reduce the pass list earlier because of complex pass dependencies, but we can reduce it after we simplified the reproducer. An example of that is PR43474, which can limit the crash to -loop-interchange. Adding a test case would require at least 2 interacting Loop passes I think. Reviewers: davide, reames, modocache Reviewed By: reames Differential Revision: https://reviews.llvm.org/D69236
* [InstCombine] add tests for icmp predicate canonicalization with vector ↵Sanjay Patel2019-10-291-5/+14
| | | | | | types; NFC Increase coverage for D69519.
* [Hexagon] Handle remaining registers in getRegisterByName()Krzysztof Parzyszek2019-10-293-3/+848
| | | | This fixes https://llvm.org/PR43829.
OpenPOWER on IntegriCloud