Commit Graph

396140 Commits

Author SHA1 Message Date
Anshil Gandhi a35008955f [HIP] Allow target addr space in target builtins
This patch allows target specific addr space in target builtins for HIP. It inserts implicit addr
space cast for non-generic pointer to generic pointer in general, and inserts implicit addr
space cast for generic to non-generic for target builtin arguments only.

It is NFC for non-HIP languages.

Differential Revision: https://reviews.llvm.org/D102405
2021-08-09 16:38:04 -06:00
LLVM GN Syncbot 2708ccaa9a [gn build] Port 9d982c67ba 2021-08-09 22:10:24 +00:00
zoecarver 9d982c67ba [libcxx][ranges] Add `ranges::reverse_view`.
Differential Revision: https://reviews.llvm.org/D107096
2021-08-09 15:09:59 -07:00
Louis Dionne 706bd129b3 [libc++][NFC] Remove workaround for variadic templates in C++03
That's not necessary anymore, since we always build the dylib with
C++11 capabilities nowadays.

Differential Revision: https://reviews.llvm.org/D107772
2021-08-09 18:05:46 -04:00
Usman Nadeem 5420fc4a27 [AArch64][SVE][InstCombine] Unpack of a splat vector -> Scalar extend
Replace vector unpack operation with a scalar extend operation.
  unpack(splat(X)) --> splat(extend(X))

If we have both, unpkhi and unpklo, for the same vector then we may
save a register in some cases, e.g:
  Hi = unpkhi (splat(X))
  Lo = unpklo(splat(X))
   --> Hi = Lo = splat(extend(X))

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

Change-Id: I77c5c201131e3a50de1cdccbdcf84420f5b2244b
2021-08-09 14:58:54 -07:00
Usman Nadeem 85bbc05154 [AArch64][SVE][InstCombine] Move last{a,b} before binop if one operand is a splat value
Move the last{a,b} operation to the vector operand of the binary instruction if
the binop's operand is a splat value. This essentially converts the binop
to a scalar operation.

Example:
    // If x and/or y is a splat value:
    lastX (binop (x, y)) --> binop(lastX(x), lastX(y))

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

Change-Id: I93ff5302f9a7972405ee0d3854cf115f072e99c0
2021-08-09 14:48:41 -07:00
Michał Górny 614c7d0387 [lldb] [cmake] Add LLVM_LIT_ARGS override support for standalone builds
Add a LLVM_LIT_ARGS cached variable in order to make it possible
to override lit arguments when doing standalone builds.  Without that,
the user variable is ignored and the default options are always used.

Based on a similar solution found in clang.

Differential Revision: https://reviews.llvm.org/D107700
2021-08-09 23:36:01 +02:00
David Goldman ba06ac8b45 [clangd] Support `#pragma mark` in the outline
Xcode uses `#pragma mark -` to draw a divider in the outline view
and `#pragma mark Note` to add `Note` in the outline view. For more
information, see https://nshipster.com/pragma/.

Since the LSP spec doesn't contain dividers for the symbol outline,
instead we treat `#pragma mark -` as a group with children - the
decls that come after it, implicitly terminating when the symbol's
parent ends.

The following code:

```
@implementation MyClass

- (id)init {}

- (int)foo;
@end
```

Would give an outline like

```
MyClass
        > Overrides
                    > init
        > Public Accessors
                    > foo
```

Differential Revision: https://reviews.llvm.org/D105904
2021-08-09 16:23:53 -04:00
Alexander Belyaev edaffebcb2 Cloned from CL 389610703 by 'g4 patch'.
Original change by pifon@pifon:tfrt_clean:6896:citc on 2021/08/09 05:30:17.

Ad b

Differential Revision: https://reviews.llvm.org/D107762
2021-08-09 21:57:06 +02:00
Aart Bik 8cf8349eaa [mlir][sparse] add an elaborate sparse storage scheme integration test
Looks "under the hood" of the sparse stogage schemes.
Users should typically not be interested in these details
(hey, that is why we have "sparse compilers"!) but this
test makes sure the compact contents are as expected.

Reviewed By: ThomasRaoux, bixia

Differential Revision: https://reviews.llvm.org/D107683
2021-08-09 12:54:15 -07:00
Michał Górny 15cacab73f [lldb] [test] Skip Expr/nodefaultlib.cpp test if LD_PRELOAD Is used
Some LD_PRELOAD-ed libraries tend to interact badly with --nodefaultlib,
particularly Gentoo sandbox.  Do not run this test if LD_PRELOAD is
present in the running environment.

Differential Revision: https://reviews.llvm.org/D107701
2021-08-09 21:35:11 +02:00
Louis Dionne f599e7a789 [libc++] Refactor __perfect_forward, bind_front and not_fn
This patch fixes the constrains on the __perfect_forward constructor
and its call operators, which were incorrect. In particular, it makes
sure that we closely follow [func.require], which basically says that
we must deliver the bound arguments with the appropriate value category
or make the call ill-formed, but not silently fall back to using a
different value category.

As a fly-by, this patch also:
- Adds types __bind_front_t and __not_fn_t to make the result of
  calling bind_front and not_fn more opaque, and improve diagnostics
  for users.
- Adds a bunch of tests for bind_front and remove some that are now
  redundant.
- Adds some missing _LIBCPP_HIDE_FROM_ABI annotations.

Immense thanks to @tcanens for raising awareness about this issue, and
providing help with the = delete bits.

Differential Revision: https://reviews.llvm.org/D107199
2021-08-09 15:32:00 -04:00
Louis Dionne d232ec3c2a [libc++] Add timeout to BuildKite jobs
We just had a case where a build bot stalled in an infinite loop during
testing, and the whole pipeline got stuck. To avoid that from happening
in the future, use a timeout on BuildKite jobs.

Differential Revision: https://reviews.llvm.org/D107765
2021-08-09 15:31:04 -04:00
Paul Robinson 5b2037fa95 Revert "Reapply "[lit] Have REQUIRES support the target triple""
This reverts commit 187c69e9ef.
compiler-rt/test/cross_over_uniform_dist.test refuses to pass.
2021-08-09 12:14:57 -07:00
Paul Robinson a5915f983c Revert "[compiler-rt] Speculative fix for cross_over_uniform_dist.test"
This reverts commit dc11e69dd4.
The speculative fix did not help.
2021-08-09 12:14:57 -07:00
Aart Bik 05c7f450df [mlir][sparse] add dense to sparse conversion implementation
Implements lowering dense to sparse conversion, for static tensor types only.
First step towards general sparse_tensor.convert support.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D107681
2021-08-09 12:12:39 -07:00
Eli Friedman ac20e56911 [AArch64] Implement FCOPYSIGN for SVE.
I was originally going to try to implement this in target-independent
code, but it's actually sort of tricky to generate the correct sequence
for vectors like nxv2f32.  So just stick this in target-specific code,
at least for now.

Differential Revision: https://reviews.llvm.org/D107608
2021-08-09 12:06:48 -07:00
peter klausler 511ac6f8b4 [flang] Silence new build warning
Some build environments complain about unused data members in some
C++ translations of Fortran derived types; those members don't really
need to be present, so remove them.

Fix pushed w/o review to get build bots running again.
2021-08-09 11:57:45 -07:00
Florian Mayer 9b74924b6c Revert "[sanitizer] Intercept sem_open/sem_unlink"
This reverts commit 69a909b9fe.
2021-08-09 19:50:31 +01:00
Vitaly Buka 69a909b9fe [sanitizer] Intercept sem_open/sem_unlink
Without interceptor implementation may call strlen on internal
buffers causing false msan errors.

Differential Revision: https://reviews.llvm.org/D107615
2021-08-09 10:57:23 -07:00
Arnold Schwaighofer b987c283ae [coro] Correct CurrentBlock tracking bug recently introduced
We use the CurrentBlock to determine whether we have already processed a
block. Don't reuse this variable for setting where we should insert the
rematerialization. The rematerialization block is different to the
current block when we rematerialize for coro suspend block users.

Differential Revision: https://reviews.llvm.org/D107573
2021-08-09 10:41:41 -07:00
Michał Górny 27b238af16 [lldb] [test] Skip all vFile tests on Windows 2021-08-09 19:38:05 +02:00
Michał Górny 816aa9a5d7 Revert "[lldb] [test] Mark new vFile tests as XFAIL on Windows"
This reverts commit 0dc57a66a0.
2021-08-09 19:38:05 +02:00
Michał Górny 4c830b5f35 Revert "[lldb] [test] Use Windows-friendly modes in vFile O_CREAT tests"
This reverts commit 116b112bbf.
2021-08-09 19:38:05 +02:00
Krishna 5f6b4ce7de [InstCombine] Remove nnan requirement for transformation to fabs from select
In this patch, the "nnan" requirement is removed for the canonicalization of select with fcmp to fabs.
(i) FSub logic: Remove check for nnan flag presence in fsub. Example: https://alive2.llvm.org/ce/z/751svg (fsub).
(ii) FNeg logic: Remove check for the presence of nnan and nsz flag in fneg. Example: https://alive2.llvm.org/ce/z/a_fsdp (fneg).

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D106872
2021-08-09 22:58:51 +05:30
Michael Liao 6ec36d18ec [cuda] Mark builtin texture/surface reference variable as 'externally_initialized'.
- They need to be preserved even if there's no reference within the
  device code as the host code may need to initialize them based on the
  application logic.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D107718
2021-08-09 13:27:40 -04:00
Paul Robinson dc11e69dd4 [compiler-rt] Speculative fix for cross_over_uniform_dist.test
This change makes the REQUIRES clause unambiguously use triple-relative
feature names, in case that helps fix the bot failure seen at
https://lab.llvm.org/buildbot/#/builders/37/builds/5998
2021-08-09 10:20:05 -07:00
Andrzej Warzynski 41f4d47484 [flang] Make `flang` translate `-M{fixed|free}` into `-f{fixed|free}-form`
We are only adding this in `flang` - the bash wrapper script for the
driver. We don't have any specific plans to support `-M{fixed|free}` in
`flang-new` (i.e. the actual driver).

That feature was requested by one of our users.

Differential Revision: https://reviews.llvm.org/D107081
2021-08-09 18:06:09 +01:00
Pirama Arumuga Nainar 49fabd9d76 [openmp] Do not use shared memory on Android
Android provides ashmem/ASharedMemory support on newer releases, which
we can use if requested by openmp users on Android.

Also refactor the preprocessor check for using shared memory to
kmp_config.h.cmake.

Differential Revision: https://reviews.llvm.org/D107181
2021-08-09 09:41:32 -07:00
peter klausler 65f5290432 [flang] Implement runtime Assign()
Define an API for, and implement, runtime support for arbitrary
assignment of one descriptor's data to another, with full support for
(re)allocation of allocatables with finalization when necessary,
user-defined derived type assignment TBP calls, and intrinsic (default)
componentwise assignment of derived type instances with allocation of
automatic components.  Also clean up API and implementation of
finalization/destruction using knowledge gained while studying
edge cases for assignment in the 2018 standard.

The look-up procedure for special procedure bindings in derived
types has been optimized from O(N) to O(1) since it will probably
matter more.  This required some analysis in runtime derived type
description table construction in semantics and some changes to the
table schemata.

Executable Fortran tests have been developed; they'll be added
to the test base once they can be lowered and run by f18.

Differential Revision: https://reviews.llvm.org/D107678
2021-08-09 09:31:32 -07:00
Mark de Wever 6f85d9e104 [libc++][doc] Improve contributor documentation.
Shorty before branching  LLVM 13 a new CMake option was added. This
option `LIBCXX_ENABLE_INCOMPLETE_FEATURES` lacks the contributor
documentation. This patch rectifies that issue.

Differential Revision: https://reviews.llvm.org/D107596
2021-08-09 18:26:07 +02:00
Mark de Wever 96ed451f8d [libc++][NFC] Remove MSVC specific code.
Switching `__builtin_clzll`  to `__libcpp_clz` should work on all
platforms and no longer require MSVC specific code.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D107709
2021-08-09 18:13:49 +02:00
Raphael Isemann 3240000546 [lldb][NFC] Remove never read member variable IOHandler::m_editing
The last read access to this variable was removed in 2015 in
4446487d71 .
2021-08-09 18:05:53 +02:00
Michał Górny 52d89d26aa [lldb] [test] Mark vFile tests as LLGS-specific 2021-08-09 17:43:37 +02:00
Robin Giese 875a16bcfc [lldb] Fix break introduced in 14735ca
The `File::OpenOptions` were renamed; this fixes up a callsite that breaks for
macOS builds. (See
14735cab65)

Differential Revision: https://reviews.llvm.org/D107767
2021-08-09 17:34:57 +02:00
Ivan Zhechev eabae4cf57 [Flang] Ported test_symbols to Python
Due to unavailability of Flang testing on Windows, the shell scripts
are being ported to Python. The following changes are being made in
this patch: removed test_symbols.sh and common.sh, and ported them
to Python. Changes to the tests themselves so that they use the
python scripts instead of the shell script.

Reviewed By: Meinersbur, awarzynski, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D107041
2021-08-09 16:20:06 +01:00
Mark Danial 39ca3e5541 Update: clang/test/Profile/gcc-flag-compatibility.c to have -flto on AIX
Reviewed By: Whitney

Differential Revision: https://reviews.llvm.org/D106815
2021-08-09 14:57:38 +00:00
Kazu Hirata e382f59605 [DWARF] Remove findRange (NFC)
The last use was removed on Apr 15, 2019 in commit
f56a436891.
2021-08-09 07:27:04 -07:00
Guillaume Chatelet c82ba4b820 [libc] Update size distributions for memory benchmarks
All distributions have been updated using 7 days worth of data.
2021-08-09 14:22:32 +00:00
Bradley Smith 73ecb9987b [AArch64][SVE] Fix assertion failure when lowering fixed length gather/scatter
The patterns for fixed length gather/scatter with 32-bit offsets and
64-bit memory type are slightly different that the rest of the patterns,
as such the lowering needs to be slightly different to ensure the
correct types are used.

Differential Revision: https://reviews.llvm.org/D107576
2021-08-09 14:05:22 +00:00
Anton Afanasyev c0eb94231e [Test] Precommit tests for PR50555 2021-08-09 16:55:27 +03:00
Paul Robinson 187c69e9ef Reapply "[lit] Have REQUIRES support the target triple"
This reverts commit 3229c97151.

With a2acac6 in place this should provide enough info to work out
any repeat of the failure in cross_ovver_uniform_dist.test.
2021-08-09 06:43:52 -07:00
Michał Górny 116b112bbf [lldb] [test] Use Windows-friendly modes in vFile O_CREAT tests 2021-08-09 15:43:08 +02:00
Michał Górny 0dc57a66a0 [lldb] [test] Mark new vFile tests as XFAIL on Windows 2021-08-09 15:43:08 +02:00
Arthur O'Dwyer 3d2d3b3e7a [libc++] [test] IWYU in <concepts> tests. 2021-08-09 09:39:36 -04:00
Sven van Haastregt 19bd806a1a [OpenCL] Add missing virtual destructor
Followup after f9ffe61fb5 ("[OpenCL] Factor out
OpenCLBuiltinFileEmitterBase; NFC", 2021-08-09) introduced a
-Wnon-virtual-dtor warning.
2021-08-09 13:49:52 +01:00
Michał Górny d6bf9dcbd5 [lldb] [test] Fix TestGdbRemotePlatformFile with non-022 umask 2021-08-09 14:12:06 +02:00
Paul Robinson a2acac68eb Have compiler-rt/test/fuzzer report info to help diagnose a test issue 2021-08-09 05:11:27 -07:00
Jeremy Morse d4ce9e463d [DWARF] Revert sharing subprograms across CUs
This patch is a revert of e08f205f5c. In that patch, DW_TAG_subprograms
were permitted to be referenced across CU boundaries, to improve stack
trace construction using call site information. Unfortunately, as
documented in PR48790, the way that subprograms are "owned" by dwarf units
is sufficiently complicated that subprograms end up in unexpected units,
invalidating cross-unit references.

There's no obvious way to easily fix this, and several attempts have
failed. Revert this to ensure correct DWARF is always emitted.

Three tests change in addition to the reversion, but they're all very
light alterations.

Differential Revision: https://reviews.llvm.org/D107076
2021-08-09 12:43:43 +01:00
Kim-Anh Tran 0dda542531 [DWARF5] Fix offset check when using .debug_names
When going through the CU entries in the name index,
make sure to compare the name entry's CU
offset against the skeleton CU's offset.

Previously there would be a mismatch, since the
wrong offset was compared, and thus no suitable
entry was found.

Reviewed By: jankratochvil

Differential Revision: https://reviews.llvm.org/D106270
2021-08-09 13:15:14 +02:00