platform/upstream/llvm.git
4 years ago[SystemZ] Add NoMerge MIFlag
Ilya Leoshkevich [Tue, 30 Jun 2020 10:44:30 +0000 (12:44 +0200)]
[SystemZ] Add NoMerge MIFlag

Summary:
This fixes ASan and MSan tests on SystemZ after
commit 6a822e20ce70 ("[ASan][MSan] Remove EmptyAsm and set the CallInst
to nomerge to avoid from merging.").

Based on commit 80e107ccd088 ("Add NoMerge MIFlag to avoid MIR branch
folding").

Reviewers: uweigand, jonpa

Reviewed By: uweigand

Subscribers: hiraditya, llvm-commits, Andreas-Krebbel

Tags: #llvm

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

4 years ago[llvm][Z3][NFC] Improve mkBitvector performance
Balazs Benics [Tue, 30 Jun 2020 10:26:50 +0000 (12:26 +0200)]
[llvm][Z3][NFC] Improve mkBitvector performance

We convert `APSInt`s to Z3 Bitvectors in an inefficient way for most cases.
We should not serialize to std::string just to pass an int64 integer.

For the vast majority of cases, we use at most 64-bit width integers (at least
in the Clang Static Analyzer). We should simply call the `Z3_mk_unsigned_int64`
and `Z3_mk_int64` instead of the `Z3_mk_numeral` as stated in the Z3 docs.
Which says:
> It (`Z3_mk_unsigned_int64`, etc.) is slightly faster than `Z3_mk_numeral` since
> it is not necessary to parse a string.

If the `APSInt` is wider than 64 bits, we will use the `Z3_mk_numeral` with a
`SmallString` instead of a heap-allocated `std::string`.

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

4 years ago[clangd] Remove redundant `findRefs` calls. NFC.
lh123 [Sun, 28 Jun 2020 12:32:26 +0000 (20:32 +0800)]
[clangd] Remove redundant `findRefs` calls. NFC.

Summary:
Remove redundant `findRefs` calls.

Reviewers: sammccall, kadircet

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

Tags: #clang

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

4 years ago[mlir] Extended BufferPlacement to support nested region control flow.
Marcel Koester [Tue, 30 Jun 2020 09:58:45 +0000 (11:58 +0200)]
[mlir] Extended BufferPlacement to support nested region control flow.

Summary: The current BufferPlacement implementation does not support
nested region control flow. This CL adds support for nested regions via
the RegionBranchOpInterface and the detection of branch-like
(ReturnLike) terminators inside nested regions.

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

4 years ago[AST][RecoveryExpr] Add error-bit to NestNameSpecifierDependence and TemplateNameDepe...
Haojian Wu [Thu, 25 Jun 2020 08:13:48 +0000 (10:13 +0200)]
[AST][RecoveryExpr] Add error-bit to NestNameSpecifierDependence and TemplateNameDependence.

Summary:
We might lose the error-bit if the error-bit goes through the code path
"error type/expr" -> "error template argument" -> "nested name specifier" ->
... -> "template Specialization type"

Template name also needs this, as a template can be nested into
an error specifier, e.g. templateName apply in
`TC<decltype(<recovery-expr>(Foo, int()))>::template apply`

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[Alignment][NFC] Migrate AtomicExpandPass to Align
Guillaume Chatelet [Tue, 30 Jun 2020 09:54:45 +0000 (09:54 +0000)]
[Alignment][NFC] Migrate AtomicExpandPass to Align

This is a followup on D78403.
I'm unsure about `getAtomicOpAlign` overloads that take `AtomicRMWInst` and `AtomicCmpXchgInst`, shouldn't `getAlign` provide the correct answer already?

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

4 years ago[lldb] Modernize TestOperatorOverload.py asserts
Raphael Isemann [Mon, 29 Jun 2020 13:48:32 +0000 (15:48 +0200)]
[lldb] Modernize TestOperatorOverload.py asserts

4 years ago[IR] NoFree IntrinsicProperty.
sstefan1 [Tue, 30 Jun 2020 09:04:54 +0000 (11:04 +0200)]
[IR] NoFree IntrinsicProperty.

Summary:
Separate introduction of IntrNoFree property as suggested in D70365

Reviewers: arsenm, nhaehnle

Tags: #llvm

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

4 years ago[yaml2obj] - Support reading a content as an array of bytes using the new 'ContentArr...
Georgii Rymar [Tue, 23 Jun 2020 08:16:19 +0000 (11:16 +0300)]
[yaml2obj] - Support reading a content as an array of bytes using the new 'ContentArray' key.

It implements the way to describe a section content using a multi line description. E.g:

```
- Name:         .foo
  Type:         SHT_PROGBITS
  ContentArray: [ 0x11, 0x22, 0x33, 0x44,                                ## .long 11223344
                  0x55, 0x66,                                            ## .short 5566.
                  0x77,                                                  ## .byte 0x77
                  0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00 ] ## .quad 0x8899aabbccddeeff
```

It was briefly discussed in D75123 thread previously.

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

4 years ago[yaml2obj] - Add a way to set default values for macros used in a YAML.
Georgii Rymar [Wed, 24 Jun 2020 12:18:53 +0000 (15:18 +0300)]
[yaml2obj] - Add a way to set default values for macros used in a YAML.

Currently we have to override all macros that are declared. But in many
cases it is convenient to use default values and to override only
a particular one or two.

This provides a way to set a default value for any macro:

```
Symbols:
  - Name: [[FOO=foo]]
```

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

4 years agoAMDGPU/GlobalISel: Select icmp intrinsic
Petar Avramovic [Tue, 30 Jun 2020 08:57:41 +0000 (10:57 +0200)]
AMDGPU/GlobalISel: Select icmp intrinsic

Select into corresponding V_CMP instruction based on CmpInst predicate,
stored as immediate, in last operand.

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

4 years ago[GlobalISel][InlineAsm] Add support for matching input constraints
Petar Avramovic [Tue, 30 Jun 2020 08:49:05 +0000 (10:49 +0200)]
[GlobalISel][InlineAsm] Add support for matching input constraints

Find def operand that corresponds to matching constraint and
tie input to that operand.

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

4 years ago[mlir] Fix case in MLIRGPUtoVulkanTransforms
Marius Brehler [Tue, 30 Jun 2020 08:46:32 +0000 (01:46 -0700)]
[mlir] Fix case in MLIRGPUtoVulkanTransforms

This changes the casing of MLIRGPUtoVulkanTransforms to be consistent
with other transform libraries.

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

4 years agoRevert "Fix missing build dependency on omp_gen."
Simon Tatham [Tue, 30 Jun 2020 08:28:41 +0000 (09:28 +0100)]
Revert "Fix missing build dependency on omp_gen."

This reverts commit ed4328c607306a2aa6df4833a0dce4482edbc94c.

My change apparently caused a buildbot to fail with the error

  CMake Error at /b/sanitizer-x86_64-linux-autoconf/build/tsan_release_build/lib/cmake/llvm/AddLLVM.cmake:869 (add_dependencies):
  The dependency target "omp_gen" of target "ScudoBenchmarks.x86_64" does not
  exist.

I don't at all understand why, because as far as I can see, the target
`omp_gen` is only added to `LLVM_COMMON_DEPENDS` after having been
created, so there //should// be no way it can end up on anything's
dependency list if it doesn't exist! But apparently it happened anyway.

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

4 years ago[MLIR][Shape] Fix lowering of `shape.get_extent`
Frederik Gossen [Tue, 30 Jun 2020 08:33:49 +0000 (08:33 +0000)]
[MLIR][Shape] Fix lowering of `shape.get_extent`

The declarative conversion patterns caused crashes in the asan configuration.
The non-declarative implementation circumvents this.

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

4 years ago[DWARFYAML][debug_info] Replace 'InitialLength' with 'Format' and 'Length'.
Xing GUO [Tue, 30 Jun 2020 07:07:45 +0000 (15:07 +0800)]
[DWARFYAML][debug_info] Replace 'InitialLength' with 'Format' and 'Length'.

'InitialLength' is replaced with 'Format' (DWARF32 by default) and 'Length' in this patch.
Besides, test cases for DWARFv4 and DWARFv5, DWARF32 and DWARF64 is
added.

Reviewed By: jhenderson

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

4 years ago[clang-tidy][docs] Fix malformed link in ReleaseNotes
Nathan James [Tue, 30 Jun 2020 08:17:48 +0000 (09:17 +0100)]
[clang-tidy][docs] Fix malformed link in ReleaseNotes

4 years ago[Alignment][NFC] TargetLowering::allowsMemoryAccess
Guillaume Chatelet [Tue, 30 Jun 2020 08:16:59 +0000 (08:16 +0000)]
[Alignment][NFC] TargetLowering::allowsMemoryAccess

Second patch of a series to adapt TargetLowering::allowsXXX functions

This 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

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

4 years ago[Alignment][NFC] Migrate PPC, X86 and XCore backends to Align
Guillaume Chatelet [Tue, 30 Jun 2020 08:08:45 +0000 (08:08 +0000)]
[Alignment][NFC] Migrate PPC, X86 and XCore backends to Align

This 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

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

4 years ago[builtins] Change si_int to int in some helper declarations
Anatoly Trosinenko [Tue, 30 Jun 2020 08:06:52 +0000 (11:06 +0300)]
[builtins] Change si_int to int in some helper declarations

This patch changes types of some integer function arguments or return values from `si_int` to the default `int` type to make it more compatible with `libgcc`.

The compiler-rt/lib/builtins/README.txt has a link to the [libgcc specification](http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc). This specification has an explicit note on `int`, `float` and other such types being just illustrations in some cases while the actual types are expressed with machine modes.

Such usage of always-32-bit-wide integer type may lead to issues on 16-bit platforms such as MSP430. Provided [libgcc2.h](https://gcc.gnu.org/git/?p=gcc.git;a=blob_plain;f=libgcc/libgcc2.h;hb=HEAD) can be used as a reference for all targets supported by the libgcc, this patch fixes some existing differences in helper declarations.

This patch is expected to not change behavior at all for targets with 32-bit `int` type.

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

4 years ago[MSP430] Declare comparison LibCalls as returning i16 instead of i32
Anatoly Trosinenko [Tue, 30 Jun 2020 08:04:17 +0000 (11:04 +0300)]
[MSP430] Declare comparison LibCalls as returning i16 instead of i32

For TI's distribution of msp430-gcc
```
msp430-elf-gcc -S -o- -Os -x c - <<< "int f(float a, float b) { return a != b; }"
```
does not mention `R13` at all. `__libgcc_cmp_return__` machine mode is 2 byte on MSP430, as well.

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

4 years ago[Alignment][NFC] Migrate AArch64, ARM, Hexagon, MSP and NVPTX backends to Align
Guillaume Chatelet [Tue, 30 Jun 2020 07:49:21 +0000 (07:49 +0000)]
[Alignment][NFC] Migrate AArch64, ARM, Hexagon, MSP and NVPTX backends to Align

This 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

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

4 years agoFix missing build dependency on omp_gen.
Simon Tatham [Tue, 30 Jun 2020 07:51:51 +0000 (08:51 +0100)]
Fix missing build dependency on omp_gen.

Summary:
`include/llvm/Frontend/OpenMP/CMakeLists.txt` creates a new target
called `omp_gen`, which is automatically added to
`LLVM_COMMON_DEPENDS` by the `add_public_tablegen_target` macro. But
it only gets added to the version of `LLVM_COMMON_DEPENDS` in the
scope of that subsidiary CMakeLists file, and it doesn't propagate all
the way back up to the permanent version of that variable which is
actually used to set dependencies.

The visible effect is that the output build scripts contain a missing
dependency. For example, if I run cmake in Ninja output mode, and then
run

  ninja -t commands tools/clang/examples/PrintFunctionNames/CMakeFiles/PrintFunctionNames.dir/PrintFunctionNames.cpp.o

to list all the commands that are prerequisites of building that
object file, then the list does not include the llvm-tblgen command
that builds `include/llvm/Frontend/OpenMP/OMP.h.inc`, even though that
generated include file is needed (by a chain of includes starting from
`clang/AST/AST.h`), and that object file can't be compiled without it.
This missing dependency can cause intermittent build failures,
depending on the order that Ninja (or whatever) happens to schedule
its commands.

I've fixed it by adding a `set` command in two levels of
`CMakeLists.txt` to propagate the modified version of
`LLVM_COMMON_DEPENDS` back up through the parent scopes so that
`omp_gen` does end up on the version seen by the main
`llvm/CMakeLists.txt`.

Reviewers: clementval, thakis, chandlerc, jdoerfert

Reviewed By: clementval

Subscribers: jdenny, mgorny, sstefan1, llvm-commits

Tags: #llvm

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

4 years ago[X86] Remove an isel pattern than can never match. Remove bitcasts of loads from...
Craig Topper [Tue, 30 Jun 2020 07:17:52 +0000 (00:17 -0700)]
[X86] Remove an isel pattern than can never match. Remove bitcasts of loads from a few others.

4 years ago[CodeGen] Fix warning in getNode for EXTRACT_SUBVECTOR
David Sherwood [Mon, 29 Jun 2020 07:13:50 +0000 (08:13 +0100)]
[CodeGen] Fix warning in getNode for EXTRACT_SUBVECTOR

Fix a warning in getNode() when extracting a subvector from a
concat vector. We can simply replace the call to getVectorNumElements
with getVectorMinNumElements as this follows the defined behaviour
for EXTRACT_SUBVECTOR.

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

4 years ago[SystemZ] Improve handling of ZERO_EXTEND_VECTOR_INREG.
Jonas Paulsson [Thu, 26 Mar 2020 11:22:14 +0000 (12:22 +0100)]
[SystemZ] Improve handling of ZERO_EXTEND_VECTOR_INREG.

Instead of doing multiple unpacks when zero extending vectors (e.g. v2i16 ->
v2i64), benchmarks have shown that it is better to do a VPERM (vector
permute) since that is only one sequential instruction on the critical path.

This patch achieves this by

1. Expand ZERO_EXTEND_VECTOR_INREG into a vector shuffle with a zero vector
   instead of (multiple) unpacks.

2. Improve SystemZ::GeneralShuffle to perform a single unpack as the last
   operation if Bytes matches it.

Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D78486

4 years ago[llvm-objcopy][MachO] Fix segment size alignment
Alexander Shaposhnikov [Tue, 30 Jun 2020 06:09:38 +0000 (23:09 -0700)]
[llvm-objcopy][MachO] Fix segment size alignment

This diff addresses the old TODO in MachOObjcopy.cpp and
correctly sets the page size used for alignment of segments.
In particular, now llvm-objcopy's output is consistent
with the input (the alignment of vmsize doesn't change).

Test plan:

1. make check-all
2. verify that a binary copied via llvm-objcopy now correctly works on iOS.

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

4 years ago[SVE][CodeGen] Fix bug in DAGCombiner::reduceBuildVecToShuffle
David Sherwood [Thu, 25 Jun 2020 13:46:16 +0000 (14:46 +0100)]
[SVE][CodeGen] Fix bug in DAGCombiner::reduceBuildVecToShuffle

When trying to reduce a BUILD_VECTOR to a SHUFFLE_VECTOR it's
important that we carefully check the vector types that led to
that BUILD_VECTOR. In the test I have attached to this commit
there is a case where the results of two SVE faddv instructions
are being stored to consecutive memory locations. With my fix,
as part of merging those stores we discover that each BUILD_VECTOR
element came from an extract of a SVE vector element and
therefore bail out.

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

4 years agoAdd front/back accessors to indexed_accessor_range.
River Riddle [Tue, 30 Jun 2020 05:37:05 +0000 (22:37 -0700)]
Add front/back accessors to indexed_accessor_range.

These map to the similar accessors on ArrayRef and other random access containers.

This fixes a compilation error on MLIR ODS for variadic operands/results, which relied on the availability of front in certain situations.

4 years ago[SimplifyCFG] Fix inconsistency in block size assessment for threading
Max Kazantsev [Tue, 30 Jun 2020 05:38:15 +0000 (12:38 +0700)]
[SimplifyCFG] Fix inconsistency in block size assessment for threading

Sometimes SimplifyCFG may decide to perform jump threading. In order
to do it, it follows the following algorithm:

1. Checks if the block is small enough for threading;
2. If yes, inserts a PR Phi relying that the next iteration will remove it
   by performing jump threading;
3. The next iteration checks the block again and performs the threading.

This logic has a corner case: inserting the PR Phi increases block's size
by 1. If the block size at first check was max possible, one more Phi will
exceed this size, and we will neither perform threading nor remove the
created Phi node. As result, we will end up with worse IR than before.

This patch fixes this situation by excluding Phis from block size computation.
Excluding Phis from size computation for threading also makes sense by
itself because in case of threadign all those Phis will be removed.

Differential Revision: https://reviews.llvm.org/D81835
Reviewed By: asbirlea, nikic

4 years agoAdd missing #include
David Blaikie [Tue, 30 Jun 2020 05:07:36 +0000 (22:07 -0700)]
Add missing #include

A forward declaration was insufficient here - since Regex needs to be
complete for the implicit dtor to be compiled correctly. (that, or the
dtor would have to be made explicit and out of line)

4 years ago[clang] attempt to fix a linux test failure for the darwin-ld-platform-version-macos...
Alex Lorenz [Tue, 30 Jun 2020 03:11:55 +0000 (20:11 -0700)]
[clang] attempt to fix a linux test failure for the darwin-ld-platform-version-macos.c test

Clang should use explicit -target to ensure that the Darwin driver is used.
Also drop arm64e test-case for now.

4 years ago[OpenMP] fix clang warning about printf format in CUDA plugin
Ye Luo [Tue, 30 Jun 2020 02:32:43 +0000 (22:32 -0400)]
[OpenMP] fix clang warning about printf format in CUDA plugin

Summary: Warnings are printed by clang when building LIBOMPTARGET_ENABLE_DEBUG=ON due incorrect format string.

Reviewers: tianshilei1992, jdoerfert

Reviewed By: tianshilei1992

Subscribers: yaxunl, guansong, sstefan1, openmp-commits

Tags: #openmp

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

4 years ago[darwin][driver] pass the minimum supported OS version to the linker
Alex Lorenz [Tue, 30 Jun 2020 01:39:26 +0000 (18:39 -0700)]
[darwin][driver] pass the minimum supported OS version to the linker
if it's newer than the target version

This change ensures that the arm64-apple-macOS slice is linked for
macOS 11 even if the deployment target is earlier than macOS 11.

4 years ago[c++20] Fix handling of operator rewrites naming consteval operator<=>.
Richard Smith [Tue, 30 Jun 2020 02:02:47 +0000 (19:02 -0700)]
[c++20] Fix handling of operator rewrites naming consteval operator<=>.

4 years agoMove Sema::PragmaStack<ValueType>::Act into Sema.h so it can be instantiated as needed
David Blaikie [Tue, 30 Jun 2020 01:02:12 +0000 (18:02 -0700)]
Move Sema::PragmaStack<ValueType>::Act into Sema.h so it can be instantiated as needed

Found by linker failures in ThinLTO where the definition wasn't
available when it needed to be. (eg: ThinLTO may've eliminated the one
caller in the same TU and dropped the definition - breaking accidental
implicit depenednce on that definition from elsewhere)

4 years ago[MLIR][SPIRVToLLVM] Added Bitcast conversion pattern
George Mitenkov [Tue, 30 Jun 2020 00:32:40 +0000 (20:32 -0400)]
[MLIR][SPIRVToLLVM] Added Bitcast conversion pattern

Added conversion pattern and tests for `spv.Bitcast` op.  This one has
a direct mapping in LLVM dialect so `DirectConversionPattern` was used.

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

4 years ago[ods] Update Operator to record Arg->[Attr|Operand]Index mapping
Jacques Pienaar [Mon, 29 Jun 2020 23:40:52 +0000 (16:40 -0700)]
[ods] Update Operator to record Arg->[Attr|Operand]Index mapping

Also fixed bug in type inferface generator to address bug where operands and
attributes are interleaved.

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

4 years ago[X86] Prefer AND over PSHUFB for v64i8 when possible
Craig Topper [Mon, 29 Jun 2020 23:26:53 +0000 (16:26 -0700)]
[X86] Prefer AND over PSHUFB for v64i8 when possible

If the shuffle is a blend and one input is a 0 vector, we should prefer AND over PSHUFB since its available on more execution ports.

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

4 years ago[MLIR][SPIRVToLLVM] Convert bitwise and logical not
George Mitenkov [Mon, 29 Jun 2020 23:16:36 +0000 (19:16 -0400)]
[MLIR][SPIRVToLLVM] Convert bitwise and logical not

This patch introduces new conversion patterns for bit and logical
negation op: `spv.Not` and `spv.LogicalNot`. They are implemented
by applying xor on the operand and mask with all bits set.

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

4 years ago[FileCheck] Permit multiple -v or -vv
Joel E. Denny [Mon, 29 Jun 2020 22:35:22 +0000 (18:35 -0400)]
[FileCheck] Permit multiple -v or -vv

`FILECHECK_OPTS` was implemented so that a test runner, such as CI,
can specify FileCheck debugging options, such as `-v` and `-vv`.
However, if a test suite has a FileCheck call that already specifies
`-v` or `-vv`, then that call will fail if `FILECHECK_OPTS` also
specifies it.

For `-vv`, this problem already exists:

`clang/test/CodeGen/aarch64-v8.2a-fp16-intrinsics-constrained.c`

It's not yet clear if the `-vv` in that test was intentional, but this
usage shouldn't fail anyway.  It's already true that FileCheck permits
`-vv` and `-v` together even though `-vv` implies `-v`.

Compare D70784, which fixed the same problem for `-dump-input`.

Reviewed By: jhenderson, thopre

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

4 years ago[FileCheck][NFC] Clean up RUN style in verbose.txt test
Joel E. Denny [Mon, 29 Jun 2020 22:35:11 +0000 (18:35 -0400)]
[FileCheck][NFC] Clean up RUN style in verbose.txt test

Reviewed By: jhenderson, thopre

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

4 years agoClang Driver: refactor support for writing response files to be
James Y Knight [Mon, 29 Jun 2020 22:27:02 +0000 (18:27 -0400)]
Clang Driver: refactor support for writing response files to be
specified at Command creation, rather than as part of the Tool.

This resolves the hack I just added to allow Darwin toolchain to vary
its level of support based on `-mlinker-version=`.

The change preserves the _current_ settings for response-file support.
Some tools look likely to be declaring that they don't support
response files in error, however I kept them as-is in order for this
change to be a simple refactoring.

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

4 years agoClang Driver: Use Apple ld64's new @response-file support.
James Y Knight [Mon, 29 Jun 2020 22:26:53 +0000 (18:26 -0400)]
Clang Driver: Use Apple ld64's new @response-file support.

In XCode 12, ld64 got support for @files, in addition to the old
-filelist mechanism. Response files allow passing all command-line
arguments to the linker via a file, rather than just filenames, and is
therefore preferred.

Because of the way response-file support is currently implemented as
part of the Tool class in Clang, this change requires an ugly backdoor
function to access Args. A follow-up commit fixes this, but I've
ordered this change first, for easier backportability.

I've added no tests here, because unfortunately, there don't appear to
be _any_ response-file emission automated tests, and I don't see an
obvious way to add them. I've tested that this change works as
expected locally.

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

4 years ago[SVE] Remove calls to VectorType::getNumElements from Instrumentation
Christopher Tetreault [Mon, 29 Jun 2020 21:46:25 +0000 (14:46 -0700)]
[SVE] Remove calls to VectorType::getNumElements from Instrumentation

Reviewers: efriedma, pcc, gchatelet, kmclaughlin, sdesmalen

Reviewed By: sdesmalen

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[CMake][compiler-rt] Only set lld as available when it was built
Petr Hosek [Thu, 11 Jun 2020 03:00:53 +0000 (20:00 -0700)]
[CMake][compiler-rt] Only set lld as available when it was built

The `-fuse-ld=lld` check might succeed because there's a system lld,
but that lld may be out-of-date which would cause any tests that
attempt to use for LTO fail. This was observed on some of the bots.

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

4 years ago[MLIR] Add variadic isa<> for Type, Value, and Attribute
Rahul Joshi [Mon, 29 Jun 2020 14:31:48 +0000 (07:31 -0700)]
[MLIR] Add variadic isa<> for Type, Value, and Attribute

- Also adopt variadic llvm::isa<> in more places.
- Fixes https://bugs.llvm.org/show_bug.cgi?id=46445

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

4 years ago[CMake] Fix incorrect handling of get_target_property failure
Christopher Tetreault [Mon, 29 Jun 2020 21:21:39 +0000 (14:21 -0700)]
[CMake] Fix incorrect handling of get_target_property failure

Summary:
add_unittest was checking that the result of get_target_property was not
"NOTFOUND", but despite what the documentation says, get_target_property
returns <the var>-NOTFOUND on failure.

Reviewers: efriedma, thakis, serge-sans-paille, chandlerc

Reviewed By: serge-sans-paille

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

4 years agoFix a few cases that were incorrectly parsed as unary-expressions
Richard Smith [Mon, 29 Jun 2020 21:12:14 +0000 (14:12 -0700)]
Fix a few cases that were incorrectly parsed as unary-expressions
instead of postfix-expressions, and improve error recovery for postfix
operators after unary-expressions.

This covers nullptr, __null, and some calls to type traits with special
parsing rules. We would previously not parse a postfix-expression suffix
for these expressions, so would reject expressions such as
__is_trivial(int)["foo"].

For the case where a postfix-expression suffix is *not* permitted after
a unary-expression (for example, after a new-expression or sizeof
expression), produce a diagnostic if one appears there anyway. That's
always ill-formed, but previously produced very bad diagnostics.

4 years ago[mlir] add unsigned comparison builders to Affine EDSC
Adam D Straw [Mon, 29 Jun 2020 17:35:11 +0000 (19:35 +0200)]
[mlir] add unsigned comparison builders to Affine EDSC

Current Affine comparison builders, which use operator overload, default to signed comparison.  This creates the possibility of misuse of these builders and potential correctness issues when dealing with unsigned integers.  This change makes the distinction between signed and unsigned comparison builders and forces the caller to make a choice between the two.

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

4 years ago[flang] Add coarray lowering hooks.
Eric Schweitz [Mon, 29 Jun 2020 17:28:12 +0000 (10:28 -0700)]
[flang] Add coarray lowering hooks.

Differential review: https://reviews.llvm.org/D82790

4 years ago[PowerPC] Fix FeatureISA3_1 def in PPC.td to imply FeatureISA3_0.
Lei Huang [Mon, 29 Jun 2020 21:13:02 +0000 (16:13 -0500)]
[PowerPC] Fix FeatureISA3_1 def in PPC.td to imply FeatureISA3_0.

4 years ago[X86] Add common prefixes to merge more hadd/sub tests checks
Simon Pilgrim [Sun, 28 Jun 2020 22:26:48 +0000 (23:26 +0100)]
[X86] Add common prefixes to merge more hadd/sub tests checks

4 years ago[clangd] config() -> Config::current to avoid confict with NS
Sam McCall [Mon, 29 Jun 2020 21:05:07 +0000 (23:05 +0200)]
[clangd] config() -> Config::current to avoid confict with NS

4 years agoSimplify conditionals in DNBArchMachARM64::EnableHardwareSingleStep
Jason Molenda [Mon, 29 Jun 2020 21:04:44 +0000 (14:04 -0700)]
Simplify conditionals in DNBArchMachARM64::EnableHardwareSingleStep

4 years ago[mlir] [VectorOps] Extend vector reduction integration test with reassoc=true cases.
aartbik [Mon, 29 Jun 2020 20:28:12 +0000 (13:28 -0700)]
[mlir] [VectorOps] Extend vector reduction integration test with reassoc=true cases.

Reviewed By: reidtatge

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

4 years ago[ADT] Use more explicit from to initialize member. Appease MSVC?
Sam McCall [Mon, 29 Jun 2020 20:22:12 +0000 (22:22 +0200)]
[ADT] Use more explicit from to initialize member. Appease MSVC?

Or at least get a clearer error message:
http://lab.llvm.org:8011/builders/mlir-windows/builds/3958/steps/build-unified-tree/logs/stdio

4 years ago[clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp
Leonard Chan [Mon, 29 Jun 2020 20:06:42 +0000 (13:06 -0700)]
[clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp

After c7bcd431d9c4bfeb631a3599f1d628603e6351d6, this test started failing when
running with the new pass manager. One of the CHECKs in this file checks how the
vtable is loaded for a void cast, which involves taking 2 bitcasts from the pointer
to the original object. The order of these bitcasts changes under the new PM.
The order doesn't matter, so this relaxes the CHECKs.

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

4 years agoReland "[clang][SourceManager] cache Macro Expansions""
Nick Desaulniers [Mon, 29 Jun 2020 19:42:37 +0000 (12:42 -0700)]
Reland "[clang][SourceManager] cache Macro Expansions""

This reverts commit 33d63f02ce408d181e13089ee5a667fb2e1cdc78.

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

4 years agoRevert "[clang][SourceManager] cache Macro Expansions"
Nick Desaulniers [Mon, 29 Jun 2020 19:41:56 +0000 (12:41 -0700)]
Revert "[clang][SourceManager] cache Macro Expansions"

This reverts commit dffc1420451f674731cb36799c8ae084104ff0b5.

Missed a hunk (D82690).

4 years agoReland [clangd] Config: config struct propagated through Context
Sam McCall [Mon, 29 Jun 2020 19:46:40 +0000 (21:46 +0200)]
Reland [clangd] Config: config struct propagated through Context

This reverts commit a3684dfc45c3a7bbdf72750d8a527e07e776b608.

4 years agoRevert "[clangd] Config: config struct propagated through Context"
Sam McCall [Mon, 29 Jun 2020 19:41:57 +0000 (21:41 +0200)]
Revert "[clangd] Config: config struct propagated through Context"

This reverts commit 9963d93b0731e21dd1c9c1cebf8baaecf2010330.

Fails on mac/win:
http://45.33.8.238/win/18704/step_9.txt
http://45.33.8.238/mac/16341/step_9.txt

4 years agoReland [ADT] Support const-qualified unique_functions
Sam McCall [Mon, 29 Jun 2020 19:00:46 +0000 (21:00 +0200)]
Reland [ADT] Support const-qualified unique_functions

This reverts commit 09b6dffb8ed19d624fddc7a57ce886f8be3c45b2.

Now compiles with GCC!

4 years ago[ProcessGDBRemote] Get rid of an unused function.
Davide Italiano [Mon, 29 Jun 2020 19:38:27 +0000 (12:38 -0700)]
[ProcessGDBRemote] Get rid of an unused function.

The define was wrong. I could've fixed it, but given this is
unused I decided to drop the function altogether.

4 years ago[flang] Defer stmt function body analysis until specification part complete
peter klausler [Mon, 29 Jun 2020 17:45:02 +0000 (10:45 -0700)]
[flang] Defer stmt function body analysis until specification part complete

Expression analysis was being invoked on the bodies of statement functions
as they were being encountered during name resolution.  This led to failures
on some FCVS tests in cases where those expressions contained implicitly
typed objects.  Defer the analysis of statemet function bodies to the end
of the specification part, at which time the symbols of the enclosing scope
will have been typed.

Reviewed By: tskeith

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

4 years ago[llvm][NFC] Use llvm_canonicalize_cmake_booleans for LLVM_HAVE_TF_AOT
Mircea Trofin [Mon, 29 Jun 2020 15:44:38 +0000 (08:44 -0700)]
[llvm][NFC] Use llvm_canonicalize_cmake_booleans for LLVM_HAVE_TF_AOT

Reviewers: thakis

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

4 years ago[gn build] Add missing llvm-lipo dep to check-lld
Reid Kleckner [Mon, 29 Jun 2020 19:24:10 +0000 (12:24 -0700)]
[gn build] Add missing llvm-lipo dep to check-lld

Updates gn files for 918948db4dc8718cb7aae8765653c27cba3cfe86

4 years ago[darwin][driver] isMacosxVersionLT should check against the minimum supported OS...
Alex Lorenz [Mon, 29 Jun 2020 17:23:16 +0000 (10:23 -0700)]
[darwin][driver] isMacosxVersionLT should check against the minimum supported OS version

This change ensures that the Darwin driver doesn't add unsupported libraries to the link
invocation when linking the Apple Silicon macOS slice.

rdar://61011136

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

4 years agoX86: Upgrade a test to not rely on byval pointee type
Matt Arsenault [Fri, 26 Jun 2020 19:18:30 +0000 (15:18 -0400)]
X86: Upgrade a test to not rely on byval pointee type

4 years agoLowerConstantIntrinsics: Fix missing test for byval behavior
Matt Arsenault [Mon, 29 Jun 2020 18:21:46 +0000 (14:21 -0400)]
LowerConstantIntrinsics: Fix missing test for byval behavior

4 years agoX86: Use MOV32r0 pseudo instead of directly emitting xor
Matt Arsenault [Sun, 28 Jun 2020 14:46:56 +0000 (10:46 -0400)]
X86: Use MOV32r0 pseudo instead of directly emitting xor

This was producing reg = xor undef reg, undef reg. This looks similar
to a use of a value to define itself, and I want to disallow undef
uses for SSA virtual registers. If this were to use implicit_def,
there's no guarantee the two operands end up using the same register
(I think no guarantee exists even if the two operands start out as the
same register, but this was violated when I switched this to use an
explicit implicit_def). The MOV32r0 pseudo evidently exists to handle
this case, so use it instead. This was more work than I expected for
the 64-bit case, but I didn't see any helper for materializing a
64-bit 0.

4 years agoSilence unused var warning in NDEBUG build
Reid Kleckner [Mon, 29 Jun 2020 18:39:49 +0000 (11:39 -0700)]
Silence unused var warning in NDEBUG build

4 years ago[gn build] Port 9963d93b073
LLVM GN Syncbot [Mon, 29 Jun 2020 18:36:28 +0000 (18:36 +0000)]
[gn build] Port 9963d93b073

4 years agoAdd optimization to basic_string::assign for compile-time known constant values.
Martijn Vels [Fri, 19 Jun 2020 18:24:03 +0000 (14:24 -0400)]
Add optimization to basic_string::assign for compile-time known constant values.

Summary:
This change optimizes the assign() methods for string where either the contents or lengths are compile time known constants. For small strings (< min_cap) we can execute the assignment entirely inline. For strings up to 128 bytes we allow the compiler to efficiently inline the copy operation after we call the offline __resize<>() method. Short / long branches are taken at the call site for better branch prediction and allowing FDO optimizations.

Benchmarks (unstable / google perflab):
```
name                                                old time/op             new time/op             delta
BM_StringAssignAsciiz_Empty_Opaque                  5.69ns ± 7%             5.97ns ± 7%     ~             (p=0.056 n=5+5)
BM_StringAssignAsciiz_Empty_Transparent             5.39ns ± 7%             0.79ns ± 8%  -85.36%          (p=0.008 n=5+5)
BM_StringAssignAsciiz_Small_Opaque                  11.2ns ± 5%             11.0ns ± 6%     ~             (p=0.548 n=5+5)
BM_StringAssignAsciiz_Small_Transparent             10.1ns ± 7%              1.0ns ± 8%  -89.76%          (p=0.008 n=5+5)
BM_StringAssignAsciiz_Large_Opaque                  23.5ns ± 7%             23.8ns ± 7%     ~             (p=0.841 n=5+5)
BM_StringAssignAsciiz_Large_Transparent             21.4ns ± 7%             12.7ns ± 7%  -40.83%          (p=0.008 n=5+5)
BM_StringAssignAsciiz_Huge_Opaque                    336ns ± 4%              327ns ± 7%     ~             (p=0.421 n=5+5)
BM_StringAssignAsciiz_Huge_Transparent               331ns ± 5%              324ns ± 7%     ~             (p=0.548 n=5+5)
BM_StringAssignAsciizMix_Opaque                     13.6ns ±10%             13.7ns ± 9%     ~             (p=0.690 n=5+5)
BM_StringAssignAsciizMix_Transparent                12.9ns ± 8%              3.6ns ± 8%  -71.82%          (p=0.008 n=5+5)
```

Reviewers: EricWF, #libc!

Subscribers: jfb, libcxx-commits

Tags: #libc

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

4 years ago[IndVars] Regenerate test checks (NFC)
Nikita Popov [Mon, 29 Jun 2020 18:33:50 +0000 (20:33 +0200)]
[IndVars] Regenerate test checks (NFC)

4 years agoRevert "[ADT] Support const-qualified unique_functions"
Nikita Popov [Mon, 29 Jun 2020 18:26:22 +0000 (20:26 +0200)]
Revert "[ADT] Support const-qualified unique_functions"

This reverts commit 01bf8cdf5fa9bc71869e15e5e351b2b68c39feb6.

Breaks the build:

llvm/include/llvm/ADT/FunctionExtras.h:223:7: error: explicit template argument list not allowed
  223 |       Callbacks<CallableT, CalledAs, EnableIfTrivial<CallableT>>;

4 years ago[clangd] Config: config struct propagated through Context
Sam McCall [Thu, 25 Jun 2020 21:42:36 +0000 (23:42 +0200)]
[clangd] Config: config struct propagated through Context

Summary:
This introduces the "semantic form" of config exposed to features,
contrasted with the "syntactic form" exposed to users in e9fb1506b83d.

The two are not connected, CompiledFragment and Provider will bridge that gap.
Nor is configuration actually set: that needs changes to ClangdServer,
TUScheduler, and BackgroundQueue.

Reviewers: hokein, kadircet

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

Tags: #clang

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

4 years ago[DEBUGINFO]Add a test for packed bitfields, NFC.
Alexey Bataev [Mon, 29 Jun 2020 17:30:29 +0000 (13:30 -0400)]
[DEBUGINFO]Add a test for packed bitfields, NFC.

4 years ago[ADT] Support const-qualified unique_functions
Sam McCall [Thu, 25 Jun 2020 16:25:53 +0000 (18:25 +0200)]
[ADT] Support const-qualified unique_functions

Summary:
This technique should extend to rvalue-qualified etc, but I didn't add any.
I removed "volatile" from the future plans, which seems... speculative at best.

While here I moved the callbacks object out of the constructor into a
variable template, which I believe addresses the fixme there about unused
objects.

(I'm not a template guru, so it's always possible the old version was designed
for compile-time performance in a way I'm missing)

Reviewers: kadircet

Subscribers: dexonsmith, llvm-commits, chandlerc

Tags: #llvm

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

4 years ago[SVE] Remove calls to VectorType::getNumElements from X86
Christopher Tetreault [Mon, 29 Jun 2020 17:30:43 +0000 (10:30 -0700)]
[SVE] Remove calls to VectorType::getNumElements from X86

Reviewers: efriedma, RKSimon, craig.topper, fpetrogalli, c-rhodes

Reviewed By: RKSimon

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[runtimes] Remove the ability to select the old libc++ testing format
Louis Dionne [Fri, 26 Jun 2020 04:55:29 +0000 (00:55 -0400)]
[runtimes] Remove the ability to select the old libc++ testing format

As announced on libcxx-dev at [1], the old libc++ testing format is being
removed in favour of the new one. Follow-up commits will clean up the
code that is dead after the removal of this option.

[1]: http://lists.llvm.org/pipermail/libcxx-dev/2020-June/000885.html

4 years ago[SVE] Remove calls to VectorType::getNumElements from mlir
Christopher Tetreault [Mon, 29 Jun 2020 17:15:00 +0000 (10:15 -0700)]
[SVE] Remove calls to VectorType::getNumElements from mlir

Reviewers: efriedma, ftynse, rriddle

Reviewed By: ftynse, rriddle

Subscribers: tschuett, rkruppe, psnobl, mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes

Tags: #mlir

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

4 years ago[PowerPC] Fix crash for shuffle canonicalization with elt 0 from RHS
Nemanja Ivanovic [Mon, 29 Jun 2020 16:37:03 +0000 (11:37 -0500)]
[PowerPC] Fix crash for shuffle canonicalization with elt 0 from RHS

Commit 1fed131660b2 assumed that shuffle vector canonicalization will
always ensure that the shuffle mask will be ordered so that element
zero comes from the LHS vector. However there is code out there for
which this is not the case. This patch simply removes that unsafe
assumption and makes the code work regardless of the source of the
first element.

4 years ago[AArch64][SVE] Add bfloat16 to outstanding tuple vector intrinsics
Cullen Rhodes [Fri, 26 Jun 2020 16:35:00 +0000 (16:35 +0000)]
[AArch64][SVE] Add bfloat16 to outstanding tuple vector intrinsics

Summary:
* svget2/3/4
* svset2/3/4
* svcreate2/3/4
* svundef/2/3/4

Reviewers: sdesmalen, kmclaughlin, fpetrogalli, efriedma

Reviewed By: fpetrogalli

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

4 years ago[analyzer][Z3-refutation] Fix a refutation BugReporterVisitor bug
Balazs Benics [Mon, 29 Jun 2020 16:51:24 +0000 (18:51 +0200)]
[analyzer][Z3-refutation] Fix a refutation BugReporterVisitor bug

FalsePositiveRefutationBRVisitor had a bug where the constraints were not
properly collected thus crosschecked with Z3.
This patch demonstratest and fixes that bug.

Bug:
The visitor wanted to collect all the constraints on a BugPath.
Since it is a visitor, it stated the visitation of the BugPath with the node
before the ErrorNode. As a final step, it visited the ErrorNode explicitly,
before it processed the collected constraints.

In principle, the ErrorNode should have visited before every other node.
Since the constraints were collected into a map, mapping each symbol to its
RangeSet, if the map already had a mapping with the symbol, then it was skipped.

This behavior was flawed if:
We already had a constraint on a symbol, but at the end in the ErrorNode we have
a tighter constraint on that. Therefore, this visitor would not utilize that
tighter constraint during the crosscheck validation.

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

4 years ago[AArch64][SVE] clang: Add missing svbfloat16_t tests
Cullen Rhodes [Fri, 26 Jun 2020 17:25:56 +0000 (17:25 +0000)]
[AArch64][SVE] clang: Add missing svbfloat16_t tests

Summary:
Patch adds tests for mangling of svbfloat16_t and several other type
related tests.

Reviewers: sdesmalen, kmclaughlin, fpetrogalli, efriedma

Reviewed By: sdesmalen, fpetrogalli

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

4 years ago[Sphinx] Support older recommonmark versions.
Jonas Devlieghere [Mon, 29 Jun 2020 16:44:26 +0000 (09:44 -0700)]
[Sphinx] Support older recommonmark versions.

The "new way" of enabling recommonmark is only supported in recommonmark
0.5 and later. Use the deprecated approach with versions of Sphinx that
still support it.

If I understand correctly there's no way to use older versions of
recommonmark (<0.5) with newer versions of Sphinx (>3.0) because the old
approach got removed.

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

4 years ago[libc++] Enable tests and documentation by default when building standalone
Louis Dionne [Mon, 29 Jun 2020 16:39:39 +0000 (12:39 -0400)]
[libc++] Enable tests and documentation by default when building standalone

Since we can always find the rest of the LLVM tree, we can always run the
tests in the standalone mode. Do it so that the default behavior is the
same in the standalone and non-standalone modes.

4 years ago[libc++] Provide a default LLVM_PATH when building standalone
Louis Dionne [Mon, 29 Jun 2020 16:25:10 +0000 (12:25 -0400)]
[libc++] Provide a default LLVM_PATH when building standalone

Since we require that libc++ is built as part of the monorepo layout, we
can assume the path of the rest of LLVM and avoid requiring that LLVM_PATH
be set explicitly.

4 years ago[LLDB] skip TestCreateDuringInstructionStep on aarch64/linux
Muhammad Omair Javaid [Mon, 29 Jun 2020 14:29:23 +0000 (19:29 +0500)]
[LLDB] skip TestCreateDuringInstructionStep on aarch64/linux

TestCreateDuringInstructionStep have started failing again on
aarch64/linux after moving to new machine. I am going mark it skipped
for aarch64/linux.

4 years ago[gn build] Port fe0a555aa3c
LLVM GN Syncbot [Mon, 29 Jun 2020 16:19:53 +0000 (16:19 +0000)]
[gn build] Port fe0a555aa3c

4 years ago[analyzer][NFC] Add unittest for FalsePositiveRefutationBRVisitor
Balazs Benics [Mon, 29 Jun 2020 16:18:43 +0000 (18:18 +0200)]
[analyzer][NFC] Add unittest for FalsePositiveRefutationBRVisitor

Adds the test infrastructure for testing the FalsePositiveRefutationBRVisitor.
It will be extended in the D78457 patch, which demonstrates and fixes a bug in
the visitor.

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

4 years agoCorrectly report Changed status in FoldBranchToCommonDest
serge-sans-paille [Mon, 29 Jun 2020 10:07:26 +0000 (12:07 +0200)]
Correctly report Changed status in FoldBranchToCommonDest

It's possible for the first loop trip(s) to set the `Changed` Status, and to a
later one to early exit, in which case `Changed` must be return.

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

4 years ago[sve][acle] Implement some of the C intrinsics for brain float.
Francesco Petrogalli [Fri, 19 Jun 2020 21:27:46 +0000 (21:27 +0000)]
[sve][acle] Implement some of the C intrinsics for brain float.

Summary:
The following intrinsics have been extended to support brain float types:

svbfloat16_t svclasta[_bf16](svbool_t pg, svbfloat16_t fallback, svbfloat16_t data)
bfloat16_t svclasta[_n_bf16](svbool_t pg, bfloat16_t fallback, svbfloat16_t data)
bfloat16_t svlasta[_bf16](svbool_t pg, svbfloat16_t op)

svbfloat16_t svclastb[_bf16](svbool_t pg, svbfloat16_t fallback, svbfloat16_t data)
bfloat16_t svclastb[_n_bf16](svbool_t pg, bfloat16_t fallback, svbfloat16_t data)
bfloat16_t svlastb[_bf16](svbool_t pg, svbfloat16_t op)

svbfloat16_t svdup[_n]_bf16(bfloat16_t op)
svbfloat16_t svdup[_n]_bf16_m(svbfloat16_t inactive, svbool_t pg, bfloat16_t op)
svbfloat16_t svdup[_n]_bf16_x(svbool_t pg, bfloat16_t op)
svbfloat16_t svdup[_n]_bf16_z(svbool_t pg, bfloat16_t op)

svbfloat16_t svdupq[_n]_bf16(bfloat16_t x0, bfloat16_t x1, bfloat16_t x2, bfloat16_t x3, bfloat16_t x4, bfloat16_t x5, bfloat16_t x6, bfloat16_t x7)
svbfloat16_t svdupq_lane[_bf16](svbfloat16_t data, uint64_t index)

svbfloat16_t svinsr[_n_bf16](svbfloat16_t op1, bfloat16_t op2)

Reviewers: sdesmalen, kmclaughlin, c-rhodes, ctetreau, efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

4 years ago[NFC] Fixed ignored .hip test.
dfukalov [Mon, 29 Jun 2020 13:34:00 +0000 (16:34 +0300)]
[NFC] Fixed ignored .hip test.

Reviewers: hliao

Reviewed By: hliao

Subscribers: yaxunl, cfe-commits, llvm-commits

Tags: #clang

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

4 years ago[libc++] Do not try creating llvm-lit when LIBCXX_INCLUDE_TESTS is OFF in the standal...
Louis Dionne [Mon, 29 Jun 2020 15:51:15 +0000 (11:51 -0400)]
[libc++] Do not try creating llvm-lit when LIBCXX_INCLUDE_TESTS is OFF in the standalone build

Doing so doesn't work reliably, since it relies on LLVM_* implementation
detail variables being set. Furthermore, since we rely on the lit.site.cfg
being generated, running the tests requires LIBCXX_INCLUDE_TESTS=ON anyway.

4 years ago[AMDGPU] Moving SI_RETURN_TO_EPILOG handling out of SIInsertSkips.
Christudasan Devadasan [Wed, 17 Jun 2020 08:39:04 +0000 (14:09 +0530)]
[AMDGPU] Moving SI_RETURN_TO_EPILOG handling out of SIInsertSkips.

For now, moving it to SIPreEmitPeephole.
Should find a right place to have this code.

Reviewed By: nhaehnle

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

4 years agoRecursiveASTVisitor: inline a macro that is only used once
Dmitri Gribenko [Mon, 29 Jun 2020 15:05:43 +0000 (17:05 +0200)]
RecursiveASTVisitor: inline a macro that is only used once

Reviewers: eduucaldas, ymandel

Reviewed By: ymandel

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files
Nathan James [Mon, 29 Jun 2020 15:05:51 +0000 (16:05 +0100)]
[clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files

Reviewed By: aaron.ballman

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

4 years agoCompile the RecursiveASTVisitor callbacks test with "/bigobj"
Dmitri Gribenko [Mon, 29 Jun 2020 15:01:58 +0000 (17:01 +0200)]
Compile the RecursiveASTVisitor callbacks test with "/bigobj"

Summary:
This file was exceeding a limit in MSVC:

fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj

Reviewers: erichkeane

Reviewed By: erichkeane

Subscribers: jmorse, gribozavr2, mgorny, cfe-commits

Tags: #clang

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