platform/upstream/llvm.git
3 years agoThis adds a new test checking llvm-symbolizer with an object built with basic block...
Sriraman Tallam [Sat, 9 Jan 2021 05:52:34 +0000 (21:52 -0800)]
This adds a new test checking llvm-symbolizer with an object built with basic block sections.

Build a object with -fbasic-block-sections and reorder the basic blocks to be
non-contiguous. Then check if llvm-symbolizer correctly reports the symbolized
addresses. Included the source to build the object with command lines.

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

3 years agoPR47391: Canonicalize DIFiles
Umesh Kalappa [Sat, 9 Jan 2021 05:41:13 +0000 (21:41 -0800)]
PR47391: Canonicalize DIFiles

Like @aprantl suggested, modify to  use the canonicalized DIFile, if we
don't know the  loc info and filename for the compiler generated
functions for example static initialization functions.

Reviewed By: dblaikie, aprantl

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

3 years ago[DWARFLinker] Link against BinaryFormat
Jonas Devlieghere [Sat, 9 Jan 2021 02:57:36 +0000 (18:57 -0800)]
[DWARFLinker] Link against BinaryFormat

3 years ago[debugserver] Various plist changes
Jonas Devlieghere [Sat, 9 Jan 2021 02:53:08 +0000 (18:53 -0800)]
[debugserver] Various plist changes

 - Remove unused plists that were referenced (but unused) by Xcode.
 - Move all debugserver plists unders tools/debugserver/resources.
 - Add the ability to distinguish between com.apple.security.cs.debugger
   and com.apple.private.cs.debugger.

rdar://66082043

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

3 years ago[DWARFLinker] Print the unsupport DWARF form as part of the warning
Jonas Devlieghere [Fri, 8 Jan 2021 19:35:46 +0000 (11:35 -0800)]
[DWARFLinker] Print the unsupport DWARF form as part of the warning

3 years ago[SCEV] Remove unused getExactExistingExpansion (NFC)
Kazu Hirata [Sat, 9 Jan 2021 02:39:57 +0000 (18:39 -0800)]
[SCEV] Remove unused getExactExistingExpansion (NFC)

The last use was removed on Sep 4, 2018 in commit
2cbba5633753552a984572c8b9a5997e5c96496d.

3 years ago[Tablegen] Use llvm::find_if (NFC)
Kazu Hirata [Sat, 9 Jan 2021 02:39:55 +0000 (18:39 -0800)]
[Tablegen] Use llvm::find_if (NFC)

3 years ago[Target, Transforms] Use *Set::contains (NFC)
Kazu Hirata [Sat, 9 Jan 2021 02:39:53 +0000 (18:39 -0800)]
[Target, Transforms] Use *Set::contains (NFC)

3 years ago[RISCV] Optimize multiplication with constant
Ben Shi [Sat, 9 Jan 2021 02:37:21 +0000 (10:37 +0800)]
[RISCV] Optimize multiplication with constant

1. Break MUL with specific constant to a SLLI and an ADD/SUB on riscv32
   with the M extension.
2. Break MUL with specific constant to two SLLI and an ADD/SUB, if the
   constant needs a pair of LUI/ADDI to construct.

Reviewed by: craig.topper

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

3 years ago[clangd][NFC] Remove unnecessary copy in CodeComplete
Nathan James [Sat, 9 Jan 2021 02:32:23 +0000 (02:32 +0000)]
[clangd][NFC] Remove unnecessary copy in CodeComplete

All tests still pass with ASAN so fairly confident no use-after-free going on here.

3 years ago[X86] Remove IntrArgMemOnly from ldmxcsr intrinsic.
Craig Topper [Sat, 9 Jan 2021 01:47:12 +0000 (17:47 -0800)]
[X86] Remove IntrArgMemOnly from ldmxcsr intrinsic.

Since we're leaving this as ReadWrite with the "write" reflecting
the update to MXCSR, we shouldn't say it only writes arg memory.

Hopefully this fixes the issue reported in post-commit in D93571.

3 years ago[AMDGPU] Add volatile support to SIMemoryLegalizer
Tony [Sat, 19 Dec 2020 02:05:11 +0000 (02:05 +0000)]
[AMDGPU] Add volatile support to SIMemoryLegalizer

Treat a non-atomic volatile load and store as a relaxed atomic at
system scope for the address spaces accessed. This will ensure all
relevant caches will be bypassed.

A volatile atomic is not changed and still only bypasses caches upto
the level specified by the SyncScope operand.

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

3 years agoNever call a destroying operator delete when cleaning up from an
Richard Smith [Sat, 9 Jan 2021 00:41:31 +0000 (16:41 -0800)]
Never call a destroying operator delete when cleaning up from an
exception thrown during construction in a new-expression.

Instead, when performing deallocation function lookup for a
new-expression, ignore all destroying operator delete candidates, and
fall back to global operator delete if there is no member operator
delete other than a destroying operator delete.

Use of destroying operator delete only makes sense when there is an
object to destroy, which there isn't in this case. The language wording
doesn't cover this case; this oversight has been reported to WG21, with
the approach in this patch as the proposed fix.

3 years ago[libc][NFC] add includes for internal headers to all libc functions
Michael Jones [Sat, 9 Jan 2021 00:35:00 +0000 (00:35 +0000)]
[libc][NFC] add includes for internal headers to all libc functions

this will make sure that all of the functions are using the correct
prototypes. Explained much better in the comments of this diff:
https://reviews.llvm.org/D94195

3 years ago[libc] Switch to use a macro which does not insert a section for every libc function.
Michael Jones [Wed, 23 Dec 2020 18:46:09 +0000 (18:46 +0000)]
[libc] Switch to use a macro which does not insert a section for every libc function.

Summary:
The new macro also inserts the C alias for the C++ implementations
without needing an objcopy based post processing step. The CMake
rules have been updated to reflect this. More CMake cleanup can be
taken up in future rounds and appropriate TODOs have been added for them.

Reviewers: mcgrathr, sivachandra

Subscribers:

3 years ago[lld-macho] Fix TLV data initialization
Jez Ng [Fri, 8 Jan 2021 23:47:40 +0000 (18:47 -0500)]
[lld-macho] Fix TLV data initialization

We were mishandling the case where both `__tbss` and `__thread_data` sections were
present.

TLVP relocations should be encoded as offsets from the start of `__thread_data`,
even if the symbol is actually located in `__thread_bss`. Previously, we were
writing the offset from the start of the containing section, which doesn't
really make sense since there's no way `tlv_get_addr()` can know which section a
given `tlv$init` symbol is in at runtime.

In addition, this patch ensures that we place `__thread_data` immediately before
`__thread_bss`. This is what ld64 does, likely for performance reasons. Zerofill
sections must also be at the end of their segments; we were already doing this,
but now we ensure that `__thread_bss` occurs before `__bss`, so that it's always
possible to have it contiguous with `__thread_data`.

Fixes llvm.org/PR48657.

Reviewed By: #lld-macho, thakis

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

3 years ago[NewPM] Run ObjC ARC passes
Arthur Eubanks [Wed, 23 Dec 2020 05:41:25 +0000 (21:41 -0800)]
[NewPM] Run ObjC ARC passes

Match the legacy PM in running various ObjC ARC passes.

This requires making some module passes into function passes. These were
initially ported as module passes since they add function declarations
(e.g. https://reviews.llvm.org/D86178), but that's still up for debate
and other passes do so.

Reviewed By: ahatanak

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

3 years agoUpdate the maximum integer bitwidth in MLIR.
Andrew Lenharth [Tue, 5 Jan 2021 21:15:45 +0000 (15:15 -0600)]
Update the maximum integer bitwidth in MLIR.

Large integers are generated in Circt commonly which exceed 4kbits.  This aligns the maximum bitwidth in MLIR and LLVM.

Reviewed By: rriddle, lattner, mehdi_amini

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

3 years agoAttempt to complete an incomplete expression type when considering a
Richard Smith [Fri, 8 Jan 2021 23:17:54 +0000 (15:17 -0800)]
Attempt to complete an incomplete expression type when considering a
reference binding to an expression.

We need to know the array bound in order to determine whether the
parameter type is reference-compatible with the argument type, so we
need to trigger instantiation in this case.

3 years ago[InitLLVM] Ensure SIGPIPE handler installed before sigaction()
Vedant Kumar [Fri, 8 Jan 2021 19:08:52 +0000 (11:08 -0800)]
[InitLLVM] Ensure SIGPIPE handler installed before sigaction()

The pipe signal handler must be installed before any other handlers are
registered. This is because the Unix RegisterHandlers function does not
perform a sigaction() for SIGPIPE unless a one-shot handler is present,
to allow long-lived processes (like lldb) to fully opt-out of llvm's
SIGPIPE handling and ignore the signal safely.

Fixes a bug introduced in D70277.

Tested by running Nick's test case:

% xcrun ./bin/clang -E -fno-integrated-cc1 x.c | tee foo.txt | head

I verified that child cc1 process exits with IO_ERR, and that the parent
recognizes the error code, exiting cleanly.

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

3 years ago[libc++] NFC: Document the Differential queries to avoid duplicating work
Louis Dionne [Fri, 8 Jan 2021 22:23:16 +0000 (17:23 -0500)]
[libc++] NFC: Document the Differential queries to avoid duplicating work

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

3 years ago[mlir][PassManager] Properly set the initialization generation when cloning a pass...
River Riddle [Fri, 8 Jan 2021 22:41:14 +0000 (14:41 -0800)]
[mlir][PassManager] Properly set the initialization generation when cloning a pass manager

Fixes a bug where dynamic pass pipelines of cloned pass managers weren't being initialized properly.

3 years ago[libc++] Mark [P0809] "LWG2831: Comparing Unordered Containers" as Nothing To Do.
Arthur O'Dwyer [Sat, 26 Dec 2020 01:39:36 +0000 (20:39 -0500)]
[libc++] Mark [P0809] "LWG2831: Comparing Unordered Containers" as Nothing To Do.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0809r0.pdf

This issue/paper simply removed some library UB because vendors were
already doing the right thing. libc++ has always done the right thing
(in this respect).

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

3 years ago[libc++] Mark [P0475] "LWG2511: guaranteed copy elision for piecewise construction...
Arthur O'Dwyer [Fri, 25 Dec 2020 21:22:54 +0000 (16:22 -0500)]
[libc++] Mark [P0475] "LWG2511: guaranteed copy elision for piecewise construction" as Complete.

The point of LWG2511 is basically just to make sure that we use
`tuple<Args&&...>` instead of `tuple<Args...>` in a couple of places
inside `scoped_allocator_adaptor` and inside `pair`.
As far as I can tell, this has been true for libc++
since EricWF's D27612 (and maybe even earlier than that).

3 years agoRe-enable __cpp_lib_constexpr_functional.
Arthur O'Dwyer [Fri, 8 Jan 2021 22:28:19 +0000 (17:28 -0500)]
Re-enable __cpp_lib_constexpr_functional.

I accidentally disabled this feature-test macro in my D93830,
due to a rebasing conflict. It had been enabled by my D93815,
and should have remained enabled.

3 years ago[libc++/abi] Re-remove unnecessary null pointer checks from operator delete
Louis Dionne [Thu, 17 Dec 2020 18:26:47 +0000 (13:26 -0500)]
[libc++/abi] Re-remove unnecessary null pointer checks from operator delete

In 7cd67904f776, we removed the unnecessary nullptr checks from the libc++abi
definition of operator delete, but we forgot to update the definition in
libc++ (damn code duplication!). Then, in d4a1e03c5fb5, I synced the
definitions across libc++ and libc++abi, but I did it the wrong way around.
I re-added the if() checks to libc++abi instead of removing them from libc++.

In ef74f0fdc339, we re-removed the if() check from operator delete, but
only in libc++abi. This patch corrects this mess and removes it
consistently in libc++ and libc++abi.

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

3 years ago[mlir] AsyncRuntime: disable mlir-runner init/disable for WIN32
Eugene Zhulenev [Fri, 8 Jan 2021 22:02:25 +0000 (14:02 -0800)]
[mlir] AsyncRuntime: disable mlir-runner init/disable for WIN32

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

3 years ago[mlir][vector] generalized masked l/s and compressed l/s with indices
Aart Bik [Fri, 8 Jan 2021 18:26:57 +0000 (10:26 -0800)]
[mlir][vector] generalized masked l/s and compressed l/s with indices

Adding the ability to index the base address brings these operations closer
to the transfer read and write semantics (with lowering advantages), ensures
more consistent use in vector MLIR code (easier to read), and reduces the
amount of code duplication to lower memrefs into base addresses considerably
(making codegen less error-prone).

Reviewed By: ThomasRaoux

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

3 years ago[mlir] Add a hook for initializing passes before execution and use it in the Canonica...
River Riddle [Fri, 8 Jan 2021 21:24:07 +0000 (13:24 -0800)]
[mlir] Add a hook for initializing passes before execution and use it in the Canonicalizer

This revision adds a new `initialize(MLIRContext *)` hook to passes that allows for them to initialize any heavy state before the first execution of the pass. A concrete use case of this is with patterns that rely on PDL, given that PDL is compiled at run time it is imperative that compilation results are cached as much as possible. The first use of this hook is in the Canonicalizer, which has the added benefit of reducing the number of expensive accesses to the context when collecting patterns.

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

3 years agoDon't take the address of a temporary
Adrian Prantl [Fri, 8 Jan 2021 21:14:52 +0000 (13:14 -0800)]
Don't take the address of a temporary

3 years ago[mlir:JitRunner] Use custom shared library init/destroy functions if available
Eugene Zhulenev [Fri, 8 Jan 2021 16:18:39 +0000 (08:18 -0800)]
[mlir:JitRunner] Use custom shared library init/destroy functions if available

Use custom mlir runner init/destroy functions to safely init and destroy shared libraries loaded by the JitRunner.

This mechanism is ignored for Windows builds (for now) because init/destroy functions are not exported, and library unloading relies on static destructors.

Re-submit https://reviews.llvm.org/D94270 with a temporary workaround for windows

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

3 years ago[Driver] Add DWARF64 flag: -gdwarf64
Hongtao Yu [Fri, 8 Jan 2021 20:58:03 +0000 (12:58 -0800)]
[Driver] Add DWARF64 flag: -gdwarf64

@ikudrin enabled support for dwarf64 in D87011.  Adding a clang flag so it can be used through that compilation pass.

Reviewed By: MaskRay

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

3 years ago[compiler-rt] [sanitizer] Silence -Wframe-larger-than= for a few windows functions...
Martin Storsjö [Fri, 20 Nov 2020 09:33:35 +0000 (11:33 +0200)]
[compiler-rt] [sanitizer] Silence -Wframe-larger-than= for a few windows functions with large stack buffers

Also update a documentation url while touching code nearby, as
requested in review.

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

3 years agoAPINotes: annotate dump methods (NFC)
Saleem Abdulrasool [Fri, 8 Jan 2021 20:44:32 +0000 (20:44 +0000)]
APINotes: annotate dump methods (NFC)

This annotates the dump methods in APINotes to indicate that they are
unused as they are meant for debugging purposes.  This avoids an
unnecessary warning.

3 years ago[mlir][PDL] Use ODS for defining PDL types
River Riddle [Fri, 8 Jan 2021 20:29:47 +0000 (12:29 -0800)]
[mlir][PDL] Use ODS for defining PDL types

This removes the need to define these classes and their parser/printers in C++.

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

3 years ago[NFC] Specify C11 in loop-opt-setup.c
Matthew Voss [Fri, 8 Jan 2021 18:29:30 +0000 (10:29 -0800)]
[NFC] Specify C11 in loop-opt-setup.c

This test was failing in our internal CI, since our driver does not default to
C11. Adding this switch fixes the issue.

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

3 years ago[clangd] Add go-to-def metric.
Haojian Wu [Tue, 5 Jan 2021 09:26:20 +0000 (10:26 +0100)]
[clangd] Add go-to-def metric.

to track the number of different "special" go-to-def request.

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

3 years ago[mlir][Linalg] NFC: Refactor fusion of LinalgOp with TensorReshapeOp by expansion.
MaheshRavishankar [Fri, 8 Jan 2021 19:56:48 +0000 (11:56 -0800)]
[mlir][Linalg] NFC: Refactor fusion of LinalgOp with TensorReshapeOp by expansion.

Change the implementation of LinalgOp with TensorReshapeOp by
expansion to be more modular and easier to follow.

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

3 years ago[NFC] Disallow unused prefixes in CodeGen/AMDGPU
Mircea Trofin [Thu, 7 Jan 2021 18:29:39 +0000 (10:29 -0800)]
[NFC] Disallow unused prefixes in CodeGen/AMDGPU

This adds the lit config, and cleans up remaining tests.

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

3 years ago[RISCV] Cleanup a few section comments in RISCVInstrInfoVPseudos.td. NFC
Craig Topper [Fri, 8 Jan 2021 19:36:24 +0000 (11:36 -0800)]
[RISCV] Cleanup a few section comments in RISCVInstrInfoVPseudos.td. NFC

3 years ago[CMake] Fix incorrect rpath for tests if LLVM_LOCAL_RPATH isn't set
Raul Tambre [Fri, 8 Jan 2021 19:19:42 +0000 (21:19 +0200)]
[CMake] Fix incorrect rpath for tests if LLVM_LOCAL_RPATH isn't set

d9ce31ae7d (D94322) removed the check because I thought it was dead
due to checking the existance of a variable (which always existed).

This causes LLDB tests to fail as they set NO_INSTALL_RPATH because
they're never meant to be installed, but we still would end up using
the install rpath.

Add the check back and make it explicitly check for an empty value
to make the purpose clearer and avoid implicit test for a false/true
value.

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

3 years ago[Signal] Re-raise SIGPIPE if the handler is uninstalled
Vedant Kumar [Fri, 8 Jan 2021 19:12:08 +0000 (11:12 -0800)]
[Signal] Re-raise SIGPIPE if the handler is uninstalled

Instead of falling through to RunSignalHandlers after the SIGPIPE
handler is uninstalled and we get a SIGPIPE, re-raise the signal, just
like we do for other IntSigs.

This was discussed and informally OK'd here:

https://reviews.llvm.org/rG9a3f892d018238dce5181e458905311db8e682f5#856804

3 years ago[mlir][Linalg] Add verification checks to disallow illegal reshape ops.
MaheshRavishankar [Fri, 8 Jan 2021 18:52:26 +0000 (10:52 -0800)]
[mlir][Linalg] Add verification checks to disallow illegal reshape ops.

The existing verification of reshape ops in linalg (linalg.reshape and
linalg.tensor_reshape) allows specification of illegal ops, where
- A dynamic dimension is expanded into multiple dynamic
  dimensions. This is ill-specified.
- A static dimension is expanded into dynamic dimension or viceversa,
- The product of extents of the static dimensions in the expanded type
  doesnt match the static dimension of the collapsed type.
Making all of these illegal. This also implies that some pessimization
in canonicalization due to incomplete semantics of the operation can
be dropped.

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

3 years agoRe-land "[CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath"
Raul Tambre [Fri, 8 Jan 2021 18:18:25 +0000 (20:18 +0200)]
Re-land "[CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath"

Reverted check for empty CMAKE_BUILD_RPATH fixed.

When `BUILD_WITH_INSTALL_RPATH` is enabled it prevents using a custom rpath only
for the build tree as the install rpath will be used. This makes it impossible to run a
runtimes build when compiling with Clang and wanting the installed rpath to be
empty (i.e. `-DCMAKE_BUILD_RPATH="<some path>" -DCMAKE_SKIP_INSTALL_RPATH=ON`).

Disable `BUILD_WITH_INSTALL_RPATH` when `CMAKE_BUILD_RPATH` is non-empty to
allow for such build scenarios.

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

3 years ago[TableGen] Fix use of *CurRec when CurRec is null.
Paul C. Anagnostopoulos [Fri, 8 Jan 2021 18:20:27 +0000 (13:20 -0500)]
[TableGen] Fix use of *CurRec when CurRec is null.

I cannot build with the undefined sanitizer on Visual Studio.

3 years ago[ARM] Custom lower i1 vector truncates
David Green [Fri, 8 Jan 2021 18:21:00 +0000 (18:21 +0000)]
[ARM] Custom lower i1 vector truncates

The ISel patterns we have for truncating to i1's under MVE do not seem
to be correct. Instead custom lower to icmp(ne, and(x, 1), 0).

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

3 years ago[flang] Fix bogus message on internal subprogram with alternate return
Peter Steinfeld [Mon, 4 Jan 2021 17:35:15 +0000 (09:35 -0800)]
[flang] Fix bogus message on internal subprogram with alternate return

Internal subprograms have explicit interfaces.  If an internal subprogram has
an alternate return, we check its explicit interface.  But we were not
putting the label values of alternate returns into the actual argument.

I fixed this by changing the definition of actual arguments to be able
to contain a common::Label and putting the label for an alternate return
into the actual argument.

I also verified that we were already doing all of the semantic checking
required for alternate returns and removed a "TODO" for this.

I also added the test altreturn06.f90.

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

3 years ago[lldb] Remove stale LLDB-Info.plist
Jonas Devlieghere [Fri, 8 Jan 2021 17:43:08 +0000 (09:43 -0800)]
[lldb] Remove stale LLDB-Info.plist

Remove the stale LLDB-Info.plist which was only used by TestHelp.py. The
latter would try to parse the version number from the plist and use that
to verify the version in the help output. Of course this never matched
so it would fall back to matching any arbitrary version.

This patch does *not* change the real LLDB-Info.plist.in file which is
used for the LLDB Framework.

3 years ago[libc++] LWG2070: Use Allocator construction for objects created with allocate_shared
Louis Dionne [Fri, 11 Dec 2020 17:22:16 +0000 (12:22 -0500)]
[libc++] LWG2070: Use Allocator construction for objects created with allocate_shared

This patch updates `allocate_shared` to call `allocator_traits::construct`
when creating the object held inside the shared_pointer, and
`allocator_traits::destroy` when destroying it. This resolves
the part of P0674R1 that was originally filed as LWG2070.

This change is landed separately from the rest of P0674R1 because it is
incredibly tricky from an ABI perspective.

This is the reason why this change is so tricky is that we previously
used EBO in a compressed pair to store both the allocator and the object
type stored in the `shared_ptr`. However, starting in C++20, P0674
requires us to use Allocator construction for initializing the object type.
That requirement rules out the use of the EBO for the object type, since
using the EBO implies that the base will be initialized when the control
block is initialized (and hence we can't do it through Allocator construction).
Hence, supporting P0674 requires changing how we store the object type
inside the control block, which we do while being ABI compatible by using
some trickery with a properly aligned char buffer.

Fixes https://llvm.org/PR41900
Supersedes https://llvm.org/D62760

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

3 years ago[libc++] Add basic support for -std=c++2b.
Marek Kurdej [Fri, 8 Jan 2021 17:40:42 +0000 (18:40 +0100)]
[libc++] Add basic support for -std=c++2b.

* Add feature test macros.
* Add buildbot configuration generic-cxx2b that uses clang-tot.

Reviewed By: ldionne, #libc

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

3 years agoRevert "[CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath"
Raul Tambre [Fri, 8 Jan 2021 17:54:52 +0000 (19:54 +0200)]
Revert "[CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath"

This reverts commit 0ebc1fb29f278db0665423f15c53e6ee9601dddb.

The behaviour should have been the same as before unless specifying CMAKE_BUILD_RPATH,
which was previously broken.
However, this seems to have broken builds for some people that don't specify it.
Reverting until I can investigate.

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

3 years ago[VPlan] Move reduction start value creation to widenPHIRecipe.
Florian Hahn [Fri, 8 Jan 2021 17:40:20 +0000 (17:40 +0000)]
[VPlan] Move reduction start value creation to widenPHIRecipe.

This was suggested to prepare for D93975.

By moving the start value creation to widenPHInstruction, we set the
stage to manage the start value directly in VPWidenPHIRecipe, which be
used subsequently to set the 'resume' value for reductions during
epilogue vectorization.

It also moves RdxDesc to the recipe, so we do not have to rely on Legal
to look it up later.

Reviewed By: gilr

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

3 years ago[X86] Add TLBSYNC, INVLPGB and SNP instructions
Ganesh Gopalasubramanian [Fri, 8 Jan 2021 16:40:28 +0000 (22:10 +0530)]
[X86] Add TLBSYNC, INVLPGB and SNP instructions

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

3 years ago[lldb] Bump the required SWIG version to 3
Jonas Devlieghere [Fri, 8 Jan 2021 16:46:19 +0000 (08:46 -0800)]
[lldb] Bump the required SWIG version to 3

Bump the required SWIG version to 3. If my memory serves me well we last
bumped the required SWIG version to 2 for Python 3. At that time SWIG 3
had already been around for a while so everyone I know was already using
that.

It appears that SWIG 3 is the only version that officially supports
C++11 which we're using in the typemap. SWIG 3 was released in 2014 so I
think it's reasonable to make that the minimum required version.

https://bugs.llvm.org/show_bug.cgi?id=48685

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

3 years ago[libc++] Update generate_feature_test_macro_components.py to match SD-6.
Arthur O'Dwyer [Thu, 7 Jan 2021 23:21:07 +0000 (18:21 -0500)]
[libc++] Update generate_feature_test_macro_components.py to match SD-6.

It's still a little confusing because in many cases C++17 and C++20
have different values, and libc++ implements the C++17 behavior but
not the C++20 behavior; 'unimplemented' can't represent that scenario.
Ultimately we probably ought to completely redesign the script to be
in terms of paper numbers, rather than language revisions, and make
it generate the CSV files like "Cxx2aStatusPaperStatus.csv" as well.

Most newly added macros are unimplemented. I've marked a few as implemented,
though, based on my reading of the code; for example I was pretty sure
`__cpp_lib_latch` is implemented since we have `<latch>`.

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

3 years ago[mlir] replace LLVM dialect float types with built-ins
Alex Zinenko [Wed, 6 Jan 2021 15:21:08 +0000 (16:21 +0100)]
[mlir] replace LLVM dialect float types with built-ins

Continue the convergence between LLVM dialect and built-in types by replacing
the bfloat, half, float and double LLVM dialect types with their built-in
counterparts. At the API level, this is a direct replacement. At the syntax
level, we change the keywords to `bf16`, `f16`, `f32` and `f64`, respectively,
to be compatible with the built-in type syntax. The old keywords can still be
parsed but produce a deprecation warning and will be eventually removed.

Depends On D94178

Reviewed By: mehdi_amini, silvas, antiagainst

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

3 years ago[clangd] Add missing "override" to fix the build.
Adam Czachorowski [Fri, 8 Jan 2021 16:21:02 +0000 (17:21 +0100)]
[clangd] Add missing "override" to fix the build.

Follow-up to d4af86581e80ef0f7a6f4a4fff1c97260a726e71

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

3 years ago[ConstProp] Constant propagation for get.active.lane.mask instrinsics
David Green [Fri, 8 Jan 2021 16:10:01 +0000 (16:10 +0000)]
[ConstProp] Constant propagation for get.active.lane.mask instrinsics

Similar to the Arm VCTP intrinsics, if the operands of an
active.lane.mask are both known, the constant lane mask can be
calculated. This can come up after unrolling the loops.

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

3 years ago[clangd] Fix type printing in the presence of qualifiers
Adam Czachorowski [Thu, 7 Jan 2021 20:24:40 +0000 (21:24 +0100)]
[clangd] Fix type printing in the presence of qualifiers

When printing QualType with qualifiers like "const", or pointing to an
elaborated type, we would print garbage like:
  std::const std::vector<int>&
with the initial std:: being calculated correctly, but inserted in the
wrong place and the second std:: not removed (due to elaborated type).

This affected, among others, ExtractFunction and ExpandAuto tweaks.

This change introduces a new callback to PrintingPolicy, which allows us
to influence the printing of namespace qualifiers. In the future, the
same callback can be used to improve handling of "using namespace"
directives as well.

Fixes:
  https://github.com/clangd/clangd/issues/640 (ExtractFunction)
  https://github.com/clangd/clangd/issues/264 (ExpandAuto)
  First point of https://github.com/clangd/clangd/issues/524

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

3 years agoRevert "[mlir:JitRunner] Use custom shared library init/destroy functions if available"
Eugene Zhulenev [Fri, 8 Jan 2021 15:43:54 +0000 (07:43 -0800)]
Revert "[mlir:JitRunner] Use custom shared library init/destroy functions if available"

This reverts commit 84dc9b451bfd62474f44dd1af0e4955a0110d523.

Fix Windows breakage: http://lab.llvm.org:8011/#/builders/13/builds/3658/steps/6/logs/stdio

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

3 years ago[X86][SSE] Fold unpack(hop(),hop()) -> permute(hop())
Simon Pilgrim [Fri, 8 Jan 2021 15:08:12 +0000 (15:08 +0000)]
[X86][SSE] Fold unpack(hop(),hop()) -> permute(hop())

UNPCKL/UNPCKH only uses one op from each hop, so we can merge the hops and then permute the result.

3 years ago[ARM][LV] Additional loop invariant reduction test. NFC
David Green [Fri, 8 Jan 2021 15:15:08 +0000 (15:15 +0000)]
[ARM][LV] Additional loop invariant reduction test. NFC

3 years ago[mlir:JitRunner] Use custom shared library init/destroy functions if available
Eugene Zhulenev [Fri, 8 Jan 2021 11:14:04 +0000 (03:14 -0800)]
[mlir:JitRunner] Use custom shared library init/destroy functions if available

Use custom mlir runner init/destroy functions to safely init and destroy shared libraries loaded by the JitRunner.

Reviewed By: mehdi_amini

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

3 years ago[TableGen] Remove unused declaration that caused build failures.
Paul C. Anagnostopoulos [Fri, 8 Jan 2021 15:10:05 +0000 (10:10 -0500)]
[TableGen] Remove unused declaration that caused build failures.

3 years ago[WebAssembly] Rename wasm_rethrow_in_catch intrinsic/builtin
Heejin Ahn [Sat, 26 Dec 2020 00:14:35 +0000 (16:14 -0800)]
[WebAssembly] Rename wasm_rethrow_in_catch intrinsic/builtin

`wasm_rethrow_in_catch` intrinsic and builtin are used in order to
rethrow an exception when the exception is caught but there is no
matching clause within the current `catch`. For example,
```
try {
  foo();
} catch (int n) {
  ...
}
```
If the caught exception does not correspond to C++ `int` type, it should
be rethrown. These intrinsic/builtin were renamed `rethrow_in_catch`
because at the time I thought there would be another intrinsic for C++'s
`throw` keyword, which rethrows an exception. It turned out that `throw`
keyword doesn't require wasm's `rethrow` instruction, so we rename
`rethrow_in_catch` to just `rethrow` here.

Reviewed By: dschuff, tlively

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

3 years ago[ARM] Update and regenerate test checks. NFC
David Green [Fri, 8 Jan 2021 14:54:16 +0000 (14:54 +0000)]
[ARM] Update and regenerate test checks. NFC

3 years ago[TableGen] Add the assert statement, step 1
Paul C. Anagnostopoulos [Wed, 16 Dec 2020 21:25:54 +0000 (16:25 -0500)]
[TableGen] Add the assert statement, step 1

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

This first step adds the assert statement and supports it at top level
and in record definitions. Later steps will support it in class
definitions and multiclasses.

3 years ago[MLIR][OpenMP] Attribute to include WsLoop upperbound
Kiran Chandramohan [Thu, 7 Jan 2021 15:51:55 +0000 (15:51 +0000)]
[MLIR][OpenMP] Attribute to include WsLoop upperbound

This patch adds an attribute `inclusive` which if present causes
the upperbound to be included in the loop iteration interval.

Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D94235

3 years ago[X86][SSE] Add vphaddd/vphsubd unpack(hop(),hop()) tests
Simon Pilgrim [Fri, 8 Jan 2021 14:37:19 +0000 (14:37 +0000)]
[X86][SSE] Add vphaddd/vphsubd unpack(hop(),hop()) tests

3 years ago[SLP][NFC]Add a test for reused shrink check, NFC.
Alexey Bataev [Fri, 8 Jan 2021 13:31:07 +0000 (05:31 -0800)]
[SLP][NFC]Add a test for reused shrink check, NFC.

3 years ago[NFC] Renaming PackStack to AlignPackStack
Xiangling Liao [Thu, 7 Jan 2021 22:16:33 +0000 (17:16 -0500)]
[NFC] Renaming PackStack to AlignPackStack

This patch renames PackStack and related variable names to also contain align across Clang.
As it is right now, Clang already uses one stack to record the information from both #pragma
align and #pragma pack. Leaving it as PackStack is confusing, and could cause people to
ignore #pragma align when developing code that interacts with PackStack.

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

3 years ago[X86][SSE] Add tests for unpack(hop(),hop())
Simon Pilgrim [Fri, 8 Jan 2021 13:58:46 +0000 (13:58 +0000)]
[X86][SSE] Add tests for unpack(hop(),hop())

We should be able to convert these to permute(hop()) as we only ever use one of the ops from each hop.

3 years ago[MLIR][SPIRV] Add `UsableInSpecConstantOp` trait.
KareemErgawy-TomTom [Fri, 8 Jan 2021 13:48:48 +0000 (14:48 +0100)]
[MLIR][SPIRV] Add `UsableInSpecConstantOp` trait.

Instead of checking explicitly checking for whether an op is usalbe
inside a `SpecConstantOperationOP`, this commit adds a new trait to
filter such ops.

Reviewed By: antiagainst

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

3 years ago[VE] Support pack_f32p and pack_f32a intrinsic instructions
Kazushi (Jam) Marukawa [Fri, 8 Jan 2021 11:10:02 +0000 (20:10 +0900)]
[VE] Support pack_f32p and pack_f32a intrinsic instructions

Support pack_f32p and pack_f32a intrinsic instructions and regression tests.

Reviewed By: simoll

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

3 years ago[WebAssembly] Change label numbers to variables in test
Heejin Ahn [Thu, 24 Dec 2020 11:07:24 +0000 (03:07 -0800)]
[WebAssembly] Change label numbers to variables in test

cfg-stackify-eh.ll contains many `CHECK` lines specifying label / catch
comments with numbers. These numbers are subject to change every time
any block/loop/try is added in the middle in existing functions or any
other function is added in the middle of the file, generating a large
number of lines in diffs. This change converts them to variables so they
can be more resistent to future changes.

Reviewed By: dschuff, tlively

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

3 years ago[OpenCL] Documentation for experimental C++ libs
Anastasia Stulova [Fri, 8 Jan 2021 13:37:27 +0000 (13:37 +0000)]
[OpenCL] Documentation for experimental C++ libs

Started a new doc section about the OpenCL experimental
features and described ongoing work on C++ libraries
e.g. type traits.

Tags: #clang

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

3 years agoRevert "[SLP]Need shrink the load vector after reordering."
Alexander Belyaev [Fri, 8 Jan 2021 13:33:39 +0000 (14:33 +0100)]
Revert "[SLP]Need shrink the load vector after reordering."

This reverts commit 4284afdf9432f7d756f56b0ab21d69191adefa8d.

This changes computed values in fused_batchnorm_test_cpu.

Not equal to tolerance rtol=1e-06, atol=0.001
Mismatched value: a is different from b.
not close where = (array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
       1, 1]), array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
       1, 1]), array([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
       1, 1]), array([0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
       4, 5]))
not close lhs = [-0.6636615  -0.9804948  -1.148275   -0.68193716 -0.8572368  -0.65046215
 -0.6993756  -1.2244141  -1.0938729  -0.50369143 -0.51830524 -0.738452
 -0.7214286  -0.48115745 -0.9380924  -0.9341769  -0.5916775  -1.2896856
 -0.7264182  -0.9746917  -0.783249   -0.7659018  -0.86214024 -0.47784212]
not close rhs = [ 0.44102234  0.12418899 -0.04359123  0.42274666  0.24744703  0.45422167
  0.40530816 -0.11973029  0.01081094  0.6009924   0.5863786   0.3662318
  0.38325527  0.62352633  0.1665914   0.1705069   0.5130063  -0.18500176
  0.37826565  0.12999213  0.3214348   0.338782    0.24254355  0.62684166]
not close dif = [1.1046839 1.1046838 1.1046838 1.1046839 1.1046839 1.1046839 1.1046838
 1.1046839 1.1046839 1.1046839 1.1046839 1.1046839 1.1046839 1.1046838
 1.1046839 1.1046839 1.1046839 1.1046839 1.1046839 1.1046839 1.1046839
 1.1046839 1.1046838 1.1046838]
not close tol = [0.00100044 0.00100012 0.00100004 0.00100042 0.00100025 0.00100045
 0.00100041 0.00100012 0.00100001 0.0010006  0.00100059 0.00100037
 0.00100038 0.00100062 0.00100017 0.00100017 0.00100051 0.00100019
 0.00100038 0.00100013 0.00100032 0.00100034 0.00100024 0.00100063]

3 years ago[gn build] Port 9c4b2225b24
LLVM GN Syncbot [Fri, 8 Jan 2021 13:30:54 +0000 (13:30 +0000)]
[gn build] Port 9c4b2225b24

3 years ago[VP] ISD helper functions [VE] isel for vp_add, vp_and
Simon Moll [Fri, 8 Jan 2021 12:53:18 +0000 (13:53 +0100)]
[VP] ISD helper functions [VE] isel for vp_add, vp_and

This implements vp_add, vp_and for the VE target by lowering them to the
VVP_* layer. We also add helper functions for VP SDNodes (isVPSDNode,
getVPMaskIdx, getVPExplicitVectorLengthIdx).

Reviewed By: kaz7

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

3 years ago[lldb][NFC] Refactor setup code for Clang diagnostics
Raphael Isemann [Fri, 8 Jan 2021 13:24:48 +0000 (14:24 +0100)]
[lldb][NFC] Refactor setup code for Clang diagnostics

3 years ago[MLIR][NFC] remove unnecessary includes form tablegen command
Shivam Gupta [Fri, 8 Jan 2021 13:24:36 +0000 (14:24 +0100)]
[MLIR][NFC] remove unnecessary includes form tablegen command

With [[ https://reviews.llvm.org/D77156 | D77156 ]] includes are not needed here.

Reviewed By: ftynse

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

3 years ago[AArch64] Add +flagm archictecture option, allowing the v8.4a flag modification exten...
Mark Murray [Tue, 5 Jan 2021 12:10:04 +0000 (12:10 +0000)]
[AArch64] Add +flagm archictecture option, allowing the v8.4a flag modification extension.

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

3 years ago[AArch64] Add +pauth archictecture option, allowing the v8.3a pointer authentication...
Mark Murray [Mon, 4 Jan 2021 13:45:49 +0000 (13:45 +0000)]
[AArch64] Add +pauth archictecture option, allowing the v8.3a pointer authentication extension.

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

3 years agoRevert "Revert "Revert "Revert "Revert "[analyzer] NFC: Move path diagnostic consumer...
Alexander Belyaev [Fri, 8 Jan 2021 13:17:18 +0000 (14:17 +0100)]
Revert "Revert "Revert "Revert "Revert "[analyzer] NFC: Move path diagnostic consumer implementations to libAnalysis."""""

This reverts commit 6b0ee02747ed22d41e175d15f27025183341e6f8.

Circular dependency again.

3 years ago[SLP] limit verifyFunction to debug build (PR48689)
Sanjay Patel [Fri, 8 Jan 2021 12:41:26 +0000 (07:41 -0500)]
[SLP] limit verifyFunction to debug build (PR48689)

As noted in PR48689, the verifier may have some kind
of exponential behavior that should be addressed
separately. For now, only run it in debug mode to
prevent problems for release+asserts.
That limit is what we had before D80401, and I'm
not sure if there was a reason to change it in that
patch.

3 years ago[clangd] go-to-implementation on a base class jumps to all subclasses.
Haojian Wu [Thu, 3 Dec 2020 08:42:46 +0000 (09:42 +0100)]
[clangd] go-to-implementation on a base class jumps to all subclasses.

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

3 years ago[libc++] Add missing XFAIL to tests that need __atomic_* libcalls
Alex Richardson [Fri, 8 Jan 2021 11:54:43 +0000 (11:54 +0000)]
[libc++] Add missing XFAIL to tests that need __atomic_* libcalls

FreeBSD did not provide the __atomic_* functions as part of the base
system until recently. They were added to libgcc_s in SVN revision r364753
(August 2020), so check for availability of 'non-lockfree-atomics' so that
these tests do not fail unexpectedly on older versions of FreeBSD.

This also removes the #ifndef __APPLE__ from atomic_helpers.h that was used
to work around lack of atomic runtime functions on older Apple platforms
and replaces it with XFAIL: !non-lockfree-atomics.

Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D88818

3 years ago[compiler-rt] Implement __atomic_is_lock_free
Alex Richardson [Fri, 8 Jan 2021 11:53:04 +0000 (11:53 +0000)]
[compiler-rt] Implement __atomic_is_lock_free

This function is called by the __atomic_is_lock_free() builtin if the value
cannot be resolved to true at compile time. Lack of this function is
causing the non-lockfree atomics tests in libc++ to not be run (see D91911)

This function is also added in D85044, but that review also adds support
for using lock-free atomics in more cases, whereas this is a minimal change
that just adds __atomic_is_lock_free() for the implementation of atomic.c.

Reviewed By: ldionne

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

3 years ago[VE][NFC] Clean ISel patterns for LSV and LVS
Kazushi (Jam) Marukawa [Thu, 7 Jan 2021 14:32:12 +0000 (23:32 +0900)]
[VE][NFC] Clean ISel patterns for LSV and LVS

Clean ISel patterns for LSV and LVS before upstream more hand-written
ISel patterns.

Reviewed By: simoll

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

3 years ago[clangd] Cleanup a remaining Optional<SymbolID> usage, NFC.
Haojian Wu [Fri, 8 Jan 2021 12:42:33 +0000 (13:42 +0100)]
[clangd] Cleanup a remaining Optional<SymbolID> usage, NFC.

3 years ago[clangd] NFC, avoid potential ODR violation.
Haojian Wu [Fri, 8 Jan 2021 12:29:11 +0000 (13:29 +0100)]
[clangd] NFC, avoid potential ODR violation.

3 years ago[AArch64] Fix crash caused by invalid vector element type
Nicholas Guy [Thu, 7 Jan 2021 15:39:07 +0000 (15:39 +0000)]
[AArch64] Fix crash caused by invalid vector element type

Fixes a crash caused by D91255, when LLVMTy is null when
calling changeExtendedVectorElementType.

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

3 years ago[SVE] Add support to vectorize_width loop pragma for scalable vectors
David Sherwood [Fri, 2 Oct 2020 06:46:42 +0000 (07:46 +0100)]
[SVE] Add support to vectorize_width loop pragma for scalable vectors

This patch adds support for two new variants of the vectorize_width
pragma:

1. vectorize_width(X[, fixed|scalable]) where an optional second
parameter is passed to the vectorize_width pragma, which indicates if
the user wishes to use fixed width or scalable vectorization. For
example the user can now write something like:

  #pragma clang loop vectorize_width(4, fixed)
or
  #pragma clang loop vectorize_width(4, scalable)

In the absence of a second parameter it is assumed the user wants
fixed width vectorization, in order to maintain compatibility with
existing code.
2. vectorize_width(fixed|scalable) where the width is left unspecified,
but the user hints what type of vectorization they prefer, either
fixed width or scalable.

I have implemented this by making use of the LLVM loop hint attribute:

  llvm.loop.vectorize.scalable.enable

Tests were added to

  clang/test/CodeGenCXX/pragma-loop.cpp

for both the 'fixed' and 'scalable' optional parameter.

See this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html

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

3 years ago[LV] Legalize scalable VF hints
Cullen Rhodes [Mon, 16 Nov 2020 11:02:14 +0000 (11:02 +0000)]
[LV] Legalize scalable VF hints

In the following loop:

  void foo(int *a, int *b, int N) {
    for (int i=0; i<N; ++i)
      a[i + 4] = a[i] + b[i];
  }

The loop dependence constrains the VF to a maximum of (4, fixed), which
would mean using <4 x i32> as the vector type in vectorization.
Extending this to scalable vectorization, a VF of (4, scalable) implies
a vector type of <vscale x 4 x i32>. To determine if this is legal
vscale must be taken into account. For this example, unless
max(vscale)=1, it's unsafe to vectorize.

For SVE, the number of bits in an SVE register is architecturally
defined to be a multiple of 128 bits with a maximum of 2048 bits, thus
the maximum vscale is 16. In the loop above it is therefore unfeasible
to vectorize with SVE. However, in this loop:

  void foo(int *a, int *b, int N) {
    #pragma clang loop vectorize_width(X, scalable)
    for (int i=0; i<N; ++i)
      a[i + 32] = a[i] + b[i];
  }

As long as max(vscale) multiplied by the number of lanes 'X' doesn't
exceed the dependence distance, it is safe to vectorize. For SVE a VF of
(2, scalable) is within this constraint, since a vector of <16 x 2 x 32>
will have no dependencies between lanes. For any number of lanes larger
than this it would be unsafe to vectorize.

This patch extends 'computeFeasibleMaxVF' to legalize scalable VFs
specified as loop hints, implementing the following behaviour:
  * If the backend does not support scalable vectors, ignore the hint.
  * If scalable vectorization is unfeasible given the loop
    dependence, like in the first example above for SVE, then use a
    fixed VF.
  * Accept scalable VFs if it's safe to do so.
  * Otherwise, clamp scalable VFs that exceed the maximum safe VF.

Reviewed By: sdesmalen, fhahn, david-arm

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

3 years ago[VE] Expand single-element BUILD_VECTOR to INSERT_VECTOR_ELT
Simon Moll [Fri, 8 Jan 2021 10:47:55 +0000 (11:47 +0100)]
[VE] Expand single-element BUILD_VECTOR to INSERT_VECTOR_ELT

We do this mostly to be able to test the insert_vector_elt isel
patterns. As long as we don't, most single element insertions show up as
`BUILD_VECTOR` in the backend.

Reviewed By: kaz7

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

3 years ago[VE] Extract & insert vector element isel
Simon Moll [Fri, 8 Jan 2021 10:35:58 +0000 (11:35 +0100)]
[VE] Extract & insert vector element isel

Isel and tests for extract_vector_elt and insert_vector_elt.

Reviewed By: kaz7

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

3 years agoFix two pessimizing moves.
Christian Sigg [Thu, 7 Jan 2021 08:40:41 +0000 (09:40 +0100)]
Fix two pessimizing moves.

See https://en.cppreference.com/w/cpp/language/return#Automatic_move_from_local_variables_and_parameters

Reviewed By: rriddle

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

3 years ago[NFC] Update some PPC tests marked as auto-generated
Qiu Chaofan [Fri, 8 Jan 2021 09:50:53 +0000 (17:50 +0800)]
[NFC] Update some PPC tests marked as auto-generated

Update CodeGen regression tests with marker at first line telling it's
auto-generated by the script, under PowerPC directory. For some reason,
these tests are generated but manually written, which makes things
unclear when someone's change affecting them.

However, some tests only show simple change after re-generated, like
extra blank lines, disappearing '.localentry', etc. Besides, some tests
are generated but added checks for debug output. This commit doesn't try
updating them.

3 years agoRevert "[clang][cli] Port DiagnosticOpts to new option parsing system"
Jan Svoboda [Fri, 8 Jan 2021 09:53:12 +0000 (10:53 +0100)]
Revert "[clang][cli] Port DiagnosticOpts to new option parsing system"

This reverts commit 8e3230ff

3 years ago[LV] Don't sink into replication regions
David Green [Fri, 8 Jan 2021 09:50:10 +0000 (09:50 +0000)]
[LV] Don't sink into replication regions

The new test case here contains a first order recurrences and an
instruction that is replicated. The first order recurrence forces an
instruction to be sunk _into_, as opposed to after the replication
region. That causes several things to go wrong including registering
vector instructions multiple times and failing to create dominance
relations correctly.

Instead we should be sinking to after the replication region, which is
what this patch makes sure happens.

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