Commit Graph

371705 Commits

Author SHA1 Message Date
Nathan James e076fee63d
[clang-tidy][NFC] Tweak GlobList to iterate backwards
By iterating backwards over the globs we can exit the loop as soon as we find a match.

While we're here:
 - Regex doesn't need to be mutable.
 - We can reserve the amount of Globs needed ahead of time.
 - Using a SmallVector with size 0 is slightly more space efficient than a std::vector.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D91033
2020-11-10 14:27:24 +00:00
Raphael Isemann c50faf5c9d [lldb] Fix TestErrorMessages test on standalone builds by adding lldb-server substitution
It seems that TestErrorMessages.test is failing on the standalone + Xcode builds
as lldb-server executable can't be found by lit's default PATH search. I assume
invoking lldb-server via a lit substitution gets this working again as
everything else is working, so that's what this patch is doing.

I had to add the lldb-server substitution as the test seems lldb-server specific
and we don't want it to default to debugserver on Darwin.

Using a substitution also seems in general like a good idea so that the commands
lit is printing on failure are using the full path to lldb-server and can be
re-run in a terminal.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D91155
2020-11-10 15:26:19 +01:00
Sanjay Patel f7eac51b9b [CostModel] remove cost-kind predicate for intrinsics in basic TTI implementation
This is the last step in removing cost-kind as a consideration in the basic class model for intrinsics.
See D89461 for the start of that.
Subsequent commits dealt with each of the special-case intrinsics that had customization here in the
basic class. This should remove a barrier to retrying
D87188 (canonicalization to the abs intrinsic).

The ARM and x86 cost diffs seen here may be wrong because the target-specific overrides have their own
bugs, but we hope this is less wrong - if something has a significant throughput cost, then it should
have a significant size / blended cost too by default.

The only behavioral diff in current regression tests is shown in the x86 scatter-gather test (which is
misplaced or broken because it runs the entire -O3 pipeline) - we unrolled less, and we assume that is
a improvement.

Differential Revision: https://reviews.llvm.org/D90554
2020-11-10 08:19:31 -05:00
Michał Górny 4c54399b7e [lldb] [Process/FreeBSDRemote] Explicitly copy dbregs to new threads
Explicitly copy dbregs to new threads to ensure that watchpoints
are propagated properly.  Fixes the test failure due to apparent kernel
race between reporting a new thread and resuming main thread execution
that makes implicit inheritance of dbregs unreliable.  By copying them
explicitly, we ensure that the new thread correctly respects watchpoints
that were set after the thread was created but before it was reported.

The code is copied from the NetBSD plugin and modernized to use
llvm::Error.

Differential Revision: https://reviews.llvm.org/D91032
2020-11-10 14:18:03 +01:00
Michał Górny 194c5accb2 [lldb] [Process/FreeBSDRemote] Correct DS/ES/FS/GS register sizes
Fix DS/ES/FS/GS register sizes in getter/setter for FreeBSD.  Apparently
only CS and SS registers are specified as 64/32-bit in LLDB, while
the others are specified as 16-bit.  This fixes the failing
StandardStartupTest.TestStopReplyContainsThreadPcs lldb-server unittest.

Differential Revision: https://reviews.llvm.org/D91076
2020-11-10 14:18:03 +01:00
Michał Górny e637602e7a [lldb] [Process/FreeBSDRemote] Fix handling user-generated SIGTRAP
Update the SIGTRAP handler to account for the possibility of SIGTRAP
being generated by the user, i.e. not having any specific debugging
event associated with it, as well as receiving unknown SIGTRAPs.  These
instances of SIGTRAP are passed to the regular signal handler.

Differential Revision: https://reviews.llvm.org/D91007
2020-11-10 14:18:03 +01:00
Simon Pilgrim a56c795266 [MC][Disassembler][AMDGPU] Remove unused check prefix 2020-11-10 13:10:12 +00:00
Simon Pilgrim ef15580627 [MC][MIPS] Remove unused check prefixes 2020-11-10 13:10:12 +00:00
Simon Pilgrim 20bbe14ac8 [CostModel][ARM] Remove unused check-prefix 2020-11-10 13:10:12 +00:00
Simon Pilgrim bd2c0e2c9f [CostModel][AArch64] Remove unused check-prefix 2020-11-10 13:10:11 +00:00
Kazushi (Jam) Marukawa 543b30db06 [VE][NFC] Change cast to dyn_cast
We used cast where we should use dyn_cast.  So, change it this time.
Old code cause problems if I implement brind instruction and compile
openmp using new compiler.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D91151
2020-11-10 21:49:16 +09:00
Simon Pilgrim fe9403df06 [CostModel][X86] Remove unused check-prefixes 2020-11-10 12:48:35 +00:00
Wang, Pengfei a6428fcd32 [CodeGen][X86] Remove unused check-prefixes from more avx512 tests. NFCI. 2020-11-10 20:43:03 +08:00
Pablo Barrio 642b21beba [AArch64] Enable RAS 1.1 system registers in all AArch64
Some use cases (e.g. kernel devs) have strict requirements to only enable
features available with -march=armv8-a, e.g. no armv8.1-a. Enabling RAS 1.1 in
all AArch64 means they can consider to support it.

Bear in mind that the first versions of the Armv8 architecture still do not
support RAS 1.1. This patch only lets devs write code with the user-friendly
register mnemonic instead of the ugly generic S<op0>_<op1>_<Cn>_<Cm>_<op2>.
They still need to place runtime checks to make sure that the CPU to run on
supports RAS 1.1.

Differential Revision: https://reviews.llvm.org/D90594
2020-11-10 12:13:33 +00:00
Haojian Wu a97d7b9159 Fix the buildbot failure.
Looks like we hit a bug in iterator of DeclContextLookupResult, workaround
by a forloop.

http://45.33.8.238/win/27605/step_4.txt
2020-11-10 13:11:54 +01:00
Kirill Bobyrev 47fcf233ce
[clangd] Fix recommended gRPC version
Typo: 1.32.2 does not exist, it should be 1.33.2 https://github.com/grpc/grpc/releases/tag/v1.33.2
2020-11-10 15:07:03 +03:00
Sanne Wouda dd03881bd5 Add loop distribution to the LTO pipeline
The LoopDistribute pass is missing from the LTO pipeline, so
-enable-loop-distribute has no effect during post-link. The pre-link
loop distribution doesn't seem to survive the LTO pipeline either.

With this patch (and -flto -mllvm -enable-loop-distribute) we see a 43%
uplift on SPEC 2006 hmmer for AArch64. The rest of SPECINT 2006 is
unaffected.

Differential Revision: https://reviews.llvm.org/D89896
2020-11-10 12:04:32 +00:00
Wang, Pengfei bd01a66675 [CodeGen][X86] Remove unused check-prefixes from some avx512 tests. NFCI. 2020-11-10 20:03:43 +08:00
Kazushi (Jam) Marukawa c84b2c49be [VE] Support inline assembly with vector regsiters
Support inline assembly with vector registers.  Add a regression test also.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D91146
2020-11-10 20:55:38 +09:00
Sander de Smalen f47573f9bf [LoopVectorizer] NFC: Propagate ElementCount to more interfaces.
Interfaces changed to take `ElementCount` as parameters:
* LoopVectorizationPlanner::buildVPlans
* LoopVectorizationPlanner::buildVPlansWithVPRecipes
* LoopVectorizationCostModel::selectVectorizationFactor

This patch is NFC for fixed-width vectors.

Reviewed By: dmgreen, ctetreau

Differential Revision: https://reviews.llvm.org/D90879
2020-11-10 11:11:02 +00:00
Michał Górny 311cca8bbf [lldb] [test] Rename '.categories' to 'categories'
Make category-specifying files visible.  There is really no good reason
to keep them hidden, and having them visible increases the chances
that someone will actually spot them.

Differential Revision: https://reviews.llvm.org/D91065
2020-11-10 12:02:38 +01:00
Michał Górny a852cf66ea [lldb] [test] Skip ObjC-based tests via 'objc' category
Replace the plethora of ObjC-implied 'skipUnlessDarwin' decorators
with marking tests as 'objc' category (whenever missing), and skip all
ObjC tests on non-Darwin platforms.  I have used '.categories' file
wherever it was present already or all (>1) tests were relying on ObjC,
and explicit add_test_categories() where there was only one test.

Differential Revision: https://reviews.llvm.org/D91056
2020-11-10 12:02:38 +01:00
Joe Ellis 462dd4f803 [SVE][AArch64] Improve specificity of vectorization legality TypeSize test
The test was using -O2, where -loop-vectorize will suffice.

Reviewed By: fpetrogalli

Differential Revision: https://reviews.llvm.org/D90685
2020-11-10 10:55:25 +00:00
Simon Pilgrim a45a903a21 [X86] Remove unused check-prefixes from some vector tests 2020-11-10 10:48:48 +00:00
Simon Pilgrim defc59734a Add a llvm_unreachable to fix MSVC unhandled enum warning. NFCI. 2020-11-10 10:43:45 +00:00
Stefan Gränitz 203b4774b8 [lldb][ObjectFile] Relocate sections for in-memory objects (e.g. received via JITLoaderGDB)
Part 2 of a fix for JITed code debugging. This has been a regression from 5.0 to 6.0 and it's still reproducible on current master: https://bugs.llvm.org/show_bug.cgi?id=36209 Part 1 was D61611 a while ago.

The in-memory object files we obtain from JITLoaderGDB are not yet relocated. It looks like this used to happen on the LLDB side and my guess is that it broke with D38142. (However, it's hard to tell because the whole thing was broken already due to the bug in part 1.) The patch moved relocation resolution to a later point in time and didn't apply it to in-memory objects. I am not aware of any reason why we wouldn't resolve relocations per-se, so I made it unconditional here. On Debian, it fixes the bug for me and all tests in `check-lldb` are still fine.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D90769
2020-11-10 11:37:53 +01:00
Mirko Brkusanin a75d6178b8 [GlobalISel] Add combine for (x | mask) -> x when (x | mask) == x
If we have a mask, and a value x, where (x | mask) == x, we can drop the OR
and just use x.

Differential Revision: https://reviews.llvm.org/D90952
2020-11-10 11:32:13 +01:00
Mirko Brkusanin fb36ab0a42 [GlobalISel] Expand combine for (x & mask) -> x when (x & mask) == x
We can use KnownBitsAnalysis to cover cases when mask is not trivial. It can
also help with cases when mask is not constant but can still be folded into
one. Since 'and' is comutative we should treat both operands as possible
replacements.

Differential Revision: https://reviews.llvm.org/D90674
2020-11-10 11:32:13 +01:00
Mirko Brkusanin 53ae95c946 [AMDGPU][GlobalISel] Combine shift + logic + shift with constant operands
This sequence of instructions can be simplified if they are single use and
some operands are constants. Additional combines may be applied afterwards.

Differential Revision: https://reviews.llvm.org/D90223
2020-11-10 11:32:13 +01:00
Mirko Brkusanin de719586a8 [AMDGPU][GlobalISel] Fold a chain of two shift instructions with constant operands
Sequence of same shift instructions with constant operands can be combined into
a single shift instruction.

Differential Revision: https://reviews.llvm.org/D90217
2020-11-10 11:32:12 +01:00
James Henderson d2f7f775ca [lld][ELF][test] Add additional --symbol-ordering-file testing
This covers a few cases that aren't otherwise tested:
1) Non-ascii symbol names are ordered.
2) Comments, whitespace and blank lines are trimmed.
3) Missing order files result in an error.

Reviewed by: MaskRay, grimar

Differential Revision: https://reviews.llvm.org/D90933
2020-11-10 10:28:47 +00:00
James Henderson 439341b9bf [lld][ELF] Add additional time trace categories
I noticed when running a large link with the --time-trace option that
there were several areas which were missing any specific time trace
categories (aside from the generic link/ExecuteLinker categories). This
patch adds new categories to fill most of the "gaps", or to provide more
detail than was previously provided.

Reviewed by: MaskRay, grimar, russell.gallop

Differential Revision: https://reviews.llvm.org/D90686
2020-11-10 10:28:46 +00:00
Alex Zinenko fd407e1f1e [mlir] ODS-backed python binding generator for custom op classes
Introduce an ODS/Tablegen backend producing Op wrappers for Python bindings
based on the ODS operation definition. Usage:

  mlir-tblgen -gen-python-op-bindings -Iinclude <path/to/Ops.td> \
              -bind-dialect=<dialect-name>

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D90960
2020-11-10 10:58:29 +01:00
Kazushi (Jam) Marukawa b65ef65b22 [VE] Support inline assembly
Support inline assembly with scalar registers.  Add a regression test also.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D91119
2020-11-10 18:56:22 +09:00
Alex Zinenko 6c7e6b2c9a [mlir] Support slicing for operands in results in Python bindings
Slicing, that is element access with `[being🔚step]` structure, is
a common Python idiom for sequence-like containers. It is also necessary
to support custom accessor for operations with variadic operands and
results (an operation an return a slice of its operands that correspond
to the given variadic group).

Add generic utility to support slicing in Python bindings and use it
for operation operands and results.

Depends On D90923

Reviewed By: stellaraccident, mehdi_amini

Differential Revision: https://reviews.llvm.org/D90936
2020-11-10 10:46:21 +01:00
Haojian Wu 71064b0270 [clangd] Bump index version number.
https://reviews.llvm.org/D89670 changed the Ref structure, we need to
bump the version to invalidate all stored stale data, otherwise we will
get ` Error while reading shard: malformed or truncated refs` when
building the background index.

Differential Revision: https://reviews.llvm.org/D91131
2020-11-10 10:31:59 +01:00
Kirill Bobyrev 085f900830 [clangd] Update remote index documentation
* Even though remote index is still somewhat experimental, it can now be
  used withing clangd itself: this should be the primary way of trying
  it out
* Remove `protobuf-compiler` from list of needed Debian packages as it
  `protobuf-compiler-grpc` already depends on it
* Bump recommended gRPC version to 1.32.3
2020-11-10 10:18:38 +01:00
Jay Foad 0ad4d04002 [AMDGPU] Remove an unused return value. NFC.
Differential Revision: https://reviews.llvm.org/D91063
2020-11-10 09:15:14 +00:00
Kirill Bobyrev ca892f46fe
[clangd] Enhance Clangd rename testing coverage
We plan to eliminate error-prone and obsolete Clang-Rename API from Clangd. To
do that, we will introduce Decl canonicalization rules that will make renaming
code simpler and easier to maintain (D71880).

To ensure smooth transition to the new implementation, many Clang-Rename tests
will be adopted in Clangd to prevent any possible regressions. This patch is
the first in the chain of test migration patches. It improves existing tests
and adopts tests from Clang-Rename's alias, class and enum testing files.

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D91102
2020-11-10 10:08:49 +01:00
Wang, Pengfei 97fbc785f9 [CodeGen][X86] Remove unused check-prefixes. NFCI. 2020-11-10 16:50:28 +08:00
Artur Bialas 3035e676a3 [mlir][spirv] Add VectorInsertDynamicOp and vector.insertelement lowering
VectorInsertDynamicOp in SPIRV dialect
conversion from vector.insertelement to spirv VectorInsertDynamicOp

Differential Revision: https://reviews.llvm.org/D90927
2020-11-10 09:49:12 +01:00
Martin Storsjö 539ce1d288 [libcxx] [test] Simplify the fs helper header for posix cases. NFC.
Differential Revision: https://reviews.llvm.org/D91073
2020-11-10 10:39:15 +02:00
Martin Storsjö c41bda7f5f [libcxx] [test] Call create_directory_symlink where relevant
Differential Revision: https://reviews.llvm.org/D91072
2020-11-10 10:39:15 +02:00
Martin Storsjö 8f5f6ee27e [libcxx] [test] Make a separate create_directory_symlink helper
This more closely mirrors the public API, instead of using an
obscure bool parameter.

Differential Revision: https://reviews.llvm.org/D91071
2020-11-10 10:39:15 +02:00
Martin Probst 16212b8b3e clang-format: [JS] support new assignment operators.
Before:

    a && = b;

After:

    a &&= b;

These operators are new additions in ES2021.

Differential Revision: https://reviews.llvm.org/D91132
2020-11-10 09:26:46 +01:00
Max Kazantsev 25755a0159 [NFC] Add flag to disable IV widening in indvar instance
This allows us to have control over IV widening in the pipeline.
2020-11-10 15:10:44 +07:00
Haojian Wu daa736da10 [clangd] Add basic conflict detection for the rename.
With this patch, we reject the rename if the new name would conflict with
any other decls in the decl context of the renamed decl.

Differential Revision: https://reviews.llvm.org/D89790
2020-11-10 08:52:30 +01:00
David Blaikie 724877e219 Roll otherwise-unused variable into assert 2020-11-09 23:27:47 -08:00
Esme-Yi 6e0ad5bc8c [PowerPC] Add an ISEL pattern for Mul with Imm.
Summary: This patch try to do the following transformation if the multiplier doen't fit int16:
			(mul X, c1 << c2) -> (rldicr (mulli X, c1) c2)

Reviewed By: jsji, steven.zhang

Differential Revision: https://reviews.llvm.org/D87384
2020-11-10 06:52:39 +00:00
Max Kazantsev 3ec69c16c3 [NFC] Different way of getting step 2020-11-10 13:48:02 +07:00