Commit Graph

315570 Commits

Author SHA1 Message Date
Scott Linder daa3c5b132 [Sema] Emit warning for visibility attribute on internal-linkage declaration
GCC warns on these cases, but we currently just silently ignore the attribute.

Differential Revision: https://reviews.llvm.org/D61097

llvm-svn: 359814
2019-05-02 19:03:57 +00:00
Raphael Isemann 21db1440f9 Remove unnecessary check in SymbolFileDWARF::ParseImportedModules
Summary:
This check seems unnecessary as we already assert the same condition above and also access `sc.comp_unit`
before this check.

Reviewers: aprantl

Reviewed By: aprantl

Subscribers: jdoerfert, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D61394

llvm-svn: 359813
2019-05-02 18:26:58 +00:00
Jonas Devlieghere 0682fc5e5f Disable TestArgumentPassingRestrictions for clang < 7
http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/

llvm-svn: 359812
2019-05-02 18:26:46 +00:00
Saleem Abdulrasool bd689b9c6b gdb-remote: reduce some inclusion of Target/Process.h
Reduce the inclusion of Target/Process.h to help isolate why Process is being
preserved during the build of `lldb-server`.

llvm-svn: 359811
2019-05-02 18:15:03 +00:00
Saleem Abdulrasool c7c3cf685d Initialization: remove ObjectContainer from Common
This restructures the initialization path to move the ObjectContainer
initialization into the *full* initialization path. This is not needed
for the lldb-server initialization path. This helps strip off ~1MiB
from the binary.

llvm-svn: 359810
2019-05-02 18:11:44 +00:00
Reid Kleckner 2dbd5d84ec Use primary template parameter names for variable template debug info
Summary:
Fixes PR41677

Consider:
  template <typename LHS, typename RHS> constexpr bool is_same_v = false;
  template <typename T> constexpr bool is_same_v<T, T> = true;
  template constexpr bool is_same_v<int, int>;

Before this change, when emitting debug info for the
`is_same_v<int, int>` global variable, clang would crash because it
would try to use the template parameter list from the partial
specialization to give parameter names to template arguments. This
doesn't work in general, since a partial specialization can have fewer
arguments than the primary template. Therefore, always use the primary
template. Hypothetically we could try to use the parameter names from
the partial specialization when possible, but it's not clear this really
helps debugging in practice.

Reviewers: JDevlieghere, aprantl, ormris, dblaikie

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61408

llvm-svn: 359809
2019-05-02 17:45:54 +00:00
Louis Dionne 223ed705d0 [libc++][CMake] Link against libSystem on Apple platforms
Instead of manually linking against libm/librt/libpthread, we should be
linking against libSystem on Apple platforms, and only that. libm and
libpthread are symlinks to libSystem anyway.

llvm-svn: 359808
2019-05-02 17:43:48 +00:00
Jonas Devlieghere 291a0b89fa [test] TestSharedPtr -> TestSharedPtrDbgInfoContent
Two tests cannot share the same name, because they will generate an
identical trace file. When that happens, this can lead to a race
condition where dotest fails when trying to move both files into the
trace directory, because the file has already been moved. Additionally,
the trace will have been overwritten by the test that finishes last.

llvm-svn: 359807
2019-05-02 17:35:18 +00:00
Petr Hosek fa3c328c51 [gn] Support for building libc++
This change introduces support for building libc++. The library
build should be complete, but not all CMake options have been
replicated in GN. We also don't support tests yet.

We only support two stage build at the moment.

Differential Revision: https://reviews.llvm.org/D61143

llvm-svn: 359806
2019-05-02 17:29:41 +00:00
Petr Hosek 4fe63c70c7 [gn] Support for building libcxxabi
This change introduces support for building libcxxabi. The library
build should be complete, but not all CMake options have been
replicated in GN. We also don't support tests yet.

We only support two stage build at the moment.

Differential Revision: https://reviews.llvm.org/D60372

llvm-svn: 359805
2019-05-02 17:29:39 +00:00
Petr Hosek f0652f03b6 [gn] Support for building libunwind
This change introduces support for building libuwind. The library
build should be complete, but not all CMake options have been
replicated in GN. We also don't support tests yet.

We only support two stage build at the moment.

Differential Revision: https://reviews.llvm.org/D60370

llvm-svn: 359804
2019-05-02 17:29:37 +00:00
Petr Hosek 156226bb70 [compiler-rt] Set the ZX_VMO_RESIZABLE option for zx_vmo_create
Currently VMO in Zircon create using the zx_vmo_create is resizable
by default, but we'll be changing this in the future, requiring an
explicit flag to make the VMO resizable.

Prepare for this change by passing ZX_VMO_RESIZABLE option to all
zx_vmo_create calls that need resizable VMO.

Differential Revision: https://reviews.llvm.org/D61450

llvm-svn: 359803
2019-05-02 17:24:53 +00:00
Jonathan Metzman 3d1d3ad50e [libFuzzer] Re-enable libFuzzer on i386 Linux and fix test
Summary:
Re-enable libFuzzer on i386 Linux after it was accidentally
disabled.

Also disable gc-sections.test on i386 since lld isn't
garbage collecting properly with ASAN on i386.

Reviewers: morehouse

Reviewed By: morehouse

Subscribers: srhines, mgorny, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D61415

llvm-svn: 359802
2019-05-02 16:45:17 +00:00
Florian Gross e25a0e9510 Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC STL smart pointers.
Differential Revision: https://reviews.llvm.org/D61209

llvm-svn: 359801
2019-05-02 16:41:28 +00:00
David Blaikie a558ee8105 Do not warn on switches over enums that do not use [[maybe_unused]] enumerators
PR36231, [dcl.attr.unused]p3

Reviewers: aaron.ballman

Differential Revision: https://reviews.llvm.org/D61444

llvm-svn: 359800
2019-05-02 16:30:49 +00:00
Sam McCall 1b29dec05f Reapply r359778: [clangd] Fix code completion of macros defined in the preamble region of the main file.
The bad assert has been removed, and updateOutOfDateIdentifier has been guarded.
This reverts commit r359796.

llvm-svn: 359799
2019-05-02 16:12:36 +00:00
Anastasia Stulova 26e095e84f [OpenCL] Fix initialisation of this via pointer.
When the expression used to initialise 'this' has a pointer type,
check the address space of the pointee type instead of the pointer
type to decide whether an address space cast is required.
It is the pointee type that carries the address space qualifier.

Fixing PR41674.

Patch by kpet (Kevin Petit)!

Differential Revision: https://reviews.llvm.org/D61319

llvm-svn: 359798
2019-05-02 16:10:50 +00:00
Michal Gorny 2f6c579ecb [lldb] [lit] Add write tests for AVX-512 registers (zmm, xmm15+, ymm15+)
Differential Revision: https://reviews.llvm.org/D61439

llvm-svn: 359797
2019-05-02 16:10:35 +00:00
Simon Pilgrim 73c44e45ec Revert rL359778 : [clangd] Fix code completion of macros defined in the preamble region of the main file.
Summary:
This is a tricky case (we baked the assumption that symbols come from
the preamble xor mainfile pretty deeply) and the fix is a bit of a hack:
We look at the code to guess the macro names, and deserialize them from
the preamble "by hand".

Reviewers: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D60937
........
Fix buildbots http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/47684/

llvm-svn: 359796
2019-05-02 15:47:33 +00:00
Pavel Labath 5c4f031d71 Reinstate xfail-darwin in x86-64-ymm-write.test
It turns out writing into ymm registers really does not work there.

llvm-svn: 359795
2019-05-02 15:38:09 +00:00
Pavel Labath 58aa22f4e1 Fix the compile RUN line in x86-64-ymm-write.test
Optimistically assuming this was the result of the darwin failure too,
so removing the XFAIL there.

llvm-svn: 359794
2019-05-02 15:16:01 +00:00
Sanjay Patel 1972826178 [DAGCombiner] try repeated fdiv divisor transform before building estimate (2nd try)
The original patch was committed at rL359398 and reverted at rL359695 because of
infinite looping.

This includes a fix to check for a vector splat of "1.0" to avoid the infinite loop.

Original commit message:

This was originally part of D61028, but it's an independent diff.

If we try the repeated divisor reciprocal transform before producing an estimate sequence,
then we have an opportunity to use scalar fdiv. On x86, the trade-off is 1 divss vs. 5
vector FP ops in the default estimate sequence. On recent chips (Skylake, Ryzen), the
full-precision division is only 3 cycle throughput, so that's probably the better perf
default option and avoids problems from x86's inaccurate estimates.

The last 2 tests show that users still have the option to override the defaults by using
the function attributes for reciprocal estimates, but those patterns are potentially made
faster by converting the vector ops (including ymm ops) to scalar math.

Differential Revision: https://reviews.llvm.org/D61149

llvm-svn: 359793
2019-05-02 15:02:08 +00:00
Alexey Bataev 4ad6dbc5fd [OPENMP][NVPTX]Improve omp_get_max_threads() function.
Summary:
Function omp_get_max_threads() can always return 1 if current execution
mode is SPMD.

Reviewers: grokos, gtbercea, kkwli0

Subscribers: guansong, jdoerfert, caomhin, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D61379

llvm-svn: 359792
2019-05-02 14:52:52 +00:00
Sanjay Patel 284472be6d [SelectionDAG] remove constant folding limitations based on FP exceptions
We don't have FP exception limits in the IR constant folder for the binops (apart from strict ops),
so it does not make sense to have them here in the DAG either. Nothing else in the backend tries
to preserve exceptions (again outside of strict ops), so I don't see how this could have ever
worked for real code that cares about FP exceptions.

There are still cases (examples: unary opcodes in SDAG, FMA in IR) where we are trying (at least
partially) to preserve exceptions without even asking if the target supports FP exceptions. Those
should be corrected in subsequent patches.

Real support for FP exceptions requires several changes to handle the constrained/strict FP ops.

Differential Revision: https://reviews.llvm.org/D61331

llvm-svn: 359791
2019-05-02 14:47:59 +00:00
Alexey Bataev 8e6bf88cf7 [OPENMP][NVPTX]Improved omp_get_thread_limit() function.
Summary:
Function omp_get_thread_limit() in SPMD mode can return the maximum
available number of threads as a result.

Reviewers: grokos, gtbercea, kkwli0

Subscribers: guansong, jdoerfert, openmp-commits, caomhin

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D61378

llvm-svn: 359790
2019-05-02 14:46:32 +00:00
Anastasia Stulova 44bb0aa994 [OpenCL] Deduce static data members to __global addr space.
Similarly to static variables in OpenCL, static class data
members should be deduced to __global addr space.

Differential Revision: https://reviews.llvm.org/D61304

llvm-svn: 359789
2019-05-02 14:40:40 +00:00
Fangrui Song 0178cff279 [ELF] --plugin-opt=thinlto-index-only: create empty index files even if all bitcode files are lazy
Summary:
The gold plugin behavior (creating empty index files for lazy bitcode
files) was added in D46034, but it missed the case when there is no
non-lazy bitcode files, e.g.

    ld.lld -shared crti.o crtbeginS.o --start-lib bitcode.o --end-lib ...

crti.o crtbeginS.o are not bitcode, but our distributed build system
wants bitcode.o.thinlto.bc to confirm all expected outputs are created
based on all of the modules provided to the linker.

Differential Revision: https://reviews.llvm.org/D61420

llvm-svn: 359788
2019-05-02 14:05:20 +00:00
Michal Gorny 8d8c7e9e75 [lldb] [lit] Mark x86-64-ymm-write XFAIL on Darwin
llvm-svn: 359787
2019-05-02 14:03:42 +00:00
Simon Pilgrim df8daf0ef4 [X86][SSE] lowerAddSubToHorizontalOp - enable ymm extraction+fold
Limiting scalar hadd/hsub generation to the lowest xmm looks to be unnecessary - we will be extracting one upper xmm whatever, and we can remove a shuffle by using the hop which is inline with what shouldUseHorizontalOp expects to happen anyway.

Testing on btver2 (the main target for fast-hops) shows this is beneficial even for float ops where we have a 'shuffle' to extract the float result:
https://godbolt.org/z/0R-U-K

Differential Revision: https://reviews.llvm.org/D61426

llvm-svn: 359786
2019-05-02 14:00:55 +00:00
Eric Fiselier a4939d3507 Attempt to fix flaky tests.
The threaded cxa guard test attempted to test multithreaded waiting
by lining up a bunch of threads at a held init lock and releasing them.
The test initially wanted each thread to observe the lock being held,
but some threads may arive too late.

This patch cleans up the test and relaxes the restrictions.

llvm-svn: 359785
2019-05-02 13:22:55 +00:00
Michal Gorny 4d738566d6 [lldb] [lit] Use LLDB-like output for XMM registers in write tests
llvm-svn: 359784
2019-05-02 12:55:54 +00:00
Michal Gorny 72d3ca957c [lldb] [lit] Introduce tests for writing YMM registers
Differential Revision: https://reviews.llvm.org/D61431

llvm-svn: 359783
2019-05-02 12:55:44 +00:00
Simon Pilgrim 9fa56f7829 [X86][SSE] Move shouldUseHorizontalOp inside isHorizontalBinOp. NFCI.
Matches what we do for lowerAddSubToHorizontalOp and will make it easier to peek through subvectors to help fix PR39921

llvm-svn: 359782
2019-05-02 12:18:24 +00:00
James Henderson e4a89a1bee [llvm-strip]Add --no-strip-all to disable --strip-all behaviour (including default stripping)
If certain switches are not specified, llvm-strip behaves as if
--strip-all were specified. This means that for testing, when we don't
want the stripping behaviour, we have to specify one of these switches,
which can be confusing. This change adds --no-strip-all to allow an
alternative way of suppressing the default stripping, in a less
confusing manner.

Reviewed by: jakehehrlich, MaskRay

Differential Revision: https://reviews.llvm.org/D61377

llvm-svn: 359781
2019-05-02 11:53:02 +00:00
Michal Gorny 8120b7ac07 [lldb] [lit] Split 'register read' tests between zmm*, xmm16+, ymm16+
Since Darwin target implements support for zmm* registers without
matching support for the respectively added xmm* and ymm* registers,
split the tests for each register group.  To reduce code duplication,
the tests are using the same source file (which sets more registers
than necessary but that should not cause any harm).

Differential Revision: https://reviews.llvm.org/D61376

llvm-svn: 359780
2019-05-02 11:26:30 +00:00
Raphael Isemann 9a0acdf65e Add std::stack and std::queue support to CxxModuleHandler
Reviewers: aprantl, shafik

Reviewed By: aprantl, shafik

Subscribers: lldb-commits

Tags: #c_modules_in_lldb, #lldb

Differential Revision: https://reviews.llvm.org/D61305

llvm-svn: 359779
2019-05-02 11:25:50 +00:00
Sam McCall 929f639eb8 [clangd] Fix code completion of macros defined in the preamble region of the main file.
Summary:
This is a tricky case (we baked the assumption that symbols come from
the preamble xor mainfile pretty deeply) and the fix is a bit of a hack:
We look at the code to guess the macro names, and deserialize them from
the preamble "by hand".

Reviewers: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D60937

llvm-svn: 359778
2019-05-02 11:06:44 +00:00
Raphael Isemann 3356c32098 Rename Minion to ASTImporterDelegate
Summary:
I think there universal agreement that Minion isn't the best name for this class. This patch renames the class
 to ASTImporterDelegate to better reflect it's goal of monitoring and extending the ASTImporter.

Reviewers: aprantl, shafik, martong, a.sidorin, davide

Reviewed By: aprantl, shafik, davide

Subscribers: rnkovacs, davide, abidh, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D61299

llvm-svn: 359777
2019-05-02 10:58:33 +00:00
Fangrui Song 3d7b8fd4ec [LTO] Migrate typedef to using
using has been used in several places in the file. Migrate the rest for consistency.

llvm-svn: 359776
2019-05-02 10:52:34 +00:00
Fangrui Song facbfe0690 [llvm-readobj] Delete and inline relocAddressLess
It is used only once in COFFDumper.cpp. Deleting it from the public
interface seems better.

llvm-svn: 359775
2019-05-02 10:49:27 +00:00
Fangrui Song 8be28cdc52 [Object] Change getSectionName() to return Expected<StringRef>
Summary:
It currently receives an output parameter and returns
std::error_code. Expected<StringRef> fits for this purpose perfectly.

Differential Revision: https://reviews.llvm.org/D61421

llvm-svn: 359774
2019-05-02 10:32:03 +00:00
Raphael Isemann 71569d0d52 Inject only relevant local variables in the expression evaluation context
Summary:
In r259902, LLDB started injecting all the locals in every expression
evaluation. This fixed a bunch of issues, but also caused others, mostly
performance regressions on some codebases. The regressions were bad
enough that we added a setting in r274783 to control the behavior and
we have been shipping with the setting off to avoid the perf regressions.

This patch changes the logic injecting the local variables to only inject
the ones present in the expression typed by the user. The approach is
fairly simple and just scans the typed expression for every local name.
Hopefully this gives us the best of both world as it just realizes the
types of the variables really used by the expression.

Landing this requires the 2 other issues I pointed out today to be addressed
but I wanted to gather comments right away.

Original patch by Frédéric Riss!

Reviewers: jingham, clayborg, friss, shafik

Reviewed By: jingham, clayborg

Subscribers: teemperor, labath, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D46551

llvm-svn: 359773
2019-05-02 10:12:56 +00:00
Diana Picus 1136ea2d44 [ARM GlobalISel] Fixup r359768
Get rid of local variable used only in assertion.

llvm-svn: 359772
2019-05-02 10:08:29 +00:00
Sam McCall 15b89df9da [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.
Summary:
Previously we were just jumping from the symbol index to the symbol page, and
grabbing all the headers mentioned there. But the page often lists multiple
symbols, and so we got false positives and thus ambiguities (which were dropped).

Now we look at which declarations are for the symbol we want, and prefer headers
listed above that symbol. If there are none, we fall back to the old behavior.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61316

llvm-svn: 359771
2019-05-02 09:34:30 +00:00
Sam McCall 553c139fc3 [clangd] Standard library mapping: prefer "primary" versions of functions over variants.
Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61349

llvm-svn: 359770
2019-05-02 09:31:24 +00:00
Fangrui Song d8c2fa99c1 [ELF] Delete a cant-write test from test/lto/thinlto-index-only.ll
The test is performed by thinlto-cant-write-index.ll

llvm-svn: 359769
2019-05-02 09:29:24 +00:00
Diana Picus 06a61ccc42 [ARM GlobalISel] Select extensions to < 32 bits
Select G_SEXT and G_ZEXT with destination types smaller than 32 bits in
the exact same way as 32 bits. This overwrites the higher bits, but that
should be ok since all legal users of types smaller than 32 bits ignore
those bits anyway.

llvm-svn: 359768
2019-05-02 09:28:00 +00:00
Diana Picus 7da389818d [ARM GlobalISel] Rename some inst selector tests. NFC
Prepare to add support for extensions to types smaller than 32 bits.

llvm-svn: 359767
2019-05-02 09:24:47 +00:00
Diana Picus 53bcf6f2e7 [ARM GlobalISel] Legalize extensions to < 32 bits
Make it legal to extend from e.g. s1 to s8 or s16.

llvm-svn: 359766
2019-05-02 09:21:46 +00:00
Pavel Labath c19311185f Fix MSVC build
Address an ambiguity between lldb_private::Thread and
llvm::minidump::Thread. Follow-up to llvm r359762 (which introduced the
second type).

llvm-svn: 359765
2019-05-02 08:52:06 +00:00