Commit Graph

395683 Commits

Author SHA1 Message Date
Jessica Paquette 5643736378 [AArch64][GlobalISel] Widen G_SELECT before clamping it
This allows us to handle the s88 G_SELECTS:

https://godbolt.org/z/5s18M4erY

Weird types like this can result in weird merges.

Widening to s128 first and then clamping down avoids that situation.

Differential Revision: https://reviews.llvm.org/D107415
2021-08-03 18:31:17 -07:00
Matthias Springer 767974f344 [mlir][scf] Fix bug in peelForLoop
Insertion point should be set before creating new operations.

Differential Revision: https://reviews.llvm.org/D107326
2021-08-04 10:20:46 +09:00
wlei f1affe8dc8 [llvm-profgen][CSSPGO] Support count based aggregated type of hybrid perf script
This change tried to integrate a new count based aggregated type of perf script. The only difference of the format is that an aggregated count is added at the head of the original sample which means the same samples are repeated to the given count times. This is used to reduce the perf script size.
e.g.
```
2
	          4005dc
	          400634
	          400684
	    7f68c5788793
 0x4005c8/0x4005dc/P/-/-/0  ....
```
Implemented by a dedicated PerfReader `AggregatedHybridPerfReader`.

Differential Revision: https://reviews.llvm.org/D107192
2021-08-03 17:56:35 -07:00
Rob Suderman 1b00b94ffc [mlir][tosa] Tosa shape propagation for tosa.cond_if
We can propagate the shape from tosa.cond_if operands into the true/false
regions then through the connected blocks. Then, using the tosa.yield ops
we can determine what all possible return types are.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D105940
2021-08-03 17:54:54 -07:00
Dan Liew b4121b335c [Compiler-rt] Fix running ASan/TSan unit tests under macOS 12.0.
On macOS the unit tests currently rely on libmalloc being used for
allocations (due to no functioning interceptors) but also having the
ASan/TSan allocator initialized in the same process.

This leads to crashes with the macOS 12.0 libmalloc nano allocator so
disable use of the allocator while running unit tests as a workaround.

rdar://80086125

Differential Revision: https://reviews.llvm.org/D107412
2021-08-03 17:46:27 -07:00
Rob Suderman 143edeca6d [mlir][tosa] Shape inference for a few remaining easy cases:
Handles shape inference for identity, cast, and rescale. These were missed
during the initialy elementwise work. This includes resize shape propagation
which includes both attribute and input type based propagation.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D105845
2021-08-03 17:20:32 -07:00
Shimin Cui 2d9759c790 [GlobalOpt] Fix the load types when OptimizeGlobalAddressOfMalloc
Currently, in OptimizeGlobalAddressOfMalloc, the transformation for global loads assumes that they have the same Type. With the support of ConstantExpr (https://reviews.llvm.org/D106589), this may not be true any more (as seen in the test case), and we miss the code to handle this, This is to fix that.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D107397
2021-08-03 19:22:53 -04:00
Michael Kruse ba2be8deba [clang/OpenMP][docs] Update OpenMP support list for unroll. 2021-08-03 18:11:17 -05:00
Aart Bik 75baf6285e [mlir][sparse] fixed doc formatting
Indentation seems to have an impact on website layout.

Reviewed By: grosul1

Differential Revision: https://reviews.llvm.org/D107403
2021-08-03 15:55:36 -07:00
Roman Lebedev cb2a2ba8d6
[NFC][Codegen][X86] Add test for parity-of-vector-of-bools (PR51312) 2021-08-04 01:49:28 +03:00
Roman Lebedev 0b094c06f4
[NFC][Codegen][SystemZ] Autogenerate checklines in int-cmp-47.ll 2021-08-04 01:47:39 +03:00
Craig Topper b818da27ab [SimplifyCFG] Enable switch to lookup table for more types.
This transform has been restricted to legal types since
https://reviews.llvm.org/rG65df808f6254617b9eee931d00e95d900610b660
in 2012.

This is particularly restrictive on RISCV64 which only has i64
as a legal integer type. i32 is a very common type in code
generated from C, but we won't form a lookup table with it.
This also effects other common types like i8/i16 types on ARM,
AArch64, RISCV, etc.

This patch proposes to allow power of 2 types larger than 8 bit, if
they will fit in the largest legal integer type in DataLayout.
These types are common in C code so generally well handled in
the backends.

We could probably do this for other types like i24 and rely on
alignment and padding to allow the backend to use a single wider
load. This isn't my main concern right now and it will need more
tests.

We could also allow larger types up to some limit and let the
backend split into multiple loads, but we need to define that
limit. It's also not my main concern right now.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D107233
2021-08-03 15:35:16 -07:00
Jeffrey Tan b9139acb85 Fix expression evaluation result expansion in lldb-vscode
VScode now sends a "scopes" DAP request immediately after any expression evaluation.
This scopes request would clear and invalidate any non-scoped expandable variables in g_vsc.variables, causing later "variables" request to return empty result.
The symptom is that any expandable variables in VScode watch window/debug console UI to return empty content.

This diff fixes this issue by only clearing the expandable variables at process continue time. To achieve this, we have to repopulate all scoped variables
during context switch for each "scopes" request without clearing global expandable variables.
So the PR puts the scoped variables into its own locals/globals/registers; and all expandable variables into separate "expandableVariables" list.
Also, instead of using the variable index for "variableReference", it generates a new variableReference id each time as the key of "expandableVariables".

As a further new feature, this PR adds a new "expandablePermanentVariables" which has the lifetime of debug session. Any expandable variables from debug console
are added into this list. This enables users to snapshot expanable old variable in debug console and compare with new variables if desire.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D105166
2021-08-03 15:24:44 -07:00
River Riddle b31827f664 [mlir-lsp-server] Disable multi-threading in LSP contexts
This prevents an explosion of threads, given that each file gets its own context and thus its own thread pool. We don't really need a thread pool for the LSP contexts anyways, so it's better to just disable threading.
2021-08-03 21:30:09 +00:00
Aart Bik 817303ef34 [mlir][sparse] fix bug in permuting data structure
Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D107379
2021-08-03 14:27:43 -07:00
Matheus Izvekov e64e6924b8 [clang] fix crash on template instantiation of invalid requires expressions
See PR48656.

The implementation of the template instantiation of requires expressions
was incorrectly trying to get the expression from an 'ExprRequirement'
before checking if it was an error state.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D107399
2021-08-03 23:16:04 +02:00
Evandro Menezes 63a5ac4e0d [RISCV] Add scheduling resources for V
Add the scheduling resources for the V extension instructions.

Differential Revision: https://reviews.llvm.org/D98002
2021-08-03 15:47:51 -05:00
Matheus Izvekov 219790c1f5 [clang] fix canonicalization of nested name specifiers
See PR47174.

When canonicalizing nested name specifiers of the type kind,
the prefix for 'DependentTemplateSpecialization' types was being
dropped, leading to malformed types which would cause failures
when rebuilding template names.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D107311
2021-08-03 22:39:48 +02:00
modimo f5b8a3125a [ThinLTO] Add TimeTrace for Thinlink step
Results from Clang self-build:

{F17435948}

Testing:
ninja check-all

Reviewed By: anton-afanasyev

Differential Revision: https://reviews.llvm.org/D104428
2021-08-03 13:20:04 -07:00
Alexey Bataev 871ea69803 [SLP]Do not emit extra shuffle for insertelements vectorization.
If the vectorized insertelements instructions form indentity subvector
(the subvector at the beginning of the long vector), it is just enough
to extend the vector itself, no need to generate inserting subvector
shuffle.

Differential Revision: https://reviews.llvm.org/D107344
2021-08-03 13:18:41 -07:00
Nico Weber bf3383501f [lldb] Get rid of HAVE_SYS_TYPES_H
LLVM includes this header unconditionally on all platforms
(including Windows), so this define should no longer be necessary.

No behavior change.

Differential Revision: https://reviews.llvm.org/D107338
2021-08-03 22:14:56 +02:00
Nico Weber 4367cbab4c [lldb] Move comment about noindex next to line it refers to
The comment was originally added in 34769d80d. Then D44526
removed the flag added there (but kept the comment), and then
D66966 reintroduced a .noindex dir (which D68606 and then 33fca97880
moved around a bit).

No behavior change.

Differential Revision: https://reviews.llvm.org/D107341
2021-08-03 22:14:12 +02:00
Douglas Chen 559d142331 [clang-tidy] Fix command line is too long issue which breaks test on Windows
This patch tries to fix command line too long problem on Windows for
https://reviews.llvm.org/D86671.

The command line is too long with check_clang_tidy.py program on Windows,
because the configuration is long for regression test. Fix this issue by
passing the settings in file instead.

Differential Revision: https://reviews.llvm.org/D107325
2021-08-03 22:12:46 +02:00
George Burgess IV 2e75986a21 bugprone-argument-comment: ignore mismatches from system headers
As of 2a3498e24f, we ignore parameter name mismatches for functions
in the `std::` namespace, since those aren't standardized. It seems
reasonable to extend this to all functions which are declared in system
headers, since this lint can be a bit noisy otherwise
(https://bugs.chromium.org/p/chromium/issues/detail?id=1191507).

Differential Revision: https://reviews.llvm.org/D99993
2021-08-03 19:56:27 +00:00
River Riddle 0d74bd332d [vscode-mlir] Add proper support for mlir markdown codeblocks
A special language contribution is required for properly
supporting markdown code blocks in vscodes builtin markdown
grammar, see https://github.com/mjbvz/vscode-fenced-code-block-grammar-injection-example
for more details.
2021-08-03 19:55:31 +00:00
Vitaly Buka 81b293ba36 [tests][sanitizers] Don't reflow comments
This lets us to apply ColumnLimit without breaking "RUN:" lines.
2021-08-03 12:54:00 -07:00
Alexey Bataev aa931744ef [SLP][NFC]Add tests for SLP vectorizer for crashes, found in new
reordering algorithm.
2021-08-03 12:44:12 -07:00
Kostya Serebryany ff163ef12b [libFuzzer] fix clang-tidy
[libFuzzer] fix clang-tidy

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D107382
2021-08-03 12:34:12 -07:00
Alexey Bataev 7d9d926a18 Revert "[SLP]Improve graph reordering."
This reverts commit e408d1dfab and
2 other (4b25c11321 and
c2deb2afaf) related to fix the problem with the
reordering shuffles.
2021-08-03 12:13:43 -07:00
Alex Langford d2b2ab4e1c [lldb] Further constrain a test that fails without python enabled
The test relies on the python embedded interpreter being available and
fails otherwise.
2021-08-03 11:50:36 -07:00
Sami Tolvanen 7ce1c4da77 ThinLTO: Fix inline assembly references to static functions with CFI
Create an internal alias with the original name for static functions
that are renamed in promoteInternals to avoid breaking inline
assembly references to them.

Relands 700d07f8ce with -msvc targets
fixed.

Link: https://github.com/ClangBuiltLinux/linux/issues/1354

Reviewed By: nickdesaulniers, pcc

Differential Revision: https://reviews.llvm.org/D104058
2021-08-03 11:35:30 -07:00
Kostya Serebryany 7c921753e0 [libFuzzer] replace Vector/Set with std::vector/std::set. The custom names are not required any more since we now build with a private version of libc++. Fix some of the 81+ character lines. Mechanical change, NFC expected.
[libFuzzer] replace Vector/Set with std::vector/std::set.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D107374
2021-08-03 11:31:04 -07:00
Dylan Fleming 3943a74666 [InstCombine] Fixed select + masked load fold failure
Fixed type assertion failure caused by trying to fold a masked load with a
select where the select condition is a scalar value

Reviewed By: sdesmalen, lebedev.ri

Differential Revision: https://reviews.llvm.org/D107372
2021-08-03 19:06:12 +01:00
Philip Reames 911991d20a [tests] Autogen an unroll test for ease of update 2021-08-03 11:05:07 -07:00
Jennifer Yu 656d022331 Stop emit incomplete type error for a variable in a map clause
where should not.

Currently we are using QTy->isIncompleteType(&ND) to check incomplete
type.  But before doing that, need to instantiate for a class template
specialization or a class member of a class template specialization,
or an array with known size of such..., so that we know it is really
incomplete type.

To fix this using RequireCompleteType instead.

The new test is added into "test/OpenMP/target_update_messages.cpp"

The different of using RequireCompleteType is when emit incomplete type,
an additional note is also emitted to point to where incomplete type
is declared.  Because this change, many tests are needed to be fixed
by adding additional note.

This is to fix https://bugs.llvm.org/show_bug.cgi?id=50508

Differential Revision: https://reviews.llvm.org/D107200
2021-08-03 10:51:32 -07:00
Vitaly Buka 033ca45d4f [llvm-readobj] Fix UB in pointer arithmetics after D105522 2021-08-03 10:38:29 -07:00
Simon Pilgrim 14b71efd97 [X86][AVX] Add some multiple/nested subvector insertion shuffle tests
As discussed on D107068 - see how well we merge INSERT_SUBVECTOR nodes and combine a shuffles using multiple ops in CONCAT_VECTORS nodes.
2021-08-03 18:32:30 +01:00
Philip Reames 223835f08b [runtimeunroll] A bit of style cleanup to simplify a following change [NFC]
Use for-range, use the idiomatic pattern for non-loop values, etc..
2021-08-03 10:28:46 -07:00
Ahmed Taei 53d6988171 Reorder mmt4d r.h.s operand layout
Switch r.h.s operand layout (n1, k1, n0, k0) -> (n1, k1, k0, n0)
which is more consistant with scalar-vector products vectorization
and elementates operand transpose.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D107307
2021-08-03 10:21:57 -07:00
Sumesh Udayakumaran 24b0df8686 [NFC][MLIR] Split large fusion test file into 4 test files
mlir/test/transforms/loop-fusion.mlir is too big and is split into mlir/test/transforms/loop-fusion.mlir,  mlir/test/transforms/loop-fusion-2.mlir, mlir/test/transforms/loop-fusion-3.mlir
and mlir/test/transforms/loop-fusion-4.mlir. Further tests can be added in mlir/test/transforms/loop-fusion-4.mlir

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D106473
2021-08-03 20:08:33 +03:00
wlei fe3ba90830 [llvm-profgen] Support perf script without parsing MMap events
This change supports to run without parsing MMap binary loading events instead it always assumes binary is loaded at the preferred address. This is used when we have assured no binary load address changes or we have pre-processed the addresses resolution. Warn if there's interior mmap event but without leading mmap events.

Reviewed By: hoy

Differential Revision: https://reviews.llvm.org/D107097
2021-08-03 10:01:07 -07:00
Cullen Rhodes 86e4d00593 [AArch64][SME] Fix out of date comment
Missed in 3a349d2269.
2021-08-03 16:46:51 +00:00
Dmitry Vyukov e34d1942a0 tsan: fix a typo in debug output
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D107368
2021-08-03 18:46:33 +02:00
Vitaly Buka 6538aa8ce9 [NFC][tsan] Rename _inl.h to .inc
Differential Revision: https://reviews.llvm.org/D107319
2021-08-03 09:35:33 -07:00
David Green bd07c2e266 [AArch64] Prefer fmov over orr v.16b when copying f32/f64
This changes the lowering of f32 and f64 COPY from a 128bit vector ORR to
a fmov of the appropriate type. At least on some CPU's with 64bit NEON
data paths this is expected to be faster, and shouldn't be slower on any
CPU that treats fmov as a register rename.

Differential Revision: https://reviews.llvm.org/D106365
2021-08-03 17:25:40 +01:00
Kazu Hirata eec96db184 [llvm] Fix header guards (NFC)
Identified with llvm-header-guard.
2021-08-03 09:16:15 -07:00
KareemErgawy-TomTom f984a805f3 [MLIR][Linalg] Extend detensoring control flow model.
This patch extends the PureControlFlowDetectionModel to consider
detensoring br and cond_br operands.

See: https://github.com/google/iree/issues/1159#issuecomment-884322687,
for a disccusion on the need for such extension.

Reviewed By: silvas

Differential Revision: https://reviews.llvm.org/D107358
2021-08-03 18:08:13 +02:00
Andrea Di Biagio f0658c7a42 [MCA][NFC] Add tests for PR51318 and PR51322.
Also, regenerate existing X86 tests using update_mca_test.py.
2021-08-03 17:06:34 +01:00
Fangrui Song 44361e5b90 [ELF] Add --export-dynamic-symbol-list
This is available in GNU ld 2.35 and can be seen as a shortcut for multiple
--export-dynamic-symbol, or a --dynamic-list variant without the symbolic intention.

In the long term, this option probably should be preferred over --dynamic-list.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D107317
2021-08-03 09:01:03 -07:00
Florian Hahn ccf1038a92
[VectorCombine] Add tests where the index is guaranteed non-poison.
Tests for PR50949.
2021-08-03 16:42:30 +01:00