platform/upstream/llvm.git
2 years ago[libc++] Remove _LIBCXX_MODULES_BUILD and ext/ headers from header tests
Nikolas Klauser [Thu, 3 Mar 2022 13:32:41 +0000 (14:32 +0100)]
[libc++] Remove _LIBCXX_MODULES_BUILD and ext/ headers from header tests

Reviewed By: ldionne, Quuxplusone, #libc

Spies: libcxx-commits, arichardson

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

2 years ago[analyzer] Done some changes to detect Uninitialized read by the char array manipulat...
Shivam [Thu, 3 Mar 2022 15:32:34 +0000 (21:02 +0530)]
[analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

Few weeks back I was experimenting with reading the uninitialized values from src , which is actually a bug but the CSA seems to give up at that point . I was curious about that and I pinged @steakhal on the discord and according to him this seems to be a genuine issue and needs to be fix. So I goes with fixing this bug and thanks to @steakhal who help me creating this patch. This feature seems to break some tests but this was the genuine problem and the broken tests also needs to fix in certain manner. I add a test but yeah we need more tests,I'll try to add more tests.Thanks

Reviewed By: steakhal, NoQ

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

2 years ago[LLDB] Remove cases of using namespace llvm:: from header file
Shafik Yaghmour [Thu, 3 Mar 2022 18:39:06 +0000 (10:39 -0800)]
[LLDB] Remove cases of using namespace llvm:: from header file

We have using namespace llvm::dwarf in dwarf.h header globally. Replacing that
with a using namespace within lldb_private::dwarf and moving to a
using namespace lldb_private::dwarf in .cpp files and fully qualified names
in the few header files.

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

2 years ago[libc++] Move several defines to ADDITIONAL_COMPILE_FLAGS in the test suite
Louis Dionne [Thu, 3 Mar 2022 18:14:31 +0000 (13:14 -0500)]
[libc++] Move several defines to ADDITIONAL_COMPILE_FLAGS in the test suite

This avoids -Wmacro-redefined when turning warnings on with GCC.

2 years ago[libc++] Move .fail.cpp test to .verify.cpp
Louis Dionne [Thu, 3 Mar 2022 18:07:42 +0000 (13:07 -0500)]
[libc++] Move .fail.cpp test to .verify.cpp

2 years ago[CostModel] Change printer pass wording to work with update_analyze_test_checks.py
Arthur Eubanks [Thu, 3 Mar 2022 18:02:29 +0000 (10:02 -0800)]
[CostModel] Change printer pass wording to work with update_analyze_test_checks.py

update_analyze_test_checks.py looks for very specific wording, update
the printer pass to match the legacy `-analyze -cost-model` wording.

2 years ago[analyzer] Done some changes to detect Uninitialized read by the char array manipulat...
Shivam [Thu, 3 Mar 2022 15:32:34 +0000 (21:02 +0530)]
[analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

Few weeks back I was experimenting with reading the uninitialized values from src , which is actually a bug but the CSA seems to give up at that point . I was curious about that and I pinged @steakhal on the discord and according to him this seems to be a genuine issue and needs to be fix. So I goes with fixing this bug and thanks to @steakhal who help me creating this patch. This feature seems to break some tests but this was the genuine problem and the broken tests also needs to fix in certain manner. I add a test but yeah we need more tests,I'll try to add more tests.Thanks

Reviewed By: steakhal, NoQ

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

2 years ago[InstCombine][Analysis] Move getFCmpCode and getPredForFCmpCode to CmpInstAnalysis...
Craig Topper [Thu, 3 Mar 2022 17:16:20 +0000 (09:16 -0800)]
[InstCombine][Analysis] Move getFCmpCode and getPredForFCmpCode to CmpInstAnalysis. NFC

The similar getICmpCode and getPredForICmpCode are already there.
This moves FP for consistency.

I think InstCombine is currently the only user of both.

Reviewed By: RKSimon

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

2 years agoRevert "[lldb] Correct case in description of breakpoint --on-catch/throw"
David Spickett [Thu, 3 Mar 2022 17:20:31 +0000 (17:20 +0000)]
Revert "[lldb] Correct case in description of breakpoint --on-catch/throw"

This reverts commit 6b3b3ef344504334f43afe76c805d2e6e7b587e9.

Jim Ingham informed me that the upper case is a hint to the option
name, like you might see in a menu to show you what the shortcut is.

2 years ago[NFC] Change TemplateInstantiator to refer to the base using a typedef
Erich Keane [Thu, 3 Mar 2022 16:56:46 +0000 (08:56 -0800)]
[NFC] Change TemplateInstantiator to refer to the base using a typedef

A few places were inconsistent here, which makes a refactor to support
delayed concepts significantly more difficult.

2 years ago[flang][nfc] Fix GCC 11 build
Andrzej Warzynski [Thu, 3 Mar 2022 17:04:32 +0000 (17:04 +0000)]
[flang][nfc] Fix GCC 11 build

After merging https://reviews.llvm.org/D120801, Flang no longer builds
with GCC 11:
```
../llvm-project/flang/lib/Semantics/runtime-type-info.cpp:385:22: error: variable ‘lenParam’ set but not used [-Werror=unused-but-set-variable]
  385 |       for (SymbolRef lenParam : *lenParameters) {
      |                      ^~~~~~~~
```

I'm sending this without a review as a quick fix.

2 years ago[NFC][Clang][OpaquePtr] Remove calls to Address::deprecated in
Akira Hatanaka [Thu, 3 Mar 2022 16:54:46 +0000 (08:54 -0800)]
[NFC][Clang][OpaquePtr] Remove calls to Address::deprecated in
CGBlocks.cpp

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

2 years ago[lldb] Fix DataExtractor symbol conflict
Emre Kultursay [Thu, 3 Mar 2022 16:47:26 +0000 (08:47 -0800)]
[lldb] Fix DataExtractor symbol conflict

There are two DataExtractors in scope: one from the llvm namespace and
one from the lldb_private namespace. Some Microsoft Visual C++ compilers
(I tested with MSVC 14.23 specifically) cannot handle this situation,
and generate ambiguous symbol errors. This change fixes this compile
error.

Differential revision: https://reviews.llvm.org/D120718

2 years ago[IVDescriptor] Find original 'Previous' for first-order recurrences.
Florian Hahn [Thu, 3 Mar 2022 16:41:26 +0000 (16:41 +0000)]
[IVDescriptor] Find original 'Previous' for first-order recurrences.

This patch extends first-order recurrence handling to support cases
where we already sunk an instruction for a different recurrence, but
LastPrev comes before Previous.

To handle those cases correctly, we need to find the earliest entry for
the sink-after chain, because this is references the Previous from the
original recurrence. This is needed to ensure we use the correct
instruction as sink point.

Depends on D118558.

Reviewed By: Ayal

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

2 years ago[flang][nfc] Add missing build dependency
Andrzej Warzynski [Thu, 3 Mar 2022 16:33:54 +0000 (16:33 +0000)]
[flang][nfc] Add missing build dependency

Two buildbots have started failing recently:
* https://lab.llvm.org/buildbot/#/builders/181/builds/3894
* https://lab.llvm.org/buildbot/#/builders/191/builds/3908

Build error:
```
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/flang/examples/FlangOmpReport/FlangOmpReport.cpp:21:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/flang/include/flang/Frontend/FrontendActions.h:15:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/llvm/../mlir/include/mlir/IR/BuiltinOps.h:16:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/llvm/../mlir/include/mlir/IR/FunctionInterfaces.h:17:
In file included from /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/llvm/../mlir/include/mlir/IR/BuiltinTypes.h:12:
/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/llvm/../mlir/include/mlir/IR/BuiltinAttributeInterfaces.h:279:10: fatal error: 'mlir/IR/BuiltinAttributeInterfaces.h.inc' file not found
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```

I have not been able to reproduce locally, but from this log it is clear
that the rule for `flangFrontend` is missing the
`MLIRBuiltinAttributeInterfacesIncGen` dependency from MLIR.  I couldn't
identify a breaking commit. I suspect that until now we have simply been
"lucky" and that dependency just happened to be built before
`flangFrontend`.

I am sending this without a review - the change is rather
straightforward and the only way to verify it is to make the buildbots
test it.

2 years ago[PS4] isPS4 and isPS4CPU are not meaningfully different
Paul Robinson [Wed, 2 Mar 2022 15:56:32 +0000 (10:56 -0500)]
[PS4] isPS4 and isPS4CPU are not meaningfully different

2 years ago[libc][Obvious] Add a few missing deps listings.
Siva Chandra Reddy [Thu, 3 Mar 2022 10:46:01 +0000 (10:46 +0000)]
[libc][Obvious] Add a few missing deps listings.

2 years ago[UpdateTestChecks] Don't skip first line with --filter
Sebastian Neubauer [Mon, 14 Feb 2022 11:07:34 +0000 (12:07 +0100)]
[UpdateTestChecks] Don't skip first line with --filter

body_start was never used, resulting in the first filtered line to be
skipped.
Fixes the --filter option introduced in D117694.

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

2 years ago[libcxx][test][NFC] Add tests for constructors of unordered [multi]map since C++14
Ruslan Arutyunyan [Thu, 3 Mar 2022 14:04:59 +0000 (17:04 +0300)]
[libcxx][test][NFC] Add tests for constructors of unordered [multi]map since C++14

Add tests for C++14 constructors in unordered_map and unordered_multimap

unordered_[multi]map(size_type sz, const allocator_type& alloc);
unordered_[multi]map(size_type sz, const hasher& hash, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]map(InputIt first, InputIt last, size_type sz, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]map(InputIt first, InputIt last, size_type sz, const hasher& hash, const allocator_type& alloc);

unordered_[multi]map(initializer_list<value_type> init, size_type sz, const allocator_type& alloc);
unordered_[multi]map(initializer_list<value_type> init, size_type sz, const hasher& hash, const allocator_type& alloc);

Reviewed By: ldionne, rarutyun, #libc

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

2 years ago[Attributor] Regenerate test checks (NFC)
Nikita Popov [Thu, 3 Mar 2022 15:59:17 +0000 (16:59 +0100)]
[Attributor] Regenerate test checks (NFC)

2 years ago[mlir] Fix gcc -std=c++17 compilation.
Michael Kruse [Thu, 3 Mar 2022 14:57:22 +0000 (08:57 -0600)]
[mlir] Fix gcc -std=c++17 compilation.

Ensure that `Handler` within the class is interpreted as the as the current template instantiation (instead the class template itself).

Fixes #53447

Reviewed By: rriddle

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

2 years ago[Clang] Diagnose invalid member variable with template parameters
Corentin Jabot [Thu, 3 Mar 2022 10:27:45 +0000 (11:27 +0100)]
[Clang] Diagnose invalid member variable with template parameters

Fixes https://github.com/llvm/llvm-project/issues/54151

Reviewed By: erichkeane, aaron.ballman

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

2 years ago[mlir][linalg] NFC: minor cleanups after moving pad to tensor dialect
Lei Zhang [Thu, 3 Mar 2022 14:44:40 +0000 (09:44 -0500)]
[mlir][linalg] NFC: minor cleanups after moving pad to tensor dialect

Reviewed By: mravishankar

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

2 years ago[Concepts] Check constraints for explicit template instantiations
Roy Jacobson [Thu, 3 Mar 2022 14:17:07 +0000 (06:17 -0800)]
[Concepts] Check constraints for explicit template instantiations

The standard requires[0] member function constraints to be checked when
explicitly instantiating classes. This patch adds this constraints
check.

This issue is tracked as #46029 [1].

Note that there's an related open CWG issue (2421[2]) about what to do when
multiple candidates have satisfied constraints. This is particularly an
issue because mangling doesn't contain function constraints, and so the
following code still ICEs with definition with same mangled name
'_ZN1BIiE1fEv' as another definition:

template<class T>
struct B {
  int f() requires std::same_as<T, int> {
    return 0;
  }
  int f() requires (std::same_as<T, int> &&
                    !std::same_as<T, char>) {
    return 1;
  }
};

template struct B<int>;

Also note that the constraints checking while instantiating *functions*
is still not implemented. I started looking at it but It's a bit more
complicated. I believe in such a case we have to consider the partial
constraints order and potentially choose the best candidate out of the
set of multiple valid ones.

[0]: https://eel.is/c++draft/temp.explicit#10
[1]: https://github.com/llvm/llvm-project/issues/46029
[2]: https://cplusplus.github.io/CWG/issues/2421.html

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

2 years ago[libc++] Fix initialization of __fill_
Jake Egan [Thu, 3 Mar 2022 14:28:23 +0000 (09:28 -0500)]
[libc++] Fix initialization of __fill_

`basic_ios` delays initialization of `__fill_` to `widen(' ')` until `fill()` is called. But, `fill(char_type)` is missing this logic, so the fill character does not get initialized to whitespace if `fill(char_type)` is called first. This patch adds this logic to `fill(char_type)`.

Reviewed By: #libc, ldionne, Quuxplusone

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

2 years ago[SDAG] try harder to remove a rotate from X == 0
Sanjay Patel [Thu, 3 Mar 2022 13:48:25 +0000 (08:48 -0500)]
[SDAG] try harder to remove a rotate from X == 0

https://alive2.llvm.org/ce/z/mJP7XP

This can be viewed as expanding the compare into and/or-of-compares:
https://alive2.llvm.org/ce/z/bkZYWE
followed by reduction of each compare.

This could be extended in several ways:
1. There's a (X & Y) == -1 sibling.
2. We can recurse through more than 1 'or'.
3. The fold could be generalized beyond rotates - any operation that
   only changes the order of bits (bswap, bitreverse).

This is a transform noted in D111530.

2 years ago[x86] add tests for setcc of rotate; NFC
Sanjay Patel [Wed, 2 Mar 2022 21:58:02 +0000 (16:58 -0500)]
[x86] add tests for setcc of rotate; NFC

2 years ago[FuncSpec] Remove unnecessary function pointer type check
Nikita Popov [Thu, 3 Mar 2022 14:18:15 +0000 (15:18 +0100)]
[FuncSpec] Remove unnecessary function pointer type check

We will check a bit later that the constant is in fact a function,
so the separate check for a function pointer type is largely
redunant. Also simplify the cast stripping with
stripPointerCasts().

2 years ago[AArch64] Use first op of FADDPv* instead of implicit def.
Florian Hahn [Thu, 3 Mar 2022 13:32:08 +0000 (13:32 +0000)]
[AArch64] Use first op of FADDPv* instead of implicit def.

This patch updates the FADDPv* patterns that only use the lower half of
the result register. For those patterns, the second operand does not
matter because its results won't be used.

Instead of introducing new implicit defs for those operands, just use
the first operand. The problem with using new implicit defs is that
register allocation can introduce unnecessary dependencies by using a
different register than the first operand.

For motivating cases, see the changes in the fadd_reduction_*_in_loop
cases. Without this change, the first faddp in the loop has an
unnecessary additional dependency through v0, which is also used for
a cross-iteration reduction.

This can noticeable impact performance. For slightly bigger loops,
this change can improve performance by 15%.

Reviewed By: sdesmalen, t.p.northover

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

2 years ago[pseudo] Fix an out-of-bound access for LRTable::Actions.
Haojian Wu [Thu, 3 Mar 2022 13:21:31 +0000 (14:21 +0100)]
[pseudo] Fix an out-of-bound access for LRTable::Actions.

Without this patch, when End == Start, we access Actions[Actions.end()]
though we return an empty result.
This fixes an assertion failure in MSVC STL debug build.

2 years ago[mlir][bufferize] Always bufferize top-to-bottom
Matthias Springer [Thu, 3 Mar 2022 12:52:11 +0000 (21:52 +0900)]
[mlir][bufferize] Always bufferize top-to-bottom

This ensures that we generate memref types with matching layout maps. (Especially when using partial bufferization passes.)

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

2 years ago[FuncSpec][NFC] Refactor internal structures.
Alexandros Lamprineas [Thu, 3 Mar 2022 11:53:01 +0000 (11:53 +0000)]
[FuncSpec][NFC] Refactor internal structures.

`ArgInfo` is reduced to only contain a pair of {formal,actual} values.
The specialized function `Fn` and the `Partial` flag are redundant in
this structure. The `Gain` is moved to a new struct `SpecializationInfo`.

The value mappings created by cloneCandidateFunction() are being used
by rewriteCallSites() for matching the formal arguments of recursive
functions.

The list of specializations is passed by reference to calculateGains()
instead of being returned by value.

The `IsPartial` flag is removed from isArgumentInteresting() and
getPossibleConstants() as it's no longer used anywhere in the code.

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

2 years ago[clang-format] Handle wrapped else for RemoveBracesLLVM
owenca [Thu, 3 Mar 2022 07:36:34 +0000 (23:36 -0800)]
[clang-format] Handle wrapped else for RemoveBracesLLVM

Removes the newline before the right brace that's followed by an
else on the next line.

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

2 years ago[RISCV] Add cost modelling for masked memory op
Alex Tsao [Wed, 2 Mar 2022 18:03:48 +0000 (02:03 +0800)]
[RISCV] Add cost modelling for masked memory op

The patch adds very basic cost model for masked memory op on scalable vector.

Reviewed By: frasercrmck

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

2 years ago[gn build] Port 8de8731591fe
LLVM GN Syncbot [Thu, 3 Mar 2022 12:36:38 +0000 (12:36 +0000)]
[gn build] Port 8de8731591fe

2 years agoRevert "[VP] Introducing VectorBuilder, the VP intrinsic builder"
Simon Moll [Thu, 3 Mar 2022 12:34:20 +0000 (13:34 +0100)]
Revert "[VP] Introducing VectorBuilder, the VP intrinsic builder"

This reverts commit 8bcbfb50e8ea24998f9adf2f50b1f63b499299ed.

Taking this patch offline to fix breakage: https://lab.llvm.org/buildbot/#/builders/110/builds/10912

2 years ago[libc++] Use -I instead of -isystem to include headers in the test suite
Nikolas Klauser [Thu, 3 Mar 2022 11:10:30 +0000 (12:10 +0100)]
[libc++] Use -I instead of -isystem to include headers in the test suite

Using -isystem marks the headers as system headers, which means that we
don't actually get all the warnings that we'd normally get if we included
the headers as user headers.

The goal of the test suite is normally to mirror as closely as possible
how users would use the library. Technically, this change goes against
that philosophy, since users should be using `-isystem` (if they ever
need to specify the libc++ path explicitly, which should be a rare
occurence). However, I believe fishing out additional warnings from
the headers provides more value, hence this change. Ideally, we'd be
able to still use `-isystem`, but instruct Clang to still emit warnings
from the libc++ headers (e.g. we could tell Clang to emit warnings in
any file inside `<...>/usr/include/c++/v1`).

Reviewed By: #libc, ldionne, #libc_abi

Spies: Mordante, EricWF, mstorsjo, mgorny, aheejin, arichardson, philnik, jloser, libcxx-commits

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

2 years ago[libcxx][test][NFC] Add tests for C++14 constructors of unordered sets
Ruslan Arutyunyan [Thu, 3 Mar 2022 11:48:54 +0000 (14:48 +0300)]
[libcxx][test][NFC] Add tests for C++14 constructors of unordered sets

Add tests for C++14 constructors in unordered_set and unordered_multiset:

unordered_[multi]set(size_type sz, const allocator_type& alloc);
unordered_[multi]set(size_type sz, const hasher& hash, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]set(InputIt first, InputIt last, size_type sz, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]set(InputIt first, InputIt last, size_type sz, const hasher& hash, const allocator_type& alloc);

unordered_[multi]set(initializer_list<value_type> init, size_type sz, const allocator_type& alloc);
unordered_[multi]set(initializer_list<value_type> init, size_type sz, const hasher& hash, const allocator_type& alloc);

Reviewed By: ldionne, Quuxplusone, rarutyun, #libc

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

2 years ago[X86][XOP] Tidyup VPHADD/VPHSUB unary horizontal ops default schedule class
Simon Pilgrim [Thu, 3 Mar 2022 12:07:48 +0000 (12:07 +0000)]
[X86][XOP] Tidyup VPHADD/VPHSUB unary horizontal ops default schedule class

Based off Agner and AMD SoG tables, the XOP VPHADD/VPHSUB unary horizontal ops are as fast as basic arithmetic ops, not the slower SSSE3 binary horizontal add/sub ops. This also matches what the bdver2 model already lists.

Noticed while investigating reduction add optimizations.

2 years ago[NFC] TypePromotion test
Sam Parker [Thu, 3 Mar 2022 11:47:02 +0000 (11:47 +0000)]
[NFC] TypePromotion test

2 years agoReapply [lit] Read command stdout/stderr as text on Windows
Martin Storsjö [Sat, 26 Feb 2022 22:16:24 +0000 (00:16 +0200)]
Reapply [lit] Read command stdout/stderr as text on Windows

This takes care of normalizing newlines back to single LF instead
of CRLF.

Fix up a couple tests that accidentally pass binary data to stdout.

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

2 years ago[libcxx] [test] Fix get/put long_double_ru_RU on Glibc, FreeBSD and Windows
Martin Storsjö [Tue, 22 Feb 2022 11:23:53 +0000 (13:23 +0200)]
[libcxx] [test] Fix get/put long_double_ru_RU on Glibc, FreeBSD and Windows

Note, reducing ios.width() in put_long_double instead of using variable
padding, when using a variable width symbol. Some of those tests didn't
actually trigger any padding in the existing form, with a longer
currency symbol; reduce the width so there's no actual padding with the
slightly shorter currency symbol either.

The tests for the international currency symbol use the same amount of
padding on all platforms, so they still exercise the padding properly.

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

2 years ago[AArch64] Update costs for some fp16 converts
David Green [Thu, 3 Mar 2022 11:17:24 +0000 (11:17 +0000)]
[AArch64] Update costs for some fp16 converts

This updates the costs for FP16 converts, as some of them were pretty
high.

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

2 years ago[mlir][linalg][bufferize] Migrate --linalg-bufferize to BufferizableOpInterface-based...
Matthias Springer [Thu, 3 Mar 2022 10:50:32 +0000 (19:50 +0900)]
[mlir][linalg][bufferize] Migrate --linalg-bufferize to BufferizableOpInterface-based bufferization

This commit deletes the old dialect conversion-based bufferization patterns, which are now obsolete.

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

2 years ago[AArch64] Vector shifts cost 1
David Green [Thu, 3 Mar 2022 10:42:57 +0000 (10:42 +0000)]
[AArch64] Vector shifts cost 1

The costs of vector shifts was 2 as opposed to 1, as the nodes are
marked custom. Fix this like the others and mark the nodes as cheap.

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

2 years ago[gn build] Port 8bcbfb50e8ea
LLVM GN Syncbot [Thu, 3 Mar 2022 10:33:40 +0000 (10:33 +0000)]
[gn build] Port 8bcbfb50e8ea

2 years ago[VP] Introducing VectorBuilder, the VP intrinsic builder
Simon Moll [Thu, 3 Mar 2022 10:31:42 +0000 (11:31 +0100)]
[VP] Introducing VectorBuilder, the VP intrinsic builder

VectorBuilder wraps around an IRBuilder and
VectorBuilder::createVectorInstructions emits VP intrinsics as if they
were regular instructions.

Reviewed By: craig.topper

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

2 years agoRevert "[mlir] Add extensible dialects"
Andrzej Warzynski [Thu, 3 Mar 2022 10:24:35 +0000 (10:24 +0000)]
Revert "[mlir] Add extensible dialects"

This reverts commit dbe9f0914fcfd8444fd9656821af0f1a34a27e7a.

The flang-x86_64-windows buildbot has been failing since this has been merged:
* https://lab.llvm.org/buildbot/#/builders/172/builds/9124
Similar failure was reported by the pre-commit CI.

2 years ago[analyzer] Improve NoOwnershipChangeVisitor's understanding of deallocators
Kristóf Umann [Fri, 4 Feb 2022 14:40:26 +0000 (15:40 +0100)]
[analyzer] Improve NoOwnershipChangeVisitor's understanding of deallocators

The problem with leak bug reports is that the most interesting event in the code
is likely the one that did not happen -- lack of ownership change and lack of
deallocation, which is often present within the same function that the analyzer
inlined anyway, but not on the path of execution on which the bug occured. We
struggle to understand that a function was responsible for freeing the memory,
but failed.

D105819 added a new visitor to improve memory leak bug reports. In addition to
inspecting the ExplodedNodes of the bug pat, the visitor tries to guess whether
the function was supposed to free memory, but failed to. Initially (in D108753),
this was done by checking whether a CXXDeleteExpr is present in the function. If
so, we assume that the function was at least party responsible, and prevent the
analyzer from pruning bug report notes in it. This patch improves this heuristic
by recognizing all deallocator functions that MallocChecker itself recognizes,
by reusing MallocChecker::isFreeingCall.

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

2 years ago[InstCombine] Support opaque pointers in callee bitcast fold
Nikita Popov [Thu, 3 Mar 2022 10:05:31 +0000 (11:05 +0100)]
[InstCombine] Support opaque pointers in callee bitcast fold

To make this actually trigger, we also need to check whether the
function types differ, which is a hidden cast under opaque pointers.
The transform is somewhat less relevant there because it is
primarily about pointer bitcasts, but it can also happen with other
bit- or pointer-castable types.

Byval handling is easier with opaque pointers because there is no
need to adjust the byval type, we only need to make sure that it's
still a pointer.

2 years ago[lldb] Correct case in description of breakpoint --on-catch/throw
David Spickett [Thu, 3 Mar 2022 10:04:07 +0000 (10:04 +0000)]
[lldb] Correct case in description of breakpoint --on-catch/throw

Somehow we ended up with catcH/throW.

2 years ago[InstCombine] Remove unnecessary byval check in callee cast fold
Nikita Popov [Thu, 3 Mar 2022 09:49:00 +0000 (10:49 +0100)]
[InstCombine] Remove unnecessary byval check in callee cast fold

The logic for handling this was fixed in
8d7f118ab2b9e51d6cf2811291e319b4d977eb8c, but the check for byval
on the callee was retained. This resulted in a weird situation
where the transform would work depending on whether the byval
was only on the call or on both the call and the function.

2 years ago[InstCombine] Add callee bitcast test with byval on callee (NFC)
Nikita Popov [Thu, 3 Mar 2022 09:47:19 +0000 (10:47 +0100)]
[InstCombine] Add callee bitcast test with byval on callee (NFC)

Same as the existing test, but the callee also has a byval
attribute.

2 years ago[AArch64] Allow copying of SVE registers in Streaming SVE
Cullen Rhodes [Thu, 3 Mar 2022 09:20:22 +0000 (09:20 +0000)]
[AArch64] Allow copying of SVE registers in Streaming SVE

Reviewed By: sdesmalen

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

2 years ago[AArch64] Add legal types for Streaming SVE
Cullen Rhodes [Thu, 3 Mar 2022 09:20:13 +0000 (09:20 +0000)]
[AArch64] Add legal types for Streaming SVE

The compiler currently crashes for scalable types when compiling with
+sme, e.g.

  define <vscale x 4 x i32> @foo(<vscale x 4 x i32> %a) {
    ret <vscale x 4 x i32> %a
  }

since it doesn't know how to legalize the types. SME implies a subset of
SVE (+streaming-sve), the hasSVE predication in the backend needs
extending to consider types/operations that are legal in Streaming SVE.

This is the first patch adding legal types <-> register classes. Before
making the change +sve(2) was temporarily replaced with +sme in all the
intrinsics tests to see what failed, and again after making the change.
For all the tests that passed after adding the legal types another RUN
line has been added for +streaming-sve. More patches to follow.

Reviewed By: sdesmalen

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

2 years ago[AST] Use RecoveryExpr to model a DeclRefExpr which refers to an invalid Decl.
Haojian Wu [Mon, 28 Feb 2022 09:25:59 +0000 (10:25 +0100)]
[AST] Use RecoveryExpr to model a DeclRefExpr which refers to an invalid Decl.

Previously, we didin't build a DeclRefExpr which refers to an invalid declaration.

In this patch, we handle this case by building an empty RecoveryExpr,
which will preserve more broken code (AST parent nodes that contain the
RecoveryExpr is preserved in the AST).

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

2 years ago[Scalarizer] Avoid pointer element type accesses
Nikita Popov [Thu, 3 Mar 2022 09:28:09 +0000 (10:28 +0100)]
[Scalarizer] Avoid pointer element type accesses

Pass through the load/store type to the Scatterer instead.

2 years agoAdd missing include under -DEXPENSIVE_CHECKS
serge-sans-paille [Thu, 3 Mar 2022 09:19:10 +0000 (10:19 +0100)]
Add missing include under -DEXPENSIVE_CHECKS

This is a follow-up to 59630917d6cc7c4a273f617f92bf6190ee2992e1

2 years ago[flang] Generate PDT runtime type info in the type definition scope
Jean Perier [Thu, 3 Mar 2022 09:14:08 +0000 (10:14 +0100)]
[flang] Generate PDT runtime type info in the type definition scope

This patches modifies PDT runtime type info generation so that it is
easier to handle derived type descriptor in lowering. It changes three
aspects:

1. The symbol name suffix of runtime type info for PDT instantiation is
   changed from a serial number unrelated to the types to an encoding of
   the instantiated KIND parameters.
2. New runtime type info is not created for each instantiation of PDT without
   KIND parameters (only length parameters). Instead, the runtime type
   info of the type definition is always used. It is updated to contain
   the component descriptions.
3. Runtime type info of PDT instantiation is now always generated in the
   scope where the type is defined. If several PDT type instantiation
   are made in different scope with the same kind parameters, they will
   use the same runtime type info.

Rational of the change:

In lowering, derived type descriptors are not mapped when instantiating derived
type objects. They are mapped later when symbol knowledge is not available anymore.
This mapping is based on the FIR representation of derived types. For
PDT, the FIR type information does not allow deducing the instantiation
scope, it only allows retrieving the type name, the type _definition_
scope, and the kind parameter values. Therefore, in order to be able to
retrieve the derived type descriptor from a FIR type, the derived type
descriptor must be generated in the definition scope and must reflect
the kind parameters. This justifies the need for changes 1. and 3.
above (suffix and scope change). Changes 2. comes from the fact that
all runtime type info of type without kind parameters can be generated
from the type definition, and that because of the suffix change, the
symbol name for type definition and type instantiation are the same.

Although this change is first motivated by how lowering handles derived
types, I believe it is also an improvement from a functional point of
view since this change will allow reducing the number of generated
runtime type info for PDTs, since redundant information (different
instantiations with same kind parameters) will only be generated once.

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

2 years ago[flang] Handle optional TARGET associate in ASSOCIATED runtime
Jean Perier [Thu, 3 Mar 2022 09:11:19 +0000 (10:11 +0100)]
[flang] Handle optional TARGET associate in ASSOCIATED runtime

The TARGET argument of ASSOCIATED may be dynamically optional, in which
case ASSOCIATED(POINTER, TARGET) is equal to ASSOCIATED(TARGET).

Make the runtime argument a pointer so that it can detect and handle
arguments that are dynamically optional.

Also fix the runtime to check if TARGET base address is not null and if
its element size is not null to match the requirement of ASSOCIATED
regarding TARGET:
- if TARGET is an object: true iff [..] TARGET is not a zerosized storage sequence
- if TARGET is a POINTER: true iff [..] POINTER and TARGET are associated

Not that ASSOCIATED will also returns false if TARGET is an unallocated allocatable.
This is not described in the standard, but is a unanimous behaviour of
existing compilers.

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

2 years ago[flang] Support PDT type descriptors in codegen
Jean Perier [Thu, 3 Mar 2022 09:07:34 +0000 (10:07 +0100)]
[flang] Support PDT type descriptors in codegen

This change updates the mapping of derived types and type descriptor
object names to support kind parametrized derived types (PDT).
It moves the custom name mapping to the internal name utility.

To improve robustness and error reporting, type descriptors are also now
required to be generated in all compilation unit that manipulates
derived types. The previous codegen relied on the fact that descriptors
not defined in the current FIR module were available externally. Errors
with missing type descriptors were only caught at link time.

This patch makes derived type definition mandatory, except if the
derived types are expected to not have derived type descriptors (builtin
types), or if the newly added debug switch `--ignore-missing-type-desc`
is set. In those cases, a null pointer is used as type descriptor
pointer. The debug switch intends to help testing FIR to LLVM passes
without having to bother providing type descriptor data structures that
are normally built by the front-end.

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

2 years ago[llvm-stress] Support opaque pointers
Nikita Popov [Thu, 3 Mar 2022 08:59:06 +0000 (09:59 +0100)]
[llvm-stress] Support opaque pointers

With opaque pointers, generate the load/store type independently
of the pointer type.

2 years ago[DSE] Drop redundant WalkerStepLimit adjustment
Nikita Popov [Thu, 3 Mar 2022 08:40:28 +0000 (09:40 +0100)]
[DSE] Drop redundant WalkerStepLimit adjustment

There is a general WalkerStepLimit adjustment higher up in the
loop, and I don't see any reason why this particular case would
need additional adjustment. Furthermore, this could underflow.

2 years ago[RISCV] Fold store of vmv.f.s to a vse with VL=1.
jacquesguan [Mon, 21 Feb 2022 08:13:44 +0000 (16:13 +0800)]
[RISCV] Fold store of vmv.f.s to a vse with VL=1.

This patch support the FP part of D109482.

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

2 years ago[libcxx] [test] Fix the collate compare test for Glibc, Windows and FreeBSD
Martin Storsjö [Wed, 19 Jan 2022 10:38:15 +0000 (10:38 +0000)]
[libcxx] [test] Fix the collate compare test for Glibc, Windows and FreeBSD

The old expected behaviour was specific to Apple platforms,
while Glibc, Windows and FreeBSD collate differently (ignoring
case). Make the old tested behaviour a special case for Apple
platforms, and make the default case the one used by the other
three.

In clang-cl/DLL configurations, the test is hit by
https://llvm.org/PR41018 (making the test fail to link).

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

2 years ago[LLD] [COFF] Order .debug_* sections at the end, to avoid leaving gaps if stripped
Martin Storsjö [Wed, 2 Mar 2022 10:33:31 +0000 (12:33 +0200)]
[LLD] [COFF] Order .debug_* sections at the end, to avoid leaving gaps if stripped

So far, we sort all discardable sections at the end, with only some
extra logic to make sure that the .reloc section is at the start
of that group of sections. But if there are other discardable
sections, other than .reloc, they must also be ordered before
.debug_* sections, to avoid leaving gaps if the executable is
stripped.

(Stripping executables doesn't remove all discardable sections,
only the ones named .debug_*).

Rust binaries seem to include a .rmeta section, which is marked
discardable. This fixes stripping such binaries if built with
dwarf debug info included.

This fixes issues observed in MSYS2 in
https://github.com/msys2/MINGW-packages/pull/10555.

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

2 years ago[MLIR] Fix afterIP for dynamic worksharing-loop after collaping loops
Peixin-Qiao [Thu, 3 Mar 2022 07:21:44 +0000 (15:21 +0800)]
[MLIR] Fix afterIP for dynamic worksharing-loop after collaping loops

The loopInfos gets invalidated after collapsing nested loops. Use the
saved afterIP since the returned afterIP by applyDynamicWorkshareLoop
may be not valid.

Reviewed By: shraiysh

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

2 years agoCleanup includes: Transform/Scalar
serge-sans-paille [Wed, 2 Mar 2022 15:38:19 +0000 (16:38 +0100)]
Cleanup includes: Transform/Scalar

Estimated impact on preprocessor output line:
before: 1062981579
after:  1062494547

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D120817

2 years agoRevert "Add missing include under EXPENSIVE_CHECK"
serge-sans-paille [Tue, 1 Mar 2022 20:01:59 +0000 (21:01 +0100)]
Revert "Add missing include under EXPENSIVE_CHECK"

This reverts commit eeaca53df7a030862bd1160950a6264aeb605cc6.

It's a duplicate of
https://reviews.llvm.org/rG50874a188b94a25827963956887b878d3701509a

2 years ago[lldb] Update the CI docs
Jonas Devlieghere [Thu, 3 Mar 2022 06:40:04 +0000 (22:40 -0800)]
[lldb] Update the CI docs

Remove the reproducer bot and the fedora bot.

2 years ago[lldb] Update TestBasicEntryValues.py for `image lookup` output
Jonas Devlieghere [Thu, 3 Mar 2022 06:33:38 +0000 (22:33 -0800)]
[lldb] Update TestBasicEntryValues.py for `image lookup` output

Update TestBasicEntryValues.py for 15983c28aa81 which changes the output
for `image lookup -v`. This should fix the debian and macos build bots.

2 years ago[Support][AArch64] Detect a few more host CPU features on AArch64
Danila Malyutin [Thu, 10 Feb 2022 14:31:03 +0000 (17:31 +0300)]
[Support][AArch64] Detect a few more host CPU features on AArch64

Add detecton for lse, sve and sve2 on linux

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

2 years ago[lldb] Fix python errors in gdbremote.py
Dominic Chen [Wed, 2 Mar 2022 06:54:59 +0000 (22:54 -0800)]
[lldb] Fix python errors in gdbremote.py

Fix exceptions encountered while debugging gdb protocol

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

2 years ago[PowerPC][atomics] Precommit test cases for i128 cmpxchg. NFC.
Kai Luo [Thu, 3 Mar 2022 02:08:22 +0000 (10:08 +0800)]
[PowerPC][atomics] Precommit test cases for i128 cmpxchg. NFC.

2 years agoMore bazel fixes.
David Blaikie [Thu, 3 Mar 2022 02:05:11 +0000 (02:05 +0000)]
More bazel fixes.

2 years ago[lldb] Skip check for the lldb prompt in TestIOHandlerProcessSTDIO
Jonas Devlieghere [Thu, 3 Mar 2022 00:41:46 +0000 (16:41 -0800)]
[lldb] Skip check for the lldb prompt in TestIOHandlerProcessSTDIO

The check for the prompt isn't essential for this test. The check fail
on the lldb-arm-ubuntu because of what appears to be a missing space
after the prompt. Rather than disabling the test, let's see if we can
get it to pass without it.

2 years agoMore attempts at bazel fix
David Blaikie [Thu, 3 Mar 2022 00:18:54 +0000 (00:18 +0000)]
More attempts at bazel fix

2 years ago[flang] Remove bogus messages for actual/dummy procedure argument compatibility
Peter Klausler [Thu, 24 Feb 2022 00:36:39 +0000 (16:36 -0800)]
[flang] Remove bogus messages for actual/dummy procedure argument compatibility

Add new IsCompatibleWith() member functions to many classes in evaluate::characteristics
that apply more nuanced compatibility checking for function results, dummy
arguments, and procedure interfaces than the previous tests for complete
equivalence.  Use IsCompatibleWith() in semantics for call checking.

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

2 years ago[lldb] Update error messages in TestMemoryHistory.py
Jonas Devlieghere [Wed, 2 Mar 2022 23:56:43 +0000 (15:56 -0800)]
[lldb] Update error messages in TestMemoryHistory.py

Update TestMemoryHistory.py for daba82362228b4aa460c26079c028ebf832066fd
which changes the CommandObject & Disassemble error messages .

2 years ago[lldb] Devirtualize IOHandler::{IsActive,SetIsDone,GetIsDone} (NFC)
Jonas Devlieghere [Wed, 2 Mar 2022 23:38:02 +0000 (15:38 -0800)]
[lldb] Devirtualize IOHandler::{IsActive,SetIsDone,GetIsDone} (NFC)

There are no implementations overriding these methods.

Differential revision: https://reviews.llvm.org/D120766

2 years ago[lldb] Avoid data race in IOHandlerProcessSTDIO
Jonas Devlieghere [Wed, 2 Mar 2022 19:59:55 +0000 (11:59 -0800)]
[lldb] Avoid data race in IOHandlerProcessSTDIO

This patch fixes a data race in IOHandlerProcessSTDIO. The race is
happens between the main thread and the event handling thread. The main
thread is running the IOHandler (IOHandlerProcessSTDIO::Run()) when an
event comes in that makes us pop the process IO handler which involves
cancelling the IOHandler (IOHandlerProcessSTDIO::Cancel). The latter
calls SetIsDone(true) which modifies m_is_done. At the same time, we
have the main thread reading the variable through GetIsDone().

This patch avoids the race by using a mutex to synchronize the two
threads. On the event thread, in IOHandlerProcessSTDIO ::Cancel method,
we obtain the lock before changing the value of m_is_done. On the main
thread, in IOHandlerProcessSTDIO::Run(), we obtain the lock before
reading the value of m_is_done. Additionally, we delay calling SetIsDone
until after the loop exists, to avoid a potential race between the two
writes.

  Write of size 1 at 0x00010b66bb68 by thread T7 (mutexes: write M2862, write M718324145051843688):
    #0 lldb_private::IOHandler::SetIsDone(bool) IOHandler.h:90 (liblldb.15.0.0git.dylib:arm64+0x971d84)
    #1 IOHandlerProcessSTDIO::Cancel() Process.cpp:4382 (liblldb.15.0.0git.dylib:arm64+0x5ddfec)
    #2 lldb_private::Debugger::PopIOHandler(std::__1::shared_ptr<lldb_private::IOHandler> const&) Debugger.cpp:1156 (liblldb.15.0.0git.dylib:arm64+0x3cb2a8)
    #3 lldb_private::Debugger::RemoveIOHandler(std::__1::shared_ptr<lldb_private::IOHandler> const&) Debugger.cpp:1063 (liblldb.15.0.0git.dylib:arm64+0x3cbd2c)
    #4 lldb_private::Process::PopProcessIOHandler() Process.cpp:4487 (liblldb.15.0.0git.dylib:arm64+0x5c583c)
    #5 lldb_private::Debugger::HandleProcessEvent(std::__1::shared_ptr<lldb_private::Event> const&) Debugger.cpp:1549 (liblldb.15.0.0git.dylib:arm64+0x3ceabc)
    #6 lldb_private::Debugger::DefaultEventHandler() Debugger.cpp:1622 (liblldb.15.0.0git.dylib:arm64+0x3cf2c0)
    #7 std::__1::__function::__func<lldb_private::Debugger::StartEventHandlerThread()::$_2, std::__1::allocator<lldb_private::Debugger::StartEventHandlerThread()::$_2>, void* ()>::operator()() function.h:352 (liblldb.15.0.0git.dylib:arm64+0x3d1bd8)
    #8 lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) HostNativeThreadBase.cpp:62 (liblldb.15.0.0git.dylib:arm64+0x4c71ac)
    #9 lldb_private::HostThreadMacOSX::ThreadCreateTrampoline(void*) HostThreadMacOSX.mm:18 (liblldb.15.0.0git.dylib:arm64+0x29ef544)

  Previous read of size 1 at 0x00010b66bb68 by main thread:
    #0 lldb_private::IOHandler::GetIsDone() IOHandler.h:92 (liblldb.15.0.0git.dylib:arm64+0x971db8)
    #1 IOHandlerProcessSTDIO::Run() Process.cpp:4339 (liblldb.15.0.0git.dylib:arm64+0x5ddc7c)
    #2 lldb_private::Debugger::RunIOHandlers() Debugger.cpp:982 (liblldb.15.0.0git.dylib:arm64+0x3cb48c)
    #3 lldb_private::CommandInterpreter::RunCommandInterpreter(lldb_private::CommandInterpreterRunOptions&) CommandInterpreter.cpp:3298 (liblldb.15.0.0git.dylib:arm64+0x506478)
    #4 lldb::SBDebugger::RunCommandInterpreter(bool, bool) SBDebugger.cpp:1166 (liblldb.15.0.0git.dylib:arm64+0x53604)
    #5 Driver::MainLoop() Driver.cpp:634 (lldb:arm64+0x100006294)
    #6 main Driver.cpp:853 (lldb:arm64+0x100007344)

Differential revision: https://reviews.llvm.org/D120762

2 years ago[AMDGPU] Removed XFAIL from hsa-gfx940-v3.s. NFC.
Stanislav Mekhanoshin [Wed, 2 Mar 2022 23:35:08 +0000 (15:35 -0800)]
[AMDGPU] Removed XFAIL from hsa-gfx940-v3.s. NFC.

Handling of big endian was fixed in D88858.

2 years ago[AMDGPU] Add gfx1036 target
Aakanksha [Wed, 2 Mar 2022 23:23:40 +0000 (23:23 +0000)]
[AMDGPU] Add gfx1036 target

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

2 years ago[flang] Extend ProvenanceRange::Suffix() to handle crash case
Peter Klausler [Fri, 18 Feb 2022 18:17:04 +0000 (10:17 -0800)]
[flang] Extend ProvenanceRange::Suffix() to handle crash case

Suffix() can be called from AllSources::IntersectionWithSourceFiles()
when a contiguous range of source provenance overlaps a macro expansion.
It skips over the macro expansion and recurses on the remainder of
the range, which might end with a bit that does overlap with a
source file.  However, in the case where the original range is
entirely within the expanded macro, Suffix() crashes when called
with a skip offset greater than the size of the range.

Rather than add logic around this and other calls to Suffix() to
avoid passing an out-of-range skip, it's better to accommodate it
in Suffix() and return an empty result.

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

2 years ago[flang] Avoid bogus warning from MSVC build
Peter Klausler [Wed, 2 Mar 2022 22:04:02 +0000 (14:04 -0800)]
[flang] Avoid bogus warning from MSVC build

And expand common::BitSet from 64 to 128 maximum elements.

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

2 years ago[AMDGPU] Fix 3 tests with expensive checks. NFC.
Stanislav Mekhanoshin [Wed, 2 Mar 2022 22:36:58 +0000 (14:36 -0800)]
[AMDGPU] Fix 3 tests with expensive checks. NFC.

Image instructions are now not available for all targets anymore,
so a generic target cannot use it.

2 years ago[libc++] Preliminary cleanups to ranges::iter_move. NFC.
Arthur O'Dwyer [Wed, 2 Mar 2022 22:39:31 +0000 (17:39 -0500)]
[libc++] Preliminary cleanups to ranges::iter_move. NFC.

This is just getting some non-functional cleanups out of the way
prior to the meat of the change in D120417.

2 years ago[LLDB] Add error message when using --show-variable-ranges without -v
Zequan Wu [Wed, 2 Mar 2022 22:20:08 +0000 (14:20 -0800)]
[LLDB] Add error message when using --show-variable-ranges without -v

2 years ago[AMDGPU] gfx940 removes all image instructions
Stanislav Mekhanoshin [Tue, 1 Mar 2022 20:43:35 +0000 (12:43 -0800)]
[AMDGPU] gfx940 removes all image instructions

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

2 years ago[AMDGPU] Add gfx940 target
Stanislav Mekhanoshin [Mon, 28 Feb 2022 22:20:12 +0000 (14:20 -0800)]
[AMDGPU] Add gfx940 target

This is target definition only.

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

2 years agoAttempt fix for Bazel build from
David Blaikie [Wed, 2 Mar 2022 21:45:25 +0000 (21:45 +0000)]
Attempt fix for Bazel build from
3ba66435d9377cb99ee1718807cbf6a7c4b0d6d3

2 years ago[LLDB] Dump valid ranges of variables
Zequan Wu [Wed, 16 Feb 2022 19:18:54 +0000 (11:18 -0800)]
[LLDB] Dump valid ranges of variables

This allows `image lookup -a ... -v` to print variables only if the given
address is covered by the valid ranges of the variables. Since variables created
in dwarf plugin always has empty scope range, print the variable if it has
empty scope.

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

2 years ago[SDAG] refactor foldSetCCWithRotate; NFC
Sanjay Patel [Wed, 2 Mar 2022 20:03:35 +0000 (15:03 -0500)]
[SDAG] refactor foldSetCCWithRotate; NFC

There are more potential optimizations to make here,
so rearrange to make it easier to append those.

2 years ago[x86] add nounwind attribute to test; NFC
Sanjay Patel [Wed, 2 Mar 2022 19:49:05 +0000 (14:49 -0500)]
[x86] add nounwind attribute to test; NFC

This will avoid some noise in case the register allocation changes.

2 years ago[lldb] Explicitly declare the default constructor in PlatformAndroidRemoteGDBServer
Pavel Labath [Wed, 2 Mar 2022 20:12:49 +0000 (21:12 +0100)]
[lldb] Explicitly declare the default constructor in PlatformAndroidRemoteGDBServer

MSVC does not seem to like the inheriting constructor.

2 years ago[libcxx] [test] Fix en_US money locale formatting tests on Windows
Martin Storsjö [Tue, 18 Jan 2022 10:48:12 +0000 (10:48 +0000)]
[libcxx] [test] Fix en_US money locale formatting tests on Windows

In the en_US locale on Windows, negative currency amounts is formatted
as "($0.01)" instead of "-$0.01".

Adjust the test references accordingly, making these tests pass.

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

2 years ago[mlir][SPIRV] Split up StandardToSPIRV now that the Standard dialect is gone
River Riddle [Tue, 1 Mar 2022 21:30:14 +0000 (13:30 -0800)]
[mlir][SPIRV] Split up StandardToSPIRV now that the Standard dialect is gone

StandardToSPIRV currently contains an assortment of patterns converting from
different dialects to SPIRV. This commit splits up StandardToSPIRV into separate
conversions for each of the dialects involved (some of which already exist).

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

2 years ago[CSSPGO] Even flow distribution
spupyrev [Mon, 31 Jan 2022 17:59:45 +0000 (09:59 -0800)]
[CSSPGO] Even flow distribution

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

2 years ago[flang] Accommodate module subprograms defined in the same module
Peter Klausler [Fri, 18 Feb 2022 22:58:12 +0000 (14:58 -0800)]
[flang] Accommodate module subprograms defined in the same module

The symbol table, name resolution, and semantic checks for module
subprograms -- esp. for MODULE FUNCTION and MODULE SUBROUTINE, but
also MODULE PROCEDURE -- essentially assumed that the subprogram
would be defined in a submodule of the (sub)module containing its
interface.  However, it is conforming to instead declare a module
subprogram in the *same* (sub)module as its interface, and we need
to handle that case.

Since this case involves two symbols in the same scope with the same
name, the symbol table details for subprograms have been extended
with a pointer to the original module interface, rather than relying
on searching in scopes.

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

2 years ago[Hexagon] Recognize "access size" for dcfetch
Krzysztof Parzyszek [Wed, 2 Mar 2022 18:02:52 +0000 (10:02 -0800)]
[Hexagon] Recognize "access size" for dcfetch

Dcfetch doesn't really have an access size, but the immediate
offset is scaled as for an 8-byte access, so treat it as such.