OSDN Git Service

android-x86/external-llvm-project.git
4 years ago[openmp] Move Directive and Clause helper function to tablegen
Valentin Clement [Tue, 30 Jun 2020 18:36:37 +0000 (14:36 -0400)]
[openmp] Move Directive and Clause helper function to tablegen

Summary:
Follow up to D81736. Move getOpenMPDirectiveKind, getOpenMPClauseKind, getOpenMPDirectiveName and
getOpenMPClauseName to the new tablegen code generation. The code is generated in a new file named OMP.cpp.inc

Reviewers: jdoerfert, jdenny, thakis

Reviewed By: jdoerfert, jdenny

Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, llvm-commits, thakis

Tags: #llvm

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

4 years ago[mlir] Fix case in MLIRGPUtoGPURuntimeTransforms
Marius Brehler [Tue, 30 Jun 2020 18:47:17 +0000 (20:47 +0200)]
[mlir] Fix case in MLIRGPUtoGPURuntimeTransforms

Summary:
This changes the casing of MLIRGPUtoGPURuntimeTransforms to be consistent
with other transform libraries.

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

4 years ago[macho] emit LC_BUILD_VERSION load command for supported OSes and platforms
Alex Lorenz [Tue, 30 Jun 2020 04:04:25 +0000 (21:04 -0700)]
[macho] emit LC_BUILD_VERSION load command for supported OSes and platforms

This change lets LLVM use the LC_BUILD_VERSION command when building for macOS 10.14, iOS 12, tvOS 12, and watchOS 5.
Additionally, this change ensures that new platforms like Apple Silicon macOS / Mac Catalyst,
and simulators running on Apple Silicon alway use LC_BUILD_VERSION with the OS version set to the
minimum supported OS version if the deployment target version is older.

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

4 years ago[mlir] Fix case in MLIRGPUtoNVVMTransforms
Marius Brehler [Tue, 30 Jun 2020 18:44:04 +0000 (20:44 +0200)]
[mlir] Fix case in MLIRGPUtoNVVMTransforms

Summary:
This changes the casing of MLIRGPUtoNVVMTransforms to be consistent
with other transform libraries.

Reviewers: stephenneuendorffer, herhut

Reviewed By: herhut

Subscribers: jholewinski, mgorny, mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, grosul1, Kayjukh, jurahul, msifontes

Tags: #mlir

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

4 years ago[mlir] Fix case in MLIRGPUtoROCDLTransforms
Marius Brehler [Tue, 30 Jun 2020 18:39:41 +0000 (20:39 +0200)]
[mlir] Fix case in MLIRGPUtoROCDLTransforms

Summary:
This changes the casing of MLIRGPUtoROCDLTransforms to be consistent
with other transform libraries.

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

4 years ago[lldb/Test] Skip TestIOHandlerResizeNoEditline with reproducers
Jonas Devlieghere [Tue, 30 Jun 2020 18:37:44 +0000 (11:37 -0700)]
[lldb/Test] Skip TestIOHandlerResizeNoEditline with reproducers

4 years ago[clang-tidy] Added option to readability-else-after-return
Nathan James [Tue, 30 Jun 2020 18:34:44 +0000 (19:34 +0100)]
[clang-tidy] Added option to readability-else-after-return

Added a 'RefactorConditionVariables' option to control how the check handles condition variables

Reviewed By: aaron.ballman

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

4 years ago[sve][acle] Enable feature macros for SVE ACLE extensions.
Francesco Petrogalli [Thu, 25 Jun 2020 21:49:00 +0000 (21:49 +0000)]
[sve][acle] Enable feature macros for SVE ACLE extensions.

Summary:
The following feature macros have been added:

__ARM_FEATURE_SVE_BF16

__ARM_FEATURE_SVE_MATMUL_INT8

__ARM_FEATURE_SVE_MATMUL_FP32

__ARM_FEATURE_SVE_MATMUL_FP64

The driver has been updated to enable them accordingly to the value of
the target feature passed at command line.

The SVE ACLE tests using the macros have been modified to work with
the target feature instead of passing the macro at command line.

Reviewers: sdesmalen, efriedma, c-rhodes, kmclaughlin, SjoerdMeijer, rengolin

Subscribers: tschuett, kristof.beyls, rkruppe, psnobl, cfe-commits

Tags: #clang

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

4 years ago[llvm-install-name-tool] Add -change option
Sameer Arora [Tue, 30 Jun 2020 18:01:51 +0000 (11:01 -0700)]
[llvm-install-name-tool] Add -change option

Implement `-change` option for install-name-tool. The behavior exactly
matches that of cctools. Depends on D82410.

Reviewed By: jhenderson, smeenai

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

4 years ago[llvm-install-name-tool] Add -id option
Sameer Arora [Tue, 30 Jun 2020 18:01:45 +0000 (11:01 -0700)]
[llvm-install-name-tool] Add -id option

Implement `-id` option for install-name-tool. Differences from cctool's
behavior:
 - Does **NOT** throw an error if multiple -id options are specified.
    Instead, picks the last one.
 - Throws an error in case empty id is specified.

Reviewed By: jhenderson, smeenai

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

4 years ago[PDB] Defer public serialization until PDB writing
Reid Kleckner [Fri, 5 Jun 2020 01:57:24 +0000 (18:57 -0700)]
[PDB] Defer public serialization until PDB writing

This reduces peak memory on my test case from 1960.14MB to 1700.63MB
(-260MB, -13.2%) with no measurable impact on CPU time. I'm currently
working with a publics stream that is about 277MB. Before this change,
we would allocate 277MB of heap memory, serialize publics into them,
hold onto that heap memory, open the PDB, and commit into it.  After
this change, we defer the serialization until commit time.

In the last change I made to public writing, I re-sorted the list of
publics multiple times in place to avoid allocating new temporary data
structures. Deferring serialization until later requires that we don't
reorder the publics. Instead of sorting the publics, I partially
construct the hash table data structures, store a publics index in them,
and then sort the hash table data structures. Later, I replace the index
with the symbol record offset.

This change also addresses a FIXME and moves the list of global and
public records from GSIHashStreamBuilder to GSIStreamBuilder. Now that
publics aren't being serialized, it makes even less sense to store them
as a list of CVSymbol records. The hash table used to deduplicate
globals is moved as well, since that is specific to globals, and not
publics.

Reviewed By: aganea, hans

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

4 years ago[PhaseOrdering][NewPM] update test that silently showed bug with SpeculativeExecution...
Sanjay Patel [Tue, 30 Jun 2020 18:20:46 +0000 (14:20 -0400)]
[PhaseOrdering][NewPM] update test that silently showed bug with SpeculativeExecutionPass; NFC

See D82735 / rG1a6cebb4d12c744699e23624f8afda5cbe216fe6

4 years agoImprove the detection of iOS/tvOS/watchOS simulator binaries in
Adrian Prantl [Tue, 30 Jun 2020 17:26:25 +0000 (10:26 -0700)]
Improve the detection of iOS/tvOS/watchOS simulator binaries in
debugserver and lldb

This patch improves the heuristics for correctly identifying simulator binaries on Darwin and adds support for simulators running on Apple Silicon.

rdar://problem/64046344

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

4 years ago[SVE] Remove calls to VectorType::getNumElements from AArch64
Christopher Tetreault [Tue, 30 Jun 2020 18:07:24 +0000 (11:07 -0700)]
[SVE] Remove calls to VectorType::getNumElements from AArch64

Reviewers: efriedma, paquette, david-arm, kmclaughlin

Reviewed By: david-arm

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, llvm-commits

Tags: #llvm

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

4 years ago[libc++] Add missing include in test
Louis Dionne [Tue, 30 Jun 2020 18:16:00 +0000 (14:16 -0400)]
[libc++] Add missing include in test

4 years ago[SVE] Remove calls to VectorType::getNumElements from ExecutionEngine
Christopher Tetreault [Tue, 30 Jun 2020 17:56:36 +0000 (10:56 -0700)]
[SVE] Remove calls to VectorType::getNumElements from ExecutionEngine

Reviewers: efriedma, lhames, sdesmalen, fpetrogalli

Reviewed By: lhames, sdesmalen

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

Tags: #llvm

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

4 years agoUpdate the phabricator docs to reflect the monorepo change.
Eric Christopher [Tue, 30 Jun 2020 17:52:10 +0000 (10:52 -0700)]
Update the phabricator docs to reflect the monorepo change.

Patch by Nathan Froyd!

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

4 years ago[libc++] Split dylib instantiations for deprecated std::random_shuffle into a separat...
Louis Dionne [Tue, 30 Jun 2020 16:42:44 +0000 (12:42 -0400)]
[libc++] Split dylib instantiations for deprecated std::random_shuffle into a separate source file

That makes it easier to exclude from the build if one wants to build libc++
without support for the deprecated std::random_shuffle.

4 years ago[flang] Silence some warnings from clang-tidy
Tim Keith [Tue, 30 Jun 2020 17:15:10 +0000 (10:15 -0700)]
[flang] Silence some warnings from clang-tidy

Disable some of the warnings from clang-tidy, in particular,
`readability-identifier-naming`. They add clutter to reviews.

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

4 years ago[MVT] Add new MVT types for RISC-V vector.
Hsiangkai Wang [Fri, 12 Jun 2020 09:02:34 +0000 (17:02 +0800)]
[MVT] Add new MVT types for RISC-V vector.

In RISC-V vector extension, users could group multiple vector registers
as one pseudo register. In mixed width operations, users could use
partial vector registers to reduce the register pressure. The parameter
to control register grouping and partial use is called LMUL. LMUL is a
part of the type. So, we have a bunch of vector types. In order to
support all these types, we need new MVT types in LLVM. In this patch, I
added several MVT types that are used in RISC-V vector implementation.
This is a standalone patch for MVT types without RISC-V related implementation.

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

4 years ago[InstCombine] New FMA tests and regenerate tests. NFC
David Green [Tue, 30 Jun 2020 15:49:55 +0000 (16:49 +0100)]
[InstCombine] New FMA tests and regenerate tests. NFC

4 years ago[PowerPC][NFC] Rename/organize encoding test files for ISA3.1
Lei Huang [Tue, 30 Jun 2020 16:42:36 +0000 (11:42 -0500)]
[PowerPC][NFC] Rename/organize encoding test files for ISA3.1

Rename `future*` encoding test files to include ISA3.1 in the file name
and combine with exisitng ISA3.1 instruction encoding tests that were
added into `p10*` test files.

Keeping the `p10*` files for now to ensure we don't add more to it.
Will remove once all ISA3.1 instruction are implemented.

4 years ago[clang][docs] Add note about using `-flto` with `-g` on macOS
Philippe Blain [Tue, 30 Jun 2020 16:31:46 +0000 (09:31 -0700)]
[clang][docs] Add note about using `-flto` with `-g` on macOS

If -Wl,object_path_lto,<lto-filename>.o is not passed at link time
when compiling and linking in separate steps with -flto and -g, the
temporary file used for Link Time Optimization is deleted by the linker,
so the executable is missing debug symbols and can't be easily debugged,
and dsymutil can't be run.

Document this behaviour.

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

4 years ago[ARM] Allow the fabs intrinsic to be tail predicated
Samuel Tebbs [Tue, 30 Jun 2020 16:00:29 +0000 (17:00 +0100)]
[ARM] Allow the fabs intrinsic to be tail predicated

This patch stops the fabs intrinsic from blocking tail predication.

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

4 years agoPass MDFieldPrinter::printAPInt APInt arg by reference not value.
Simon Pilgrim [Tue, 30 Jun 2020 14:28:27 +0000 (15:28 +0100)]
Pass MDFieldPrinter::printAPInt APInt arg by reference not value.

Noticed by clang-tidy performance-unnecessary-value-param warning.

4 years ago[ARM] Allow the usub_sat and ssub_sat intrinsics to be tail predicated
Samuel Tebbs [Tue, 30 Jun 2020 16:04:13 +0000 (17:04 +0100)]
[ARM] Allow the usub_sat and ssub_sat intrinsics to be tail predicated

This patch stops the usub_sat and ssub_sat intrinsics from blocking tail predication.

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

4 years ago[libc++abi] Remove unused include of <sys/types.h>
Louis Dionne [Mon, 29 Jun 2020 21:44:05 +0000 (17:44 -0400)]
[libc++abi] Remove unused include of <sys/types.h>

I ran into an error while trying to build libc++abi for a platform that
doesn't have <sys/types.h>. I couldn't find what <sys/types.h> was used
for in the header, so I think it's fine to remove it.

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

4 years agoRegAlloc: Start using Register
Matt Arsenault [Tue, 30 Jun 2020 15:57:24 +0000 (11:57 -0400)]
RegAlloc: Start using Register

4 years agoBranchFolding: Use Register
Matt Arsenault [Tue, 30 Jun 2020 15:57:47 +0000 (11:57 -0400)]
BranchFolding: Use Register

4 years agoTailDuplicator: Use Register
Matt Arsenault [Tue, 30 Jun 2020 15:20:12 +0000 (11:20 -0400)]
TailDuplicator: Use Register

4 years agoAMDGPU: Use Register
Matt Arsenault [Tue, 23 Jun 2020 13:37:13 +0000 (09:37 -0400)]
AMDGPU: Use Register

4 years agoX86: Use Register
Matt Arsenault [Sun, 28 Jun 2020 14:49:06 +0000 (10:49 -0400)]
X86: Use Register

4 years ago[ARM][MVE] Tail-predication: clean-up of unused code
Sjoerd Meijer [Mon, 29 Jun 2020 14:40:03 +0000 (15:40 +0100)]
[ARM][MVE] Tail-predication: clean-up of unused code

After the rewrite of this pass (D79175) I missed one thing: the inserted VCTP
intrinsic can be cloned to exit blocks if there are instructions present in it
that perform the same operation, but this wasn't triggering anymore. However,
it turns out that for handling reductions, see D75533, it's actually easier not
not to have the VCTP in exit blocks, so this removes that code.

This was possible because it turned out that some other code that depended on
this, rematerialization of the trip count enabling more dead code removal
later, wasn't doing much anymore due to more aggressive dead code removal that
was added to the low-overhead loops pass.

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

4 years ago[mlir] [VectorOps] Replace zero fma with mult for vector.contract
aartbik [Tue, 30 Jun 2020 16:04:16 +0000 (09:04 -0700)]
[mlir] [VectorOps] Replace zero fma with mult for vector.contract

More efficient implementation of the multiply-reduce pair,
no need to add in a zero vector. Microbenchmarking on AVX2
yields the following difference in vector.contract speedup
(over strict-order scalar reduction).

SPEEDUP     SIMD-fma SIMD-mul
4x4     1.45   2.00
8x8     1.40   1.90
32x32     5.32   5.80

Reviewed By: ftynse

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

4 years ago[lldb/Test] Skip recognizer tests when Python is disabled
Jonas Devlieghere [Tue, 30 Jun 2020 15:57:50 +0000 (08:57 -0700)]
[lldb/Test] Skip recognizer tests when Python is disabled

The `frame recognizer` command only exists when Python scripting is
enabled. Therefore the test should be made conditional on Python.
Without it, the test fails with "'frame recognizer' is not a known
command."

4 years ago[ARM] Allow rounding intrinsics to be tail predicated
Samuel Tebbs [Tue, 30 Jun 2020 15:49:20 +0000 (16:49 +0100)]
[ARM] Allow rounding intrinsics to be tail predicated

This patch stops the trunc, rint, round, floor and ceil intrinsics from blocking tail predication.

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

4 years ago[CodeComplete] Tweak completion for else.
Nathan James [Tue, 30 Jun 2020 15:48:23 +0000 (16:48 +0100)]
[CodeComplete] Tweak completion for else.

If an `if` statement uses braces for its `then` block, suggest braces for the `else` and `else if` completion blocks, Otherwise don't suggest them.

Reviewed By: sammccall

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

4 years ago[clang-tidy] performance-faster-string-find string-view
Nathan James [Tue, 30 Jun 2020 15:45:58 +0000 (16:45 +0100)]
[clang-tidy] performance-faster-string-find string-view

Extend the default string like classes to include `std::basic_string_view`.

Reviewed By: aaron.ballman

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

4 years ago[Alignment][NFC] TargetLowering::allowsMemoryAccessForAlignment
Guillaume Chatelet [Tue, 30 Jun 2020 15:31:24 +0000 (15:31 +0000)]
[Alignment][NFC] TargetLowering::allowsMemoryAccessForAlignment

First 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/D81372

4 years ago[clang-tidy] Sanity checks in ClangTidyTest header.
Nathan James [Tue, 30 Jun 2020 15:19:14 +0000 (16:19 +0100)]
[clang-tidy] Sanity checks in ClangTidyTest header.

Motivated by a suspicously failing build, but also good to have anyway in general.

Reviewed By: aaron.ballman

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

4 years ago[libc++abi] Remove empty source file cxa_unexpected.cpp
Louis Dionne [Tue, 30 Jun 2020 15:18:02 +0000 (11:18 -0400)]
[libc++abi] Remove empty source file cxa_unexpected.cpp

4 years ago[lldb/Scripts]
Pavel Labath [Tue, 30 Jun 2020 15:05:08 +0000 (17:05 +0200)]
[lldb/Scripts]

Fix analyze-project-deps.py. "lldb/Plugins" (home of Plugins.def) does
not depend on anything. Make sure this does not crash the script.

4 years agoAdd Metadata to Transformer tooling
Andy Soffer [Tue, 30 Jun 2020 14:35:15 +0000 (14:35 +0000)]
Add Metadata to Transformer tooling

This change adds a Metadata field to ASTEdit, Edit, and AtomicChange so that
edits can have associated metadata and that metadata can be constructed with
Transformer-based RewriteRules. Metadata is ignored when applying edits to
source, but other consumers of AtomicChange can use this metadata to direct how
they want to consume each edit.

Reviewed By: ymandel, gribozavr2

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

4 years ago[NFC] Remove dead code
Guillaume Chatelet [Tue, 30 Jun 2020 14:46:56 +0000 (14:46 +0000)]
[NFC] Remove dead code

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

4 years ago[SystemZ] Simplify knownbits.ll test
Ulrich Weigand [Tue, 30 Jun 2020 14:29:25 +0000 (16:29 +0200)]
[SystemZ] Simplify knownbits.ll test

The knownbits.ll test case is somewhat fragile since:
- it relies on undef inputs; and
- it operates just at the limits of the MaxRecursionDepth

This means that optimization changes may easily cause the test
to spuriously fail.  Rewrite the test so it still validates
the same thing, but in a less fragile manner.

4 years ago[AST][RecoveryExpr] Avoid spurious 'missing typename' diagnostic when the NNS contain...
Haojian Wu [Tue, 30 Jun 2020 14:13:20 +0000 (16:13 +0200)]
[AST][RecoveryExpr] Avoid spurious 'missing typename' diagnostic when the NNS contains errors.

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

4 years ago[runtimes] Rename newformat to just format, now that the old format has been removed
Louis Dionne [Tue, 30 Jun 2020 14:10:30 +0000 (10:10 -0400)]
[runtimes] Rename newformat to just format, now that the old format has been removed

4 years ago[libc++] Remove dead code since the removal of the old testing format
Louis Dionne [Tue, 30 Jun 2020 14:03:28 +0000 (10:03 -0400)]
[libc++] Remove dead code since the removal of the old testing format

4 years ago[DWARFYAML][MachO] Remove endianness related tests.
Xing GUO [Tue, 30 Jun 2020 13:14:28 +0000 (21:14 +0800)]
[DWARFYAML][MachO] Remove endianness related tests.

fe08ab542bd6328a7906e38ae473cf655eb6a228 makes build bots unhappy
(http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/33624/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3ADWARF-debug_info.yaml).

This patch removes failed tests.

4 years ago[ASTMatcher] Fix a performance regression: memorize the child match.
Haojian Wu [Tue, 30 Jun 2020 13:42:03 +0000 (15:42 +0200)]
[ASTMatcher] Fix a performance regression: memorize the child match.

D80025 introduced a performance regression: in some cases, it makes
clang-tidy readability-container-size-empty ~80x slower (running on an internal
huge TU, before that patch 12s vs after 950s).

after this patch, we go back to 12s.

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

4 years ago[lldb/Test] Introduce "assertSuccess"
Pavel Labath [Mon, 29 Jun 2020 11:51:46 +0000 (13:51 +0200)]
[lldb/Test] Introduce "assertSuccess"

Summary:
A lot of our tests do 'self.assertTrue(error.Success()'. The problem
with that is that when this fails, it produces a completely useless
error message (False is not True) and the most important piece of
information -- the actual error message -- is completely hidden.

Sometimes we mitigate that by including the error message in the "msg"
argument, but this has two additional problems:
- as the msg argument is evaluated unconditionally, one needs to be
  careful to not trigger an exception when the operation was actually
  successful.
- it requires more typing, which means we often don't do it

assertSuccess solves these problems by taking the entire SBError object
as an argument. If the operation was unsuccessful, it can format a
reasonable error message itself. The function still accepts a "msg"
argument, which can include any additional context, but this context now
does not need to include the error message.

To demonstrate usage, I replace a number of existing assertTrue
assertions with the new function. As this process is not easily
automatable, I have just manually updated a representative sample. In
some cases, I did not update the code to use assertSuccess, but I went
for even higher-level assertion apis (runCmd, expect_expr), as these are
even shorter, and can produce even better failure messages.

Reviewers: teemperor, JDevlieghere

Subscribers: arphaman, lldb-commits

Tags: #lldb

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

4 years ago[X86][SSE] LowerVectorAllZero - add support for masked OR-reductions
Simon Pilgrim [Tue, 30 Jun 2020 13:09:23 +0000 (14:09 +0100)]
[X86][SSE] LowerVectorAllZero - add support for masked OR-reductions

If we're masking the result of an OR-reduction before comparing against zero, we can fold this into the PTEST() / MOVMSK(CMPEQ()) codegen by pre-masking the source value.

This works particularly well on PTEST which performs the AND as part of its operation, but the MOVMSK variant also benefits for non-V2I64 cases.

Fixes PR44781

4 years agoMake it possible for client code to consume CLANG_LINK_CLANG_DYLIB
serge-sans-paille [Tue, 30 Jun 2020 12:11:28 +0000 (14:11 +0200)]
Make it possible for client code to consume CLANG_LINK_CLANG_DYLIB

If a client code wants to consume clang libraries, it needs to know
CLANG_LINK_CLANG_DYLIB value in order to decide whether to use the DYLIB or
individual components.

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

4 years ago[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemcpy to Align
Guillaume Chatelet [Tue, 30 Jun 2020 13:12:31 +0000 (13:12 +0000)]
[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemcpy 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/D82849

4 years ago[clangd] Suppress GCC -Woverloaded-virtual by renaming ThreadsafeFS extension point
Sam McCall [Mon, 29 Jun 2020 17:52:09 +0000 (19:52 +0200)]
[clangd] Suppress GCC -Woverloaded-virtual by renaming ThreadsafeFS extension point

Summary:
By making all overloads non-virtual and delegating to a differently-named
private method, we avoid any (harmless) name-hiding in the subclasses.

Reviewers: kadircet

Subscribers: kristof.beyls, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits, Quuxplusone, dblaikie

Tags: #clang

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

4 years ago[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemmove to Align
Guillaume Chatelet [Tue, 30 Jun 2020 12:46:59 +0000 (12:46 +0000)]
[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemmove 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/D82850

4 years ago[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemset to Align
Guillaume Chatelet [Tue, 30 Jun 2020 12:46:05 +0000 (12:46 +0000)]
[Alignment][NFC] Migrate SelectionDAGTargetInfo::EmitTargetCodeForMemset 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/D82851

4 years ago[NFC][ARM] Tail predication reduction tests
Sam Parker [Tue, 30 Jun 2020 12:26:59 +0000 (13:26 +0100)]
[NFC][ARM] Tail predication reduction tests

4 years ago[PM] Fix new PM to perform SpeculativeExecution as in old PM
dfukalov [Mon, 29 Jun 2020 00:43:26 +0000 (03:43 +0300)]
[PM] Fix new PM to perform SpeculativeExecution as in old PM

Summary:
Old PM runs SpeculativeExecutionPass for targets that have divergent branches.
It uses `createSpeculativeExecutionIfHasBranchDivergencePass` that creates
the pass with `OnlyIfDivergentTarget=true`, whereas new PM just created the
pass with default `OnlyIfDivergentTarget=fase` so it unexpectedly runs and
causes buildbot test fails.

Reviewers: chandlerc, arsenm

Reviewed By: arsenm

Subscribers: wdng, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb] Fix TestModuleGetXcodeSDK test after DWARFYAML change
Raphael Isemann [Tue, 30 Jun 2020 12:05:10 +0000 (14:05 +0200)]
[lldb] Fix TestModuleGetXcodeSDK test after DWARFYAML change

D82622 / fe08ab542bd6328a7906e38ae473cf655eb6a228 changes the YAML format
so this test was failing as the test yaml wasn't updated.

4 years ago[X86] Add tests for cmp-zero + and/trunc + or-reduction patterns
Simon Pilgrim [Tue, 30 Jun 2020 11:37:55 +0000 (12:37 +0100)]
[X86] Add tests for cmp-zero + and/trunc + or-reduction patterns

Expanding off the original PR44781 test case, show the failure to fold cmp-all-zero patterns when a demanded bits limiting and/trunc is in the way.

4 years ago[lldb] Tab completion for `frame recognizer delete`
Gongyu Deng [Tue, 30 Jun 2020 11:14:46 +0000 (13:14 +0200)]
[lldb] Tab completion for `frame recognizer delete`

Summary: Provided tab completion for command `frame recognizer delete`.

Reviewers: teemperor, JDevlieghere

Reviewed By: teemperor, JDevlieghere

Tags: #lldb

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

4 years ago[AST] Fix handling of some edge cases in fixed-point division.
Bevin Hansson [Tue, 30 Jun 2020 11:35:29 +0000 (13:35 +0200)]
[AST] Fix handling of some edge cases in fixed-point division.

Division by zero was not being handled, and division of
-EPSILON / MAX did not perform rounding correctly.

4 years ago[lldb] Tab completion for `frame select`
Gongyu Deng [Tue, 30 Jun 2020 11:02:18 +0000 (13:02 +0200)]
[lldb] Tab completion for `frame select`

Summary: Provided the tab completion for command `frame select`.

Reviewers: teemperor, JDevlieghere

Reviewed By: teemperor

Tags: #lldb

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

4 years ago[lldb][NFC] Remove ImportInProgress lock in ClangASTSource
Raphael Isemann [Tue, 30 Jun 2020 10:06:04 +0000 (12:06 +0200)]
[lldb][NFC] Remove ImportInProgress lock in ClangASTSource

Summary:

The ClangASTSource has a lock that globally disables all lookups into the
external AST source when we explicitly "guarded" copy a type. It's not used for
anything else, so importing declarations or importing types that are
dependencies of a declaration actually won't activate that lock. The lookups it
is supposed to prevent also don't actually happen in our test suite. The check
in `ClangExpressionDeclMap::FindExternalVisibleDecls` is never executed and the
check in the `ClangASTSource::FindExternalVisibleDeclsByName` is only ever
reached by the `Import-std-module` tests (which explicitly do a lookup into the
expression context on purpose).

This lock was added in 6abfabff6158076eccdf6fcac5a12894039de2c9 as a replacement
for a list of types we already looked up which appeared to be an optimisation
strategy. I assume back then this lock had a purpose but these days the
ASTImporter and LLDB seem to be smart enough to avoid whatever lookups this
tried to prevent.

I would say we remove it from LLDB. The main reason is that it blocks D81561
(which explicitly does a specific lookup to resolve placeholder types produced
by `-flimit-debug-info`) but it's semantics are also very confusing. The naming
implies it's a flag to indicate when we import something at the moment which is
practically never true as described above. Also the fact that it makes our
ExternalASTSource alternate between doing lookups into the debug info and
pretending it doesn't know any external decls could really break our lookup in
some weird way if Clang decides to cache a fake empty lookup result that was
generated while the lock was active.

Reviewers: labath, shafik, JDevlieghere, aprantl

Reviewed By: labath, JDevlieghere, aprantl

Subscribers: aprantl, abidh

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

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<=>.