Commit Graph

398890 Commits

Author SHA1 Message Date
LLVM GN Syncbot dfc68591a6 [gn build] Port 0213d7ec0c 2021-09-13 12:04:24 +00:00
Andrew Savonichev ec6c847179 [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
2021-09-13 14:59:37 +03:00
Ole Strohm 8008009fd2 [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
2021-09-13 12:56:04 +01:00
Nicolas Vasilache b01d223faf [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
2021-09-13 11:54:59 +00:00
Kristóf Umann 0213d7ec0c [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
2021-09-13 13:50:01 +02:00
Sven van Haastregt d353d1c501 [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
2021-09-13 12:12:40 +01:00
Michał Górny e3d878bdd8 [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
2021-09-13 13:05:06 +02:00
Michał Górny 8567f4d4b9 [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
2021-09-13 13:05:06 +02:00
Cullen Rhodes 1d771e19fd [AArch64] NFC: Remove unused template args
Identified in D109359.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D109491
2021-09-13 10:39:33 +00:00
David Green b737f1acf4 [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.
2021-09-13 11:29:44 +01:00
Florian Hahn c24fc37e47
[VectorCombine] Support AND/UREM indices that require freezing.
38b098be66 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
2021-09-13 11:21:45 +01:00
David Truby 915e9e76bf [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
2021-09-13 11:13:25 +01:00
Florian Hahn d86a947bb9
[Sema] Add test for __builtin_fminf errors. 2021-09-13 11:12:06 +01:00
Cullen Rhodes 9db7e8e3ce [AArch64][SVE] NFC: Remove unused name from cvt builtins
Identified in D109359.

Reviewed By: paulwalker-arm, dmgreen

Differential Revision: https://reviews.llvm.org/D109589
2021-09-13 10:09:08 +00:00
Cullen Rhodes 97a6d76694 [Hexagon] NFC: Remove unused tblgen template args
Identified in D109359.

Reviewed By: kparzysz

Differential Revision: https://reviews.llvm.org/D109604
2021-09-13 10:09:08 +00:00
Cullen Rhodes 9e435c96de [Lanai] NFC: Remove unused tblgen template arg 'OpNode'
Identified in D109359.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D109606
2021-09-13 10:09:08 +00:00
Cullen Rhodes 6bd26329bf [NVPTX] NFC: Remove unused template arg '_'
Identified in D109359.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D109602
2021-09-13 10:09:08 +00:00
Xiang1 Zhang c81d6ab875 [X86] Adjust Keylocker handle mem size
Reviewed By: Topper Craig

Differential Revision: https://reviews.llvm.org/D109488
2021-09-13 18:03:27 +08:00
Xiang1 Zhang bdce8d40c6 Revert "[X86] Adjust Keylocker handle mem size"
This reverts commit 3731de6b7f.
2021-09-13 18:00:46 +08:00
Xiang1 Zhang 3731de6b7f [X86] Adjust Keylocker handle mem size
Reviewed By: Topper Craig

Differential Revision: https://reviews.llvm.org/D109354
2021-09-13 17:59:33 +08:00
Valentin Clement 57bf856011
[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
2021-09-13 11:58:27 +02:00
Luís Marques 7271de2d19 XFAIL test `missing-abstract-variable.ll` for RISC-V
This test fails for many architectures. Also XFAIL for RISC-V.
2021-09-13 10:39:43 +01:00
Jingu Kang 2a26d47a2d [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
2021-09-13 10:32:35 +01:00
Jay Foad 477b9bc9f7 [AMDGPU] Minor cleanup after D109483. NFC. 2021-09-13 10:27:15 +01:00
Esme-Yi 909f3d7380 [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
2021-09-13 09:24:38 +00:00
David Sherwood bbada9ff45 [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
2021-09-13 10:18:30 +01:00
Florian Hahn 4c84a0f24c
[LAA] Add additional pointer phi tests. 2021-09-13 10:05:31 +01:00
serge-sans-paille c84755a046 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
2021-09-13 11:01:47 +02:00
Benjamin Kramer 2d75cfdeb7 [mlir] Update bazel build for 802bf02a73 2021-09-13 10:51:08 +02:00
Pavel Labath b03126768a [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
2021-09-13 10:29:00 +02:00
Max Kazantsev 7e337d8ba2 [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.
2021-09-13 15:28:23 +07:00
Jim Lin f29336104d [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
2021-09-13 16:24:15 +08:00
Esme-Yi ea81898d0f [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
2021-09-13 07:54:33 +00:00
Simon Pilgrim 65ad09da0e [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.
2021-09-13 08:36:43 +01:00
Simon Pilgrim 6d970e83fa [InstCombine] Add PR51784 test cases 2021-09-13 08:36:43 +01:00
Raphael Isemann 4b2e38d940 [lldb][NFC] Cleanup EditlineHistory 2021-09-13 09:30:31 +02:00
luxufan ff6069b891 [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
2021-09-13 14:35:49 +08:00
Mathieu Fehr 802bf02a73 [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
2021-09-13 06:26:45 +00:00
Mehdi Amini 7fb2394a4f 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
2021-09-13 06:21:25 +00:00
Jan Kratochvil ff94f60240 [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'
2021-09-13 07:35:12 +02:00
Vignesh Balasubramanian 939154125b [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
2021-09-13 10:25:50 +05:30
Tom Praschan 5a85f9b1d4 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
2021-09-13 00:51:09 -04:00
Arthur Eubanks 6a92ab07cb [NFC][CoroSplit] Directly use Function::getFunctionType() 2021-09-12 21:34:19 -07:00
Max Kazantsev d9ca444835 [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
2021-09-13 11:30:55 +07:00
Max Kazantsev 5a6dfb27ca [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
2021-09-13 10:50:33 +07:00
Arthur Eubanks d48a3f9f75 [NFC] Directly use OpenMPIRBuilder::Ident instead of IdentPtr->getPointerElementType() 2021-09-12 20:45:44 -07:00
Ahsan Saghir 203cd01b54 [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
2021-09-12 20:39:27 -05:00
Kuter Dinel 9a193bdc81 [Attributor][FIX] AACallEdges, fix propagation error.
This patch fixes a error made in 2cc6f7c8e1. 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.
2021-09-13 03:45:26 +03:00
Arthur Eubanks f94a118a6e [NFC] Avoid using pointee types in PPCISelLowering
A cmpxchg's new value type is the same as the pointer operand's pointee type.
2021-09-12 17:37:35 -07:00
Craig Topper 283879793d [RISCV] Initial support .insn directive for the assembler.
This allows for a custom encoding to be emitted. It can also be
used with inline assembly to allow the custom instruction to be
register allocated like other instructions.

I initially started from SystemZ's implementation, but some of
the formats allow operands to be specified in multiple ways so I
had to add support for matching different operand class lists for
the same format. That implementation is a simplified version of
what is emitted by tablegen for regular instructions.

I've left out the compressed formats. And I haven't supported the
named opcodes like LUI or OP_IMM_32. Those can be added in future
patches.

Documentation can be found here https://sourceware.org/binutils/docs-2.37/as/RISC_002dV_002dFormats.html

Reviewed By: jrtc27, MaskRay

Differential Revision: https://reviews.llvm.org/D108602
2021-09-12 15:56:12 -07:00