summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clang][driver] Add basic --driver-mode=flang support for fortranPeter Waller2019-10-3018-21/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new Flang mode. When in Flang mode, the driver will invoke flang for fortran inputs instead of falling back to the GCC toolchain as it would otherwise do. The behaviour of other driver modes are left unmodified to preserve backwards compatibility. It is intended that a soon to be implemented binary in the flang project will import libclangDriver and run the clang driver in the new flang mode. Please note that since the binary invoked by the driver is under development, there will no doubt be further tweaks necessary in future commits. * Initial support is added for basic driver phases * -E, -fsyntax-only, -emit-llvm -S, -emit-llvm, -S, (none specified) * -### tests are added for all of the above * This is more than is supported by f18 so far, which will emit errors for those options which are unimplemented. * A test is added that ensures that clang gives a reasonable error message if flang is not available in the path (without -###). * Test that the driver accepts multiple inputs in --driver-mode=flang. * Test that a combination of C and Fortran inputs run both clang and flang in --driver-mode=flang. * clang/test/Driver/fortran.f95 is fixed to use the correct fortran comment character. Differential revision: https://reviews.llvm.org/D63607
* [llvm-objcopy] - Do not crash on object that has relocations but no symbol ↵Georgii Rymar2019-10-303-10/+115
| | | | | | | | | | | | | table. It was revealed by D69260. Tool crashed when scanned relocations in a object without a symbol table. This patch teaches it either to handle such objects (when relocations does not use symbols we do not need a symbol table to proceed) or to show an appropriate error otherwise. Differential revision: https://reviews.llvm.org/D69304
* Enable OpenBSD support.AndreyChurbanov2019-10-303-4/+33
| | | | | | Patch by devnexen (David CARLIER) Differential Revision: https://reviews.llvm.org/D69220
* [UpdateTestChecks] Fix invalid python string escapesAlex Richardson2019-10-301-3/+3
|
* [Alignment] Use Align for TFI.getStackAlignment() in X86ISelLoweringGuillaume Chatelet2019-10-301-26/+18
| | | | | | | | | | | | | | | | | Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet, craig.topper, rnk Reviewed By: rnk Subscribers: rnk, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69034
* [update_cc_test_checks.py] Fix invalid python string escape sequenceAlex Richardson2019-10-301-1/+1
| | | | This works with current python version but will be an error with 3.9
* [AddressSanitizer] Only instrument globals of default address spaceKarl-Johan Karlsson2019-10-302-0/+33
| | | | | | | | | | | | | The address sanitizer ignore memory accesses from different address spaces, however when instrumenting globals the check for different address spaces is missing. This result in assertion failure. The fault was found in an out of tree target. The patch skip all globals of non default address space. Reviewed By: leonardchan, vitalybuka Differential Revision: https://reviews.llvm.org/D68790
* [PowerPC] Clear the sideeffect bit for those instructions that didn't have ↵QingShan Zhang2019-10-305-16/+57
| | | | | | | | | | | | the match pattern If the instruction have match pattern, llvm-tblgen will infer the sideeffect bit from the match pattern and it works well. If not, the tblgen will set it as true that hurt the scheduling. PowerPC has some instructions that didn't specify the match pattern(i.e. LXSD etc), which is manually selected post-ra according to the register pressure. We need to clear the sideeffect flag for these instructions. Differential Revision: https://reviews.llvm.org/D69232
* [Target] Change PATCHABLE_EVENT_CALL/PATCHABLE_TYPED_EVENT_CALL to use ↵Craig Topper2019-10-301-2/+2
| | | | | | | unknown instead of i8imm/i16imm/i32imm in its definition. These instructions don't use immediates, they use registers. But the register class needed is target specific. So just use unknown.
* [X86] Add test case for PR43758. NFCCraig Topper2019-10-301-0/+60
|
* [llvm-objcopy] Add REQUIRES directive to fix a testSeiya Nuta2019-10-301-0/+2
| | | | Buildbot failure log: http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/11164
* [X86] Make memcmp vector lowering handle arbitrary expansionsDavid Zarzycki2019-10-305-99/+6348
| | | | | | | | | | Teach combineVectorSizedSetCCEquality() to handle arbitrary memcmp expansions but do not change any default policy for now. This also fixes a bug in the memcmp expansion itself when large displacements are needed. https://reviews.llvm.org/D69507
* [llvm-objcopy][MachO] Support indirect symbol tableSeiya Nuta2019-10-304-9/+96
| | | | | | | | | | | | | | | | | Summary: Parse the indirect symbol table and update the indexes of symbol entries in the table in the writer in case they have been changed. Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, rupprecht Subscribers: jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66280
* [Orc][test] Fix -DBUILD_SHARED_LIBS=on buildFangrui Song2019-10-291-0/+1
|
* [lli-child-target] Fix -DBUILD_SHARED_LIBS=on buildFangrui Song2019-10-291-0/+1
|
* [lli] Fix -DBUILD_SHARED_LIBS=on buildFangrui Song2019-10-291-0/+1
| | | | | | | | | | This fixes: ld.lld: error: undefined symbol: vtable for llvm::orc::rpc::ResponseAbandoned >>> referenced by lli.cpp In -DBUILD_SHARED_LIBS=on builds, all directly referenced references must be linked to appease -Wl,-z,defs.
* Revert "[llvm-cov] Add option to whitelist filenames"Vlad Tsyrklevich2019-10-2912-154/+20
| | | | | | This reverts commit bfed824b57d14e2ba98ddbaf1a1410cf04a3e279, the included test fails on many bots including the sanitier bots, e.g. in http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/36140
* [WebAssembly][lld] Fix for static linking of PIC codeSam Clegg2019-10-292-3/+1
| | | | | | | | | | | When statically linking PIC code we create an internalized __memory_base so that memory-base-relative relocation work correctly. The value of this global should be zero, and not the globalBase since the globalBase offset is already taken into account by getVirtualAddress. Fixes: https://github.com/emscripten-core/emscripten/issues/9013 Differential Revision: https://reviews.llvm.org/D69600
* gn build: (manually) merge a34680a3Nico Weber2019-10-292-2/+11
|
* [llvm-cov] Add option to whitelist filenamesVedant Kumar2019-10-2912-20/+154
| | | | | | | | | Add the `-whitelist-filename-regex` option to restrict coverage reporting to file paths that match a whitelist regex. Patch by Michael Daniels! rdar://56720320
* [lit] Refactor ordering of testsJulian Lettner2019-10-292-22/+28
|
* [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).
OpenPOWER on IntegriCloud