Shao-Ce Sun [Mon, 13 Sep 2021 10:28:10 +0000 (18:28 +0800)]
[RISCV] add Half-precision test for vle/vse
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D109681
LLVM GN Syncbot [Tue, 14 Sep 2021 00:27:49 +0000 (00:27 +0000)]
[gn build] Port
2c8e78491588
Lang Hames [Mon, 13 Sep 2021 23:21:39 +0000 (09:21 +1000)]
[ORC] Fix self-assignment.
We want to read the page size from EPI->PageSize. Thanks to Simon Pilgrim for
spotting this.
Lang Hames [Mon, 13 Sep 2021 03:45:31 +0000 (13:45 +1000)]
[ORC] Add Shared/OrcRTBridge, and TargetProcess/OrcRTBootstrap.
This is a small first step towards reorganization of the ORC libraries:
Declarations for types and function names (as strings) to be found in the
"ORC runtime bootstrap" set are moved into OrcRTBridge.h / OrcRTBridge.cpp.
The current implementation of the "ORC runtime bootstrap" functions is moved
into OrcRTBootstrap.h and OrcRTBootstrap.cpp. It is likely that this code will
eventually be moved into ORT-RT proper (in compiler RT).
The immediate goal of this change is to make these bootstrap functions usable
for clients other than SimpleRemoteEPC/SimpleRemoteEPCServer. The first planned
client is a new RuntimeDyld::MemoryManager that will run over EPC, which will
allow us to remove the old OrcRemoteTarget code.
Brendon Cahoon [Tue, 14 Sep 2021 00:04:00 +0000 (19:04 -0500)]
[Hexagon] Use getTypeAllocSize to compute difference between objects
The code was using getTypeStoreSize to calculate the difference
between consecutive objects. The calculation was incorrect due
to padding that is added between consecutive objects. The
getTypeAllocSize includes the padding amount. For example,
if the type is [19 x i8], the difference between consecutive
objects is 32 bytes, not 19 bytes.
A second case for getTypeAllocSize is needed when computing
the pointer values for the vector accesses. The calculation needs
to account for the padding as well.
Differential Revision: https://reviews.llvm.org/D109403
Ankit Aggarwal [Mon, 13 Sep 2021 23:52:09 +0000 (18:52 -0500)]
[Hexagon] Handle bitcast of i64/i128 -> v64i1/v128i1
Nico Weber [Mon, 13 Sep 2021 23:03:33 +0000 (19:03 -0400)]
[clang] Revert gcc-driver part of
648feabc65d8
See discussion on https://reviews.llvm.org/D109624
Arthur Eubanks [Sun, 12 Sep 2021 21:39:49 +0000 (14:39 -0700)]
[opt] Remove some legacy PM flags
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D109664
Kuba Mracek [Mon, 13 Sep 2021 21:44:49 +0000 (14:44 -0700)]
[GlobalDCE] In VFE support for relative pointers, allow GEP references to the base symbol
This is for Swift VFE support. In some vtable forms that Swift emits, the "base" of a relative pointer is not the global symbol itself directly, but a GEP into it -- so the pointer is relative to a particular field in the global. So getPointerAtOffset() needs to be able to see through the GEP and allow it in a SUB expression, to correctly recognize the offset as a vtable slot.
Differential Revision: https://reviews.llvm.org/D109169
Thomas Lively [Mon, 13 Sep 2021 22:03:50 +0000 (15:03 -0700)]
[lld][WebAssembly] Relax limitations on multithreaded instantiation
For multithreaded modules (i.e. modules with a shared memory), lld injects a
synthetic Wasm start function that is automatically called during instantiation
to initialize memory from passive data segments. Even though the module will be
instantiated separately on each thread, memory initialization should happen only
once. Furthermore, memory initialization should be finished by the time each
thread finishes instantiation. Since multiple threads may be instantiating their
modules at the same time, the synthetic function must synchronize them.
The current synchronization tries to atomically increment a flag from 0 to 1 in
memory then enters one of two cases. First, if the increment was successful, the
current thread is responsible for initializing memory. It does so, increments
the flag to 2 to signify that memory has been initialized, then notifies all
threads waiting on the flag. Otherwise, the thread atomically waits on the flag
with an expected value of 1 until memory has been initialized. Either the
initializer thread finishes initializing memory (i.e. sets the flag to 2) first
and the waiter threads do not end up blocking, or the waiter threads succesfully
start waiting before memory is initialized so they will be woken by the
initializer thread once it has finished.
One complication with this scheme is that there are various contexts on the Web,
most notably on the main browser thread, that cannot successfully execute a
wait. Executing a wait in these contexts causes a trap, and in this case would
cause instantiation to fail. The embedder must therefore ensure that these
contexts win the race and become responsible for initializing memory, since that
is the only code path that does not execute a wait.
Unfortunately, since only one thread can win the race and initialize memory,
this scheme makes it impossible to have multiple threads in contexts that cannot
wait. For example, it is not currently possible to instantiate the module on
both the main browser thread as well as in an AudioWorklet. To loosen this
restriction, this commit inserts an extra check so that the wait will not be
executed at all when memory has already been initialized, i.e. when the flag
value is 2. After this change, the module can be instantiated on threads in
non-waiting contexts as long as the embedder can guarantee either that the
thread will win the race and initialize memory (as before) or that memory has
already been initialized when instantiation begins. Threads in contexts that can
wait can continue racing to initialize memory.
Fixes (or at least improves) PR51702.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D109722
Jian Cai [Mon, 13 Sep 2021 20:42:24 +0000 (13:42 -0700)]
[mlir][doc] fix typos.
Also wrap some function/class names in backticks.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D109723
Heejin Ahn [Mon, 13 Sep 2021 00:05:50 +0000 (17:05 -0700)]
[WebAssembly] Handle _setjmp and _longjmp in SjLj
In some platforms `_setjmp` and `_longjmp` are used instead of `setjmp`
and `longjmp`. This CL adds support for them.
Fixes https://github.com/emscripten-core/emscripten/issues/14999.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D109669
Heejin Ahn [Sun, 12 Sep 2021 06:05:06 +0000 (23:05 -0700)]
[WebAssembly] Rethrow longjmp in EH handling if EmSjLj is enabled
This is a fix on top of D106525's Case 2. In D106525, in
`runEHOnFunction` which handles Emscripten EH, We rethrow `longjmp` only
when the module has any usage of `setjmp` or `longjmp`. But now Wasm
object files are linked using wasm-ld, the module this pass sees is not
the whole program, and even if this module does not contain any
`longjmp`, another file can contain it and can be linked with the
current module. This enables the rethrowing of longjmp whenever
Emscripten SjLj is enabled, regardless of whether it is used in this
module or not.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D109670
Geoffrey Martin-Noble [Mon, 13 Sep 2021 20:24:31 +0000 (13:24 -0700)]
[Bazel][mlir] Simplify test/BUILD.bazel with globs
This reduces the maintenance burden by using globs, which is the
tradeoff we make in the other LLVM Bazel build files as well.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D109720
Fangrui Song [Mon, 13 Sep 2021 20:40:37 +0000 (13:40 -0700)]
[lldb] Actually fix format specifier after D108233
And revert
c4fa2c8aa493e4c786446739ba3eb0eb4918d579
Fangrui Song [Mon, 13 Sep 2021 20:17:55 +0000 (13:17 -0700)]
[ClangScanDeps][test] Add -fmodules-cache-path=DIR/cache to make diagnostics.c hermetic
Otherwise it may access sys::path::cache_directory/clang/ModuleCache which may not be writable.
David Carlier [Mon, 13 Sep 2021 20:15:07 +0000 (21:15 +0100)]
[Sanitizers] intercept accept4 on freebsd
Florian Mayer [Mon, 13 Sep 2021 09:01:55 +0000 (10:01 +0100)]
[value-tracking] see through returned attribute.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D109675
Florian Mayer [Fri, 3 Sep 2021 11:58:58 +0000 (12:58 +0100)]
[hwasan] Respect returns attribute when tracking values.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D109233
Arnamoy Bhattacharyya [Mon, 13 Sep 2021 16:29:22 +0000 (12:29 -0400)]
[flang][OpenMP] Add parsing support for nontemporal clause.
This patch adds parsing support for the nontemporal clause. Also adds a couple of test cases.
Reviewed By: clementval
Differential Revision: https://reviews.llvm.org/D106896
Fehr Mathieu [Mon, 13 Sep 2021 18:15:13 +0000 (18:15 +0000)]
[ADT] Extend EnableIfCallable for callables with incomplete returns
std::is_convertible has no defined behavior when its arguments
are incomplete, even if they are equal. In practice, it returns false.
Adding std::is_same allows us to use the constructor using a callable,
even if the return value is incomplete. We also check the case where
we convert a T into a const T.
Reviewed By: DaniilSuchkov
Differential Revision: https://reviews.llvm.org/D104703
Committer: Daniil Suchkov <dsuchkov@azul.com>
Benoit Jacob [Mon, 13 Sep 2021 19:08:54 +0000 (12:08 -0700)]
Reorder mmt4d shapes:
* Revert https://reviews.llvm.org/D107307 so that both LHS and RHS have
the same layout with K0 as the innermost dimension.
* Continuing from https://reviews.llvm.org/D107003, move also 'K'
to the outer side, so that now the inter-tile dimensions as all outer,
and the intra-tile dimensions are all inner.
Reviewed By: asaadaldien
Differential Revision: https://reviews.llvm.org/D109692
David Carlier [Mon, 13 Sep 2021 17:42:43 +0000 (18:42 +0100)]
[Sanitizers] intercept getgrouplist on Linux and FreeBSD.
Reviewed By: vitalyb
Differential Revision: https://reviews.llvm.org/D109641
Alex Langford [Mon, 13 Sep 2021 17:34:31 +0000 (10:34 -0700)]
[lldb] Fix warning in MinidumpFileBuilder.cpp
Fixes the following warning:
$llvm_project/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp:744:11: warning:
format specifies type 'long' but the argument has type 'lldb::offset_t' (aka 'unsigned long long') [-Wformat]
m_data.GetByteSize());
^~~~~~~~~~~~~~~~~~~~
Jon Chesterfield [Mon, 13 Sep 2021 17:01:07 +0000 (18:01 +0100)]
[openmp] Apply test change from D109500
Jon Chesterfield [Mon, 13 Sep 2021 17:00:15 +0000 (18:00 +0100)]
[openmp] Apply code change from D109500
Jon Chesterfield [Mon, 13 Sep 2021 16:58:33 +0000 (17:58 +0100)]
Revert "[openmp] Fix 51647, corrupt bitcode on amdgpu"
This reverts commit
d5c049a3f68791490e8c87d9974e9831ede0ada0.
Going to re-commit it in pieces for easier application to 13
Philip Reames [Mon, 13 Sep 2021 17:11:18 +0000 (10:11 -0700)]
Revert "[IndVars] Replace PHIs if loop exits on 1st iteration"
This reverts commit
5a6dfb27ca7424f15a20f9bb7ec90d858865faa3. See original review for why.
Philip Reames [Mon, 13 Sep 2021 17:10:49 +0000 (10:10 -0700)]
Revert "[IndVars] Break backedge and replace PHIs if loop exits on 1st iteration"
This reverts commit
d9ca444835e67960df927d5b8cade57776fdd8cb. See review for why.
Nico Weber [Mon, 13 Sep 2021 16:50:30 +0000 (12:50 -0400)]
[gn build] Fix typos in config visibility lists
GN https://gn-review.googlesource.com/c/gn/+/12140 identified these
typos. Fix them.
No effective behavior change.
vnalamot [Mon, 13 Sep 2021 15:21:17 +0000 (20:51 +0530)]
[RegScavenger][NFC] Refer to the already initialized local variable for spill slot index
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D109501
Nicolas Vasilache [Mon, 13 Sep 2021 12:39:29 +0000 (12:39 +0000)]
[mlir][Linalg] Insert static buffers as high as possible during ComprehensiveBufferization.
This revision allows hoisting static alloc/dealloc pairs as high as possible during ComprehensiveBufferization.
This also aligns such allocated buffers to 128B by default.
This change exhibited some issues wrt insertion points and a missing copy that are also fixed in this revision; tests are updated accordingly.
Differential Revision: https://reviews.llvm.org/D109684
Kazu Hirata [Mon, 13 Sep 2021 15:57:23 +0000 (08:57 -0700)]
[Utils] Use make_early_inc_range (NFC)
Simon Camphausen [Mon, 13 Sep 2021 14:57:09 +0000 (16:57 +0200)]
[mlir][emitc] Print signed integers properly
Previously negative integers were printed as large unsigned values.
Reviewed By: marbre
Differential Revision: https://reviews.llvm.org/D109690
Simon Pilgrim [Mon, 13 Sep 2021 15:26:57 +0000 (16:26 +0100)]
[APInt] Add APIntOps::ScaleBitMask helper
APInt is used to describe a bit mask in a variety of value tracking and demanded bits/elts functions.
When traversing through dst/src operands, we have a number of places where these masks need to widened/narrowed to translate through bitcasts, reductions etc. to a different type.
This patch add a APIntOps::ScaleBitMask common helper, adds unit test coverage, and updates a number of cases to use the the helper instead of their own implementation.
This came up on D109065 where we currently have to add yet another implementation of the same code.
Differential Revision: https://reviews.llvm.org/D109683
vnalamot [Mon, 13 Sep 2021 15:16:42 +0000 (20:46 +0530)]
[SelectionDAG][NFC] Fix typo in VerifyDAGDiverence() function name
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D109674
Jonas Paulsson [Mon, 13 Sep 2021 14:44:49 +0000 (16:44 +0200)]
[MLIR] Mark test case XFAIL on SystemZ for now.
mlir-cpu-runner/math_polynomial_approx.mlir
This test case is currently failing on SystemZ, but it does not appear to
necessarily be a target specific problem. See discussion at
https://bugs.llvm.org/show_bug.cgi?id=51204.
Guillaume Chatelet [Mon, 13 Sep 2021 14:32:08 +0000 (14:32 +0000)]
Revert "[libc] Some clean work with memmove."
This reverts commit
b659b789c03ac339e28d7b91406b67bb887a426d.
dpalermo [Mon, 13 Sep 2021 14:21:21 +0000 (15:21 +0100)]
[openmp] Fix 51647, corrupt bitcode on amdgpu
Patch by @dpalermo
The corrupt bitcode reported in https://bugs.llvm.org/show_bug.cgi?id=51647 seems to be a result of a later pass changing the workfn variable to addrspace(5) (thread private, on the stack). That seems reasonable for an alloca without an address space so it's an open question why that can crash the bitcode reader.
This change puts it in the thread private address space to begin with which means whatever misfired further down the pipeline does not break it. That matches the codegen from clang where stack variables are always annotated (5) and then addrspace cast prior to following use.
This therefore patches around whatever unsuccessfully moved the alloca variable to addrspace(5). That solves the problem of openmp opt producing code that crashes the bitcode reader. It should be possible to create a minimal repro for the underlying bug based on some handwritten IR that uses an alloca in a generic address space.
Reviewed By: ronlieb, jdoerfert, dpalermo-phab
Differential Revision: https://reviews.llvm.org/D109500
Nico Weber [Mon, 13 Sep 2021 14:03:29 +0000 (10:03 -0400)]
[gn build] (semi-manually) port
4247381e26dd
Michał Górny [Mon, 13 Sep 2021 13:43:12 +0000 (15:43 +0200)]
[lldb] [test] Remove parent output checks from follow-child tests
Remove the parent output checks, as they make the test flaky while
serving no real purpose. If the parent crashed/hanged, it will never
resume the child and the test would fail anyway.
Muiez Ahmed [Mon, 13 Sep 2021 13:43:21 +0000 (09:43 -0400)]
[SystemZ][z/OS] Missing wchar functions libc++
The aim is to add the missing z/OS specific implementations for mbsnrtowcs and wcsnrtombs, as part of libc++.
Differential Revision: https://reviews.llvm.org/D98207
Matthias Springer [Mon, 13 Sep 2021 13:26:40 +0000 (22:26 +0900)]
[mlir][linalg] ComprehensiveBufferize: Do not copy InitTensorOps
Do not copy InitTensorOps or casts thereof.
Differential Revision: https://reviews.llvm.org/D109656
Florian Hahn [Mon, 14 Jun 2021 18:33:12 +0000 (19:33 +0100)]
[VPlan] Add test that requires duplicating recipe for sinking.
Pavel Labath [Mon, 13 Sep 2021 13:11:00 +0000 (15:11 +0200)]
[lldb] Skip TestGuiBasicDebug due to pr51833
Anna Thomas [Sun, 12 Sep 2021 19:11:26 +0000 (15:11 -0400)]
[InstCombining] Refactor checks for TryToSinkInstruction. NFC
Moved out the checks for profitability of TryToSinkInstructions
into a lambda function.
This will also allow us to easily add checks for bailing out if the
transform is not profitable.
Tests-Run: instCombine tests.
Kristóf Umann [Wed, 25 Aug 2021 14:07:56 +0000 (16:07 +0200)]
[analyzer] MallocChecker: Add notes from NoOwnershipChangeVisitor only when a function "intents", but doesn't change ownership, enable by default
D105819 Added NoOwnershipChangeVisitor, but it is only registered when an
off-by-default, hidden checker option was enabled. The reason behind this was
that it grossly overestimated the set of functions that really needed a note:
std::string getTrainName(const Train *T) {
return T->name;
} // note: Retuning without changing the ownership of or deallocating memory
// Umm... I mean duh? Nor would I expect this function to do anything like that...
void foo() {
Train *T = new Train("Land Plane");
print(getTrainName(T)); // note: calling getTrainName / returning from getTrainName
} // warn: Memory leak
This patch adds a heuristic that guesses that any function that has an explicit
operator delete call could have be responsible for deallocating the memory that
ended up leaking. This is waaaay too conservative (see the TODOs in the new
function), but it safer to err on the side of too little than too much, and
would allow us to enable the option by default *now*, and add refinements
one-by-one.
Differential Revision: https://reviews.llvm.org/D108753
Stefan Gränitz [Mon, 13 Sep 2021 12:49:01 +0000 (14:49 +0200)]
[JITLink] Factor out forEachRelocation() function from addRelocations() in ELF Aarch64 backend (NFC)
First step in reducing redundancy in `addRelocations()` implementations across ELF JITLink backends. The patch factors out common logic for ELF relocation traversal into the new helper function `forEachRelocation()` in the `ELFLinkGraphBuilder` base class. For now, this is applied to the Aarch64 implementation. Others may follow soon.
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D109516
Nico Weber [Mon, 13 Sep 2021 12:57:38 +0000 (08:57 -0400)]
[clang] Make the driver not diagnose errors on nonexistent linker inputs
When nonexistent linker inputs are passed to the driver, the linker
now errors out, instead of the compiler. If the linker does not run,
clang now emits a "warning: linker input unused" instead of an error
for nonexistent files.
The motivation for this change is that I noticed that
`clang-cl /winsysroot sysroot main.cc ole32.lib` emitted a
"ole32.lib not found" error, even though the linker finds it just fine when
I run `clang-cl /winsysroot sysroot main.cc /link ole32.lib`.
The same problem occurs if running `clang-cl main.cc ole32.lib` in a
non-MSVC shell.
The problem is that DiagnoseInputExistence() only looked for libs in %LIB%,
but MSVCToolChain uses much more involved techniques.
For this particular problem, we could make DiagnoseInputExistence() ask
the toolchain to see if it can find a .lib file, but in general the
driver can't know what the linker will do to find files, so it shouldn't
try. For example, if we implement PR24616, lld-link will look in the
registry to determine a good default for %LIB% if it isn't set.
This is less or a problem for the gcc driver, since .a paths there are
either passed via -l flags (which honor -L), or via a qualified path
(that doesn't honor -L) -- but for example ld.lld's --chroot flag
can also trigger this problem. Without this patch,
`clang -fuse-ld=lld -Wl,--chroot,some/dir /file.o` will complain that
`/file.o` doesn't exist, even though
`clang -fuse-ld=lld -Wl,--chroot,some/dir -Wl,/file.o` succeeds just fine.
This implements rnk's suggestion on the old bug PR27234.
Differential Revision: https://reviews.llvm.org/D109624
Tim Northover [Fri, 3 Sep 2021 08:59:02 +0000 (09:59 +0100)]
SwiftAsync: use runtime-provided flag for extended frame if back-deploying
When back-deploying Swift async code we can't always toggle the flag showing an
extended frame is present because it will confuse unwinders on systems released
before this feature. So in cases where the code might run there, we `or` in a
mask provided by the runtime (as an absolute symbol) telling us whether the
unwinders can cope.
When deploying only for newer OSs, we can still hard-code the bit-set for
greater efficiency.
Andrew Savonichev [Mon, 13 Sep 2021 12:34:21 +0000 (15:34 +0300)]
Revert "[clang] Check unsupported types in expressions"
This reverts commit
ec6c847179fd019acae4d97a18f9e7d3961a6fdf.
Fails on check-openmp:
/b/1/openmp-clang-x86_64-linux-debian/llvm.build/projects/openmp/runtime/test/lock/Output/omp_init_lock.c.tmp
--
Exit Code: -11
LLVM GN Syncbot [Mon, 13 Sep 2021 12:04:24 +0000 (12:04 +0000)]
[gn build] Port
0213d7ec0c50
Andrew Savonichev [Wed, 10 Mar 2021 17:23:41 +0000 (20:23 +0300)]
[clang] Check unsupported types in expressions
The patch adds missing diagnostics for cases like:
float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;
Sema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work
with a type without the corresponding ValueDecl. It is also refactored
so that host diagnostics for unsupported types can be added here as
well.
Differential Revision: https://reviews.llvm.org/D109315
Ole Strohm [Mon, 13 Sep 2021 11:29:16 +0000 (12:29 +0100)]
[OpenCL] Initialize temporaries in the private address space
This patch fixes initializing temporaries, which are currently initialized
without an address space, meaning that no constructor can ever be applicable.
Now they will be constructed in the private addrspace.
Fixes the second issue in PR43296.
Reviewed By: Anastasia
Differential Revision: https://reviews.llvm.org/D107553
Nicolas Vasilache [Fri, 10 Sep 2021 07:12:14 +0000 (07:12 +0000)]
[mlir][Linalg] Use reify for padded op shape derivation.
Previously, we would insert a DimOp and rely on later canonicalizations.
Unfortunately, reifyShape kind of rewrites are not canonicalizations anymore.
This introduces undesirable pass dependencies.
Instead, immediately reify the result shape and avoid the DimOp altogether.
This is akin to a local folding, which avoids introducing more reliance on `-resolve-shaped-type-result-dims` (similar to compositions of `affine.apply` by construction to avoid chains of size > 1).
It does not completely get rid of the reliance on the pass as the process is merely local: calling the pass may still be necessary for global effects. Indeed, one of the tests still requires the pass.
Differential Revision: https://reviews.llvm.org/D109571
Kristóf Umann [Thu, 19 Aug 2021 13:37:02 +0000 (15:37 +0200)]
[analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it
Fix a compilation error due to a missing 'template' keyword.
Differential Revision: https://reviews.llvm.org/D108695
Sven van Haastregt [Mon, 13 Sep 2021 11:06:04 +0000 (12:06 +0100)]
[OpenCL] Support cl_ext_float_atomics
See https://github.com/KhronosGroup/OpenCL-Docs/pull/552 for initial
specification.
Patch by Haonan Yang.
Differential Revision: https://reviews.llvm.org/D106343
Michał Górny [Fri, 10 Sep 2021 11:56:24 +0000 (13:56 +0200)]
[lldb] Remove redundant register alt_names
Remove redundant register alt_names that correspond to their respective
generic names. D108554 makes it possible to query registers through
their generic names directly, therefore making repeating them via
alt_name unnecessary.
While at it, also remove alt_names that are equal to register names
on PPC.
This patch does not alter register definitions where the generic names
are listed as primary names, and other names are provided as alt_name
(e.g. ARM).
Differential Revision: https://reviews.llvm.org/D109626
Michał Górny [Mon, 23 Aug 2021 13:29:45 +0000 (15:29 +0200)]
[lldb] Support querying registers via generic names without alt_names
Update GetRegisterInfoByName() methods to support getting registers
by a generic name independently of alt_name entries in the register
context. This makes it possible to use generic names when interacting
with gdbserver (that does not supply alt_names). It also makes it
possible to remove some of the duplicated information from register
context declarations and/or use alt_names for another purpose.
Differential Revision: https://reviews.llvm.org/D108554
Cullen Rhodes [Mon, 13 Sep 2021 10:10:32 +0000 (10:10 +0000)]
[AArch64] NFC: Remove unused template args
Identified in D109359.
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D109491
David Green [Mon, 13 Sep 2021 10:29:44 +0000 (11:29 +0100)]
[AArch64] Regenerate some test checks. NFC
This regenerates some of the tests that had very-close-to-updated check
line already, in order to make them more maintainable.
Florian Hahn [Mon, 13 Sep 2021 10:21:45 +0000 (11:21 +0100)]
[VectorCombine] Support AND/UREM indices that require freezing.
38b098be6605 limited scalarization to indices that are known non-poison.
For certain patterns that restrict the range of an index, we can insert
a freeze of the original value, to prevent propagation of poison.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D107580
David Truby [Wed, 1 Sep 2021 11:49:48 +0000 (12:49 +0100)]
[llvm][sve] Lowering for VLS masked extending loads
This extends the custom lowering for extending loads on
fixed length vectors in SVE to support masked extending loads.
The existing tests for correct behaviour of masked extending loads
exhibit bad code generation due to the legalistaion of i1 vectors.
They have been left as-is and new tests have been added that do not
exhibit this behaviour.
Differential Revision: https://reviews.llvm.org/D108200
Florian Hahn [Mon, 13 Sep 2021 10:02:22 +0000 (11:02 +0100)]
[Sema] Add test for __builtin_fminf errors.
Cullen Rhodes [Mon, 13 Sep 2021 09:46:31 +0000 (09:46 +0000)]
[AArch64][SVE] NFC: Remove unused name from cvt builtins
Identified in D109359.
Reviewed By: paulwalker-arm, dmgreen
Differential Revision: https://reviews.llvm.org/D109589
Cullen Rhodes [Mon, 13 Sep 2021 09:46:04 +0000 (09:46 +0000)]
[Hexagon] NFC: Remove unused tblgen template args
Identified in D109359.
Reviewed By: kparzysz
Differential Revision: https://reviews.llvm.org/D109604
Cullen Rhodes [Mon, 13 Sep 2021 09:45:55 +0000 (09:45 +0000)]
[Lanai] NFC: Remove unused tblgen template arg 'OpNode'
Identified in D109359.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D109606
Cullen Rhodes [Mon, 13 Sep 2021 09:45:36 +0000 (09:45 +0000)]
[NVPTX] NFC: Remove unused template arg '_'
Identified in D109359.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D109602
Xiang1 Zhang [Mon, 13 Sep 2021 10:02:52 +0000 (18:02 +0800)]
[X86] Adjust Keylocker handle mem size
Reviewed By: Topper Craig
Differential Revision: https://reviews.llvm.org/D109488
Xiang1 Zhang [Mon, 13 Sep 2021 10:00:46 +0000 (18:00 +0800)]
Revert "[X86] Adjust Keylocker handle mem size"
This reverts commit
3731de6b7f2d42d40151f9574636bc4d5ccfa5e3.
Xiang1 Zhang [Thu, 9 Sep 2021 07:28:43 +0000 (15:28 +0800)]
[X86] Adjust Keylocker handle mem size
Reviewed By: Topper Craig
Differential Revision: https://reviews.llvm.org/D109354
Valentin Clement [Mon, 13 Sep 2021 09:58:07 +0000 (11:58 +0200)]
[mlir] Add missing namespace to createInlinerPass
One of the createInlinerPass does not have the mlir:: namespace
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D109580
Luís Marques [Mon, 13 Sep 2021 09:37:29 +0000 (10:37 +0100)]
XFAIL test `missing-abstract-variable.ll` for RISC-V
This test fails for many architectures. Also XFAIL for RISC-V.
Jingu Kang [Tue, 7 Sep 2021 09:19:41 +0000 (10:19 +0100)]
[LoopBoundSplit] Check the start value of split cond AddRec
After transformation, we assume the split condition of the pre-loop is always
true. In order to guarantee it, we need to check the start value of the split
cond AddRec satisfies the split condition.
Differential Revision: https://reviews.llvm.org/D109354
Jay Foad [Mon, 13 Sep 2021 08:04:30 +0000 (09:04 +0100)]
[AMDGPU] Minor cleanup after D109483. NFC.
Esme-Yi [Mon, 13 Sep 2021 09:24:38 +0000 (09:24 +0000)]
[yaml2obj][XCOFF] customize the string table
Summary: The patch adds support for yaml2obj customizing the string table.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D107421
David Sherwood [Tue, 7 Sep 2021 15:05:25 +0000 (16:05 +0100)]
[NFC] Replace unsigned VF with ElementCount in EpilogueLoopVectorizationInfo
This patch simply replaces any unsigned VFs with ElementCounts. It's
still NFC because at the moment epilogue vectorisation is disabled
when the main vector loop uses scalable vectors.
Differential Revision: https://reviews.llvm.org/D109364
Florian Hahn [Mon, 13 Sep 2021 08:36:12 +0000 (09:36 +0100)]
[LAA] Add additional pointer phi tests.
serge-sans-paille [Mon, 13 Sep 2021 08:25:45 +0000 (10:25 +0200)]
Fix scan-build-py executable lookup path
Once installed, scan-build-py doesn't know anything about its auxiliary
executable and can't find them.
Use relative path wrt. scan-build-py script.
Differential Revision: https://reviews.llvm.org/D109659
Benjamin Kramer [Mon, 13 Sep 2021 08:51:08 +0000 (10:51 +0200)]
Pavel Labath [Fri, 10 Sep 2021 12:38:27 +0000 (14:38 +0200)]
[lldb] Remove PluginInterface::GetPluginVersion
In all these years, we haven't found a use for this function (it has
zero callers). Lets just remove the boilerplate.
Differential Revision: https://reviews.llvm.org/D109600
Max Kazantsev [Mon, 13 Sep 2021 08:27:33 +0000 (15:27 +0700)]
[Test] Add more sophisticated tests for switch UB opt
Optimizer is being too smart with existing tests, and the transform
gets concealed by following transforms.
Jim Lin [Mon, 13 Sep 2021 05:52:03 +0000 (13:52 +0800)]
[RISCV] Rename prefix `FeatureExt*` to `FeatureStdExt*` for all sub-extension
Rename prefix `FeatureExt*` to `FeatureStdExt*` for all sub-extension for consistency
Reviewed By: HsiangKai, asb
Differential Revision: https://reviews.llvm.org/D108187
Esme-Yi [Mon, 13 Sep 2021 07:54:33 +0000 (07:54 +0000)]
[XCOFF] Fix the program abortion issue in XCOFFObjectFile::getSectionContents.
Summary: Use std::move(E) to avoid `Program aborted due to an unhandled Error`
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D109567
Simon Pilgrim [Sat, 11 Sep 2021 19:29:25 +0000 (20:29 +0100)]
[X86][SLM] Fix DIVPD/DIVPS/RCPPS/RSQRTPS/SQRTPD/SQRTPS/DPPD/DPPS uops, latency and throughput
The packed variants of the instructions had been modelled as the same as the scalar variants.
Reported during a run of llvm-exegesis on a cheap SLM box and matches what Agner / InstLatX64 report as well.
Simon Pilgrim [Sat, 11 Sep 2021 19:17:10 +0000 (20:17 +0100)]
[InstCombine] Add PR51784 test cases
Raphael Isemann [Mon, 13 Sep 2021 06:57:18 +0000 (08:57 +0200)]
[lldb][NFC] Cleanup EditlineHistory
luxufan [Sat, 11 Sep 2021 03:11:48 +0000 (11:11 +0800)]
[JITLink] Add initial native TLS support to ELFNix platform
This patch use the same way as the https://reviews.llvm.org/rGfe1fa43f16beac1506a2e73a9f7b3c81179744eb to handle the thread local variable.
It allocates 2 * pointerSize space in GOT to represent the thread key and data address. Instead of using the _tls_get_addr function, I customed a function __orc_rt_elfnix_tls_get_addr to get the address of thread local varible. Currently, this is a wip patch, only one TLS relocation R_X86_64_TLSGD is supported and I need to add the corresponding test cases.
To allocate the TLS descriptor in GOT, I need to get the edge kind information in PerGraphGOTAndPLTStubBuilder, So I add a `Edge::Kind K` argument in some functions in PerGraphGOTAndPLTStubBuilder.h. If it is not suitable, I can think further to solve this problem.
Differential Revision: https://reviews.llvm.org/D109293
Mathieu Fehr [Mon, 13 Sep 2021 06:22:19 +0000 (06:22 +0000)]
[mlir] Allows to query traits from types and attributes
Types and attributes now have a `hasTrait` function that allow users to check
if a type defines a trait.
Also, AbstractType and AbstractAttribute has now a `hasTraitFn` field to carry
the implementation of the `hasTrait` function of the concrete type or attribute.
This patch also adds the remaining functions to access type and attribute traits
in TableGen.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D105202
Mehdi Amini [Thu, 9 Sep 2021 00:10:16 +0000 (00:10 +0000)]
Add sanity check in MLIR ODS to catch case where an arguments/results/regions/successors names overlap
This is making a tablegen crash with a more friendly error.
Differential Revision: https://reviews.llvm.org/D109474
Jan Kratochvil [Mon, 13 Sep 2021 05:35:12 +0000 (07:35 +0200)]
[lldb] [testsuite] Fix false failures on "\n" regex match
Regex is matching a binary so it needs `re.DOTALL`.
vFile:fstat packet data ATTACHMENT is not hex-encoded but it is only
escaped.
It is difficult to reproduce, it came from buildbot:
https://lab.llvm.org/staging/#/builders/16/builds/10597
******************** TEST 'lldb-api :: tools/lldb-server/TestGdbRemotePlatformFile.py' FAILED ********************
FAIL: test_platform_file_fstat_llgs (TestGdbRemotePlatformFile.TestGdbRemotePlatformFile)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", line 52, in test_method
return attrvalue(self)
File "lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py", line 259, in test_platform_file_fstat
context = self.expect_gdbremote_sequence()
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", line 621, in expect_gdbremote_sequence
return expect_lldb_gdbserver_replay(
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py", line 198, in expect_lldb_gdbserver_replay
context = sequence_entry.assert_match(
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py", line 479, in assert_match
return self._assert_regex_match(asserter, actual_packet, context)
File "lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py", line 446, in _assert_regex_match
asserter.fail(
AssertionError: regex '^\$F([0-9a-fA-F]+);(.*)#[0-9a-fA-F]{2}$' failed to match against content '$F40;^@^@^@ ^@
^C<8d>^@^@<81><80>^@^@^@^A^@^@^CX^@^@^CX^@^@^@^@^@^@^@^@^@^@^@^W^@^@^@^@^@^@^P^@^@^@^@^@^@^@^@
a=XXa=XXa=XX#6b'
Vignesh Balasubramanian [Mon, 13 Sep 2021 04:47:44 +0000 (10:17 +0530)]
[OpenMP] [OMPD] OPENMP_INSTALL_LIBDIR is set for the install dir
OPENMP_INSTALL_LIBDIR is set to the installation path of shared and static
libompd.This should avoid the mixing of 32 and 64 bit on same path in
multi-lib set-up.
Reviewed By: @mceier
Differential Revision: https://reviews.llvm.org/D109352
Tom Praschan [Mon, 13 Sep 2021 04:34:02 +0000 (00:34 -0400)]
Add semantic token modifier for non-const reference parameter
See https://github.com/clangd/clangd/issues/839
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D108320
Arthur Eubanks [Mon, 13 Sep 2021 04:33:55 +0000 (21:33 -0700)]
[NFC][CoroSplit] Directly use Function::getFunctionType()
Max Kazantsev [Mon, 13 Sep 2021 04:29:33 +0000 (11:29 +0700)]
[IndVars] Break backedge and replace PHIs if loop exits on 1st iteration
Implement TODO in optimizeLoopExits. Now if we have proved that some loop exit
is taken on 1st iteration, we make all branches in the following exiting blocks
always branch out of the loop and their conditions simplified away.
Patch by Dmitry Makogon!
Differential Revision: https://reviews.llvm.org/D108910
Reviewed By: lebedev.ri
Max Kazantsev [Mon, 13 Sep 2021 03:48:42 +0000 (10:48 +0700)]
[IndVars] Replace PHIs if loop exits on 1st iteration
This is a part of D108910.
We replace all loop PHIs with values coming from the loop preheader if
we proved that backedge is never taken.
Patch by Dmitry Makogon!
Differential Revision: https://reviews.llvm.org/D109596
Reviewed By: lebedev.ri
Arthur Eubanks [Mon, 13 Sep 2021 03:45:14 +0000 (20:45 -0700)]
[NFC] Directly use OpenMPIRBuilder::Ident instead of IdentPtr->getPointerElementType()
Ahsan Saghir [Mon, 13 Sep 2021 00:39:35 +0000 (19:39 -0500)]
[PowerPC] [NFC] Add Big-Endian checks for existing MMA tests
This patch adds Big-Endian checks for the existing MMA test cases.
It also changes the target for these test cases to pwr10.
Reviewed By: #powerpc, nemanjai
Differential Revision: https://reviews.llvm.org/D109126
Kuter Dinel [Sun, 12 Sep 2021 23:41:54 +0000 (02:41 +0300)]
[Attributor][FIX] AACallEdges, fix propagation error.
This patch fixes a error made in
2cc6f7c8e108. That patch
added a call site position but there was a small error with the way
the presence of a unknown call edge was being propagated from call site
to function. This patch fixes that error. This error was effecting some
AMDGPU tests.
Arthur Eubanks [Mon, 13 Sep 2021 00:36:46 +0000 (17:36 -0700)]
[NFC] Avoid using pointee types in PPCISelLowering
A cmpxchg's new value type is the same as the pointer operand's pointee type.