Benjamin Kramer [Wed, 30 Sep 2020 11:26:25 +0000 (13:26 +0200)]
Move AffineMapAttr into BaseOps.td
AffineMapAttr is already part of base, it's just impossible to refer to
it from ODS without pulling in the definition from Affine dialect.
Differential Revision: https://reviews.llvm.org/D88555
Gabriel Hjort Åkerlund [Wed, 30 Sep 2020 13:24:41 +0000 (15:24 +0200)]
[GlobalISel] Fix incorrect setting of ValNo when splitting
Before, for each original argument i, ValNo was set to i + PartIdx, but
ValNo is intended to reflect the index of the value before splitting.
Hence, ValNo should always be set to i and not consider the PartIdx.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D86511
Sean Fertile [Wed, 30 Sep 2020 13:56:55 +0000 (09:56 -0400)]
[PowerPC] Remove support for VRSAVE save/restore/update.
After removal of Darwin as a PowerPC subtarget, the VRSAVE
save/restore/spill/update code is no longer needed by any supported
subtarget, so remove it while keeping support for vrsave and related instruction
aliases for inline asm. I've pre-commited tests to document the existing vrsave
handling in relation to @llvm.eh.unwind.init and inline asm usage, as
well as a test which shows a beahviour change on AIX related to
returning vector type as we were wrongly emiting VRSAVE_UPDATE on AIX.
Sam McCall [Wed, 30 Sep 2020 13:45:13 +0000 (15:45 +0200)]
[clangd] Fix invalid UTF8 when extracting doc comments.
Differential Revision: https://reviews.llvm.org/D88567
Simon Pilgrim [Wed, 30 Sep 2020 13:54:04 +0000 (14:54 +0100)]
[InstCombine] recognizeBSwapOrBitReverseIdiom - merge the regular/trunc+zext paths. NFCI.
There doesn't seem to be any good reason for having a separate path for when we bswap/bitreverse at a smaller size than the destination size - so merge these to make the instruction generation a lot clearer.
Simon Pilgrim [Wed, 30 Sep 2020 13:39:23 +0000 (14:39 +0100)]
[InstCombine] Remove %tmp variable names from bswap tests
Appease update_test_checks script that was complaining about potential %TMP clashes
Simon Pilgrim [Wed, 30 Sep 2020 13:36:12 +0000 (14:36 +0100)]
[InstCombine] recognizeBSwapOrBitReverseIdiom - remove unnecessary cast. NFCI.
Michał Górny [Wed, 30 Sep 2020 12:53:05 +0000 (14:53 +0200)]
[lldb] [Process/NetBSD] Fix operating on ftag register
Florian Hahn [Tue, 22 Sep 2020 14:10:06 +0000 (15:10 +0100)]
[VPlan] Change recipes to inherit from VPUser instead of a member var.
Now that VPUser is not inheriting from VPValue, we can take the next
step and turn the recipes that already manage their operands via VPUser
into VPUsers directly. This is another small step towards traversing
def-use chains in VPlan.
This is NFC with respect to the generated code, but makes the interface
more powerful.
Ed Maste [Wed, 30 Sep 2020 12:27:09 +0000 (08:27 -0400)]
[lldb] Fix FreeBSD Arm Process Plugin build
Add a missing include and some definitions in
769533216666.
Patch by: Brooks Davis
Reviewed by: labath
Differential Revision: https://reviews.llvm.org/D88453
Simon Pilgrim [Wed, 30 Sep 2020 13:19:00 +0000 (14:19 +0100)]
[InstCombine] Add PR47191 bswap tests
Simon Pilgrim [Wed, 30 Sep 2020 13:11:43 +0000 (14:11 +0100)]
[InstCombine] recognizeBSwapOrBitReverseIdiom - cleanup bswap/bitreverse detection loop. NFCI.
Early out if both pattern matches have failed (or we don't want them). Fix case of bit index iterator (and avoid Wshadow issue).
Sam Parker [Wed, 30 Sep 2020 11:25:06 +0000 (12:25 +0100)]
[RDA] isSafeToDefRegAt: Look at global uses
We weren't looking at global uses of a value, so we could happily
overwrite the register incorrectly.
Differential Revision: https://reviews.llvm.org/D88554
Simon Pilgrim [Wed, 30 Sep 2020 12:39:18 +0000 (13:39 +0100)]
[InstCombine] recognizeBSwapOrBitReverseIdiom - use ArrayRef::back() helper. NFCI.
Post-commit feedback on D88316
Simon Pilgrim [Wed, 30 Sep 2020 11:28:18 +0000 (12:28 +0100)]
InstCombine] collectBitParts - cleanup variable names. NFCI.
Fix a number of WShadow warnings (I was used as the instruction and index......) and fix cases to match style.
Also, replaced the Bit APInt mask check in AND instructions with a direct APInt[] bit check.
Florian Hahn [Wed, 30 Sep 2020 11:39:30 +0000 (12:39 +0100)]
[SCEV] Verify that all mapped SCEV AddRecs refer to valid loops.
This check helps to guard against cases where expressions referring to
invalidated/deleted loops are not properly invalidated.
The additional check is motivated by the reproducer shared for
8fdac7cb7abb
and I think in general make sense as a sanity check.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D88166
Jakub Lichman [Wed, 30 Sep 2020 07:13:59 +0000 (07:13 +0000)]
[mlir][Linalg] Tile sizes for Conv ops vectorization added as pass arguments
Current setup for conv op vectorization does not enable user to specify tile
sizes as well as dimensions for vectorization. In this commit we change that by
adding tile sizes as pass arguments. Every dimension with corresponding tile
size > 1 is automatically vectorized.
Differential Revision: https://reviews.llvm.org/D88533
Sam Parker [Wed, 30 Sep 2020 11:14:39 +0000 (12:14 +0100)]
[NFC][ARM] Add more LowOverheadLoop tests.
Jakub Lichman [Wed, 30 Sep 2020 07:42:43 +0000 (07:42 +0000)]
[mlir] Added support for rank reducing subviews
This commit adds support for subviews which enable to reduce resulting rank
by dropping static dimensions of size 1.
Differential Revision: https://reviews.llvm.org/D88534
Simon Pilgrim [Wed, 30 Sep 2020 11:07:19 +0000 (12:07 +0100)]
[InstCombine] recognizeBSwapOrBitReverseIdiom - recognise zext(bswap(trunc(x))) patterns (PR39793)
PR39793 demonstrated an issue where we fail to recognize 'partial' bswap patterns of the lower bytes of an integer source.
In fact, most of this is already in place collectBitParts suitably tags zero bits, so we just need to correctly handle this case by finding the zero'd upper bits and reducing the bswap pattern just to the active demanded bits.
Differential Revision: https://reviews.llvm.org/D88316
Simon Pilgrim [Wed, 30 Sep 2020 10:13:54 +0000 (11:13 +0100)]
[InstCombine] recognizeBSwapOrBitReverseIdiom - assert for correct bit providence indices. NFCI.
As suggested by @spatel on D88316
LLVM GN Syncbot [Wed, 30 Sep 2020 10:09:34 +0000 (10:09 +0000)]
[gn build] Port
413577a8790
Xiang1 Zhang [Wed, 30 Sep 2020 10:01:15 +0000 (18:01 +0800)]
[X86] Support Intel Key Locker
Key Locker provides a mechanism to encrypt and decrypt data with an AES key without having access
to the raw key value by converting AES keys into “handles”. These handles can be used to perform the
same encryption and decryption operations as the original AES keys, but they only work on the current
system and only until they are revoked. If software revokes Key Locker handles (e.g., on a reboot),
then any previous handles can no longer be used.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D88398
George Mitenkov [Wed, 30 Sep 2020 09:05:17 +0000 (12:05 +0300)]
[MLIR][SPIRV] Support different function control in (de)serialization
Added support for different function control
in serialization and deserialization.
Reviewed By: mravishankar
Differential Revision: https://reviews.llvm.org/D88280
Jonas Paulsson [Thu, 24 Sep 2020 15:24:29 +0000 (17:24 +0200)]
[SystemZ] Support bare nop instructions
Add support of "nop" and "nopr" (without operands) to assembler.
Review: Ulrich Weigand
Jay Foad [Mon, 28 Sep 2020 08:30:58 +0000 (09:30 +0100)]
[SplitKit] Cope with no live subranges in defFromParent
Following on from D87757 "[SplitKit] Only copy live lanes", it is
possible to split a live range at a point when none of its subranges
are live. This patch handles that case by inserting an implicit def
of the superreg.
Patch by Quentin Colombet!
Differential Revision: https://reviews.llvm.org/D88397
Mirko Brkusanin [Tue, 29 Sep 2020 14:35:42 +0000 (16:35 +0200)]
[AMDGPU] Do not generate mul with 1 in AMDGPU Atomic Optimizer
Check if operand of mul is constant value of one for certain atomic
instructions in order to avoid making unnecessary instructions when
-amdgpu-atomic-optimizer is present.
Differential Revision: https://reviews.llvm.org/D88315
Kadir Cetinkaya [Tue, 29 Sep 2020 18:15:03 +0000 (20:15 +0200)]
[clangd][remote] Make sure relative paths are absolute with respect to posix style
Relative paths received from the server are always in posix style. So
we need to ensure they are relative using that style, and not the native one.
Differential Revision: https://reviews.llvm.org/D88507
Sam McCall [Wed, 30 Sep 2020 09:02:05 +0000 (11:02 +0200)]
[clangd] Fix fuzzer build after
7ba0779fbb41b6fa8
Sam McCall [Wed, 30 Sep 2020 08:56:43 +0000 (10:56 +0200)]
[clangd] Fix member/type name conflict caught by buildbots.
Jeremy Morse [Wed, 30 Sep 2020 08:43:29 +0000 (09:43 +0100)]
Revert "[gardening] Replace some uses of setDebugLoc(DebugLoc()) with dropLocation(), NFC"
Some of the buildbots have croaked with this patch, for examples failures
that begin in this build:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/29933
This reverts commit
674f57870f4c8a7fd7b629bffc85b149cbefd3e0.
Georgii Rymar [Tue, 29 Sep 2020 14:06:08 +0000 (17:06 +0300)]
[llvm-readobj][test] - Stop using few precompiled binaries in mips-got.test
This removes 4 input files (one source file and 3 precompiled binaries) from
`mips-got.test` (now YAMLs are used instead) and also makes the testing of
the GNU output a bit stricter (`--strict-whitespace --match-full-lines`).
Differential revision: https://reviews.llvm.org/D88488
Georgii Rymar [Tue, 29 Sep 2020 10:53:38 +0000 (13:53 +0300)]
[llvm-readobj][ARM] - Improve support of printing unwind (-u) information for non-relocatable objects.
This is the one more patch for https://bugs.llvm.org/show_bug.cgi?id=47581
It fixes how we print an information for the Generic model. With this patch
we are able to read values from `.ARM.extab` and dump proper personality routines names/addresses.
Differential revision: https://reviews.llvm.org/D88478
Frederik Gossen [Wed, 30 Sep 2020 08:38:08 +0000 (08:38 +0000)]
[MLIR][Standard] Add `atan2` to standard dialect
Differential Revision: https://reviews.llvm.org/D88168
Sam Parker [Wed, 30 Sep 2020 08:36:57 +0000 (09:36 +0100)]
[ARM][LowOverheadLoops] TryRemove helper.
Make a helper function that wraps around RDA::isSafeToRemove and
utilises the existing DCE IT block checks.
Sam McCall [Tue, 29 Sep 2020 14:28:50 +0000 (16:28 +0200)]
[clangd] Mark code action as "preferred" if it's the sole quickfix action
Differential Revision: https://reviews.llvm.org/D88489
Sam McCall [Tue, 29 Sep 2020 08:37:46 +0000 (10:37 +0200)]
[clangd] Extract options struct for ClangdLSPServer. NFC
In preparation for making moving TweakFilter from ClangdServer::Options to
a ClangdLSPServer option, and letting it vary per-request.
(In order to implement CodeActionParams.only)
Also a general overdue cleanup.
Differential Revision: https://reviews.llvm.org/D88470
Sam Parker [Wed, 30 Sep 2020 07:36:48 +0000 (08:36 +0100)]
[NFC][ARM] Add LowOverheadLoop test
Sam Parker [Mon, 28 Sep 2020 14:46:56 +0000 (15:46 +0100)]
[RDA] Switch isSafeToMove iterators
So forwards is forwards and backwards is reverse. Also add a check
so that we know the instructions are in the expected order.
Differential Revision: https://reviews.llvm.org/D88419
Sam Parker [Thu, 24 Sep 2020 13:02:53 +0000 (14:02 +0100)]
[ARM] Change VPT state assertion
Just because we haven't encountered an instruction setting the VPR,
it doesn't mean we can't create a VPT block - the VPR maybe a
live-in.
Differential Revision: https://reviews.llvm.org/D88224
Jonas Devlieghere [Wed, 30 Sep 2020 06:00:18 +0000 (23:00 -0700)]
[lldb] Use config.lldb_src_root in lit_config.load_config (NFC)
Rather than relaying on CMake to substitute the full path to the lldb
source root, use the value set in config.lldb_src_root. This makes it
slightly easier to write a custom lit.site.cfg.py.
Serge Pavlov [Wed, 30 Sep 2020 04:07:55 +0000 (11:07 +0700)]
Remove test AST/const-fpfeatures-diag.c
This test is going to be removed because using dynamic rounding mode
in initializers is changing. It also causes build failures in some
cases, so remove it now.
Scott Todd [Wed, 30 Sep 2020 03:55:54 +0000 (03:55 +0000)]
[mlir] Update docs referencing OpTrait::Symbol.
Since https://reviews.llvm.org/D78522, Symbol is not a Trait itself.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D88512
Arthur Eubanks [Wed, 30 Sep 2020 03:12:00 +0000 (20:12 -0700)]
[gn build] Add missing dependency to Extensions
Brad Smith [Wed, 30 Sep 2020 02:17:12 +0000 (22:17 -0400)]
Remove further OpenBSD/sparc bits
Amara Emerson [Tue, 29 Sep 2020 21:39:54 +0000 (14:39 -0700)]
[GlobalISel] Fix multiply with overflow intrinsics legalization generating invalid MIR.
During lowering of G_UMULO and friends, the previous code moved the builder's
insertion point to be after the legalizing instruction. When that happened, if
there happened to be a "G_CONSTANT i32 0" immediately after, the CSEMIRBuilder
would try to find that constant during the buildConstant(zero) call, and since
it dominates itself would return the iterator unchanged, even though the def
of the constant was *after* the current insertion point. This resulted in the
compare being generated *before* the constant which it was using.
There's no need to modify the insertion point before building the mul-hi or
constant. Delaying moving the insert point ensures those are built/CSEd before
the G_ICMP is built.
Fixes PR47679
Differential Revision: https://reviews.llvm.org/D88514
Craig Topper [Tue, 29 Sep 2020 17:51:49 +0000 (10:51 -0700)]
[X86] Increase the depth threshold required to form VPERMI2W/VPERMI2B in shuffle combining
These instructions are implemented with two port 5 uops and one port 015 uop so they are more complicated that most shuffles.
This patch increases the depth threshold for when we form them during shuffle combining to try to limit increasing the number of uops especially on port 5.
Differential Revision: https://reviews.llvm.org/D88503
Hubert Tong [Wed, 30 Sep 2020 01:11:16 +0000 (21:11 -0400)]
[AIX] asm output: use character literals in byte lists for strings
This patch improves the assembly output produced for string literals by
using character literals in byte lists. This provides the benefits of
having printable characters appear as such in the assembly output and of
having strings kept as logical units on the same line.
Reviewed By: daltenty
Differential Revision: https://reviews.llvm.org/D80953
Evandro Menezes [Tue, 29 Sep 2020 22:11:12 +0000 (17:11 -0500)]
[RISCV] Use the extensions in the canonical order (NFC)
Use the ISA extensions for specific processors in the conventional canonical order.
Yaxun (Sam) Liu [Tue, 29 Sep 2020 12:51:26 +0000 (08:51 -0400)]
Add remquo, frexp and modf overload functions to HIP header
Vedant Kumar [Wed, 30 Sep 2020 00:37:36 +0000 (17:37 -0700)]
[gardening] Replace some uses of setDebugLoc(DebugLoc()) with dropLocation(), NFC
Jonas Devlieghere [Wed, 30 Sep 2020 00:22:16 +0000 (17:22 -0700)]
[lldb] Hoist -s (trace directory) argument out of LLDB_TEST_COMMON_ARGS (NFC)
Give the trace directory argument its own variable
(LLDB_TEST_TRACE_DIRECTORY) so that we can configure it in
lit.site.cfg.py if we so desire.
Richard Smith [Wed, 30 Sep 2020 00:08:42 +0000 (17:08 -0700)]
Fix test failures with trunk clang
- Make the consteval constructor for the zero type be noexcept
- Don't expect three-way comparison of 0 against a comparison category
to fail
Vitaly Buka [Tue, 29 Sep 2020 22:31:25 +0000 (15:31 -0700)]
[NFC][Msan] Add llvm.fabs test
llvm.fabs does not need a special handler as llvm.abs as its
single argument type match the return type.
Vitaly Buka [Tue, 29 Sep 2020 21:38:56 +0000 (14:38 -0700)]
[NFC][MSAN] Remove an attribute in test
Vedant Kumar [Wed, 30 Sep 2020 00:07:06 +0000 (17:07 -0700)]
[docs] Recommend dropLocation() over setDebugLoc(DebugLoc())
Amy Huang [Tue, 29 Sep 2020 23:19:08 +0000 (16:19 -0700)]
[DebugInfo] Add types from constructor homing to the retained types list.
Add class types to the retained types list to make sure they
don't get dropped if the constructor is optimized out later.
Differential Revision: https://reviews.llvm.org/D88522
John McCall [Tue, 29 Sep 2020 22:47:37 +0000 (18:47 -0400)]
Fix a variety of minor issues with ObjC method mangling:
- Fix a memory leak accidentally introduced yesterday by using CodeGen's
existing mangling context instead of creating a new context afresh.
- Move GNU-runtime ObjC method mangling into the AST mangler; this will
eventually be necessary to support direct methods there, but is also
just the right architecture.
- Make the Apple-runtime method mangling work properly when given an
interface declaration, fixing a bug (which had solidified into a test)
where mangling a category method from the interface could cause it to
be mangled as if the category name was a class name. (Category names
are namespaced within their class and have no global meaning.)
- Fix a code cross-reference in dsymutil.
Based on a patch by Ellis Hoag.
Jacques Pienaar [Tue, 29 Sep 2020 23:47:21 +0000 (16:47 -0700)]
[mlir] Remove more OpBuilder args which are now injected
NFC. Some small changes to make things more consistent but primarily
avoiding old behavior without any further change.
Vedant Kumar [Tue, 29 Sep 2020 23:32:06 +0000 (16:32 -0700)]
[CodeExtractor] Don't create bitcasts when inserting lifetime markers (NFCI)
Lifetime marker intrinsics support any pointer type, so CodeExtractor
does not need to bitcast to `i8*` in order to use these markers.
Richard Smith [Tue, 29 Sep 2020 23:01:25 +0000 (16:01 -0700)]
Fix use of wrong printf format specifier for size_t argument.
This causes a build break under -Werror=format.
Stanislav Mekhanoshin [Tue, 29 Sep 2020 22:32:04 +0000 (15:32 -0700)]
[AMDGPU] Remove SIEncodingFamily.GFX10_B
It turns to be not needed anymore.
Differential Revision: https://reviews.llvm.org/D88520
Richard Smith [Tue, 29 Sep 2020 22:20:11 +0000 (15:20 -0700)]
Recognize setjmp and friends as builtins even if jmp_buf is not declared yet.
This happens in glibc's headers. It's important that we recognize these
functions so that we can mark them as returns_twice.
Differential Revision: https://reviews.llvm.org/D88518
Richard Smith [Fri, 31 Jul 2020 22:03:21 +0000 (15:03 -0700)]
Improve the representation of <compare>'s zero-only type.
* Use an empty struct instead of a member pointer to represent this
type, so that we don't actually pass a zero member pointer at runtime.
* Mark the constructor as consteval to ensure that no code is emitted
for it whenever possible.
* Add a honeypot constructor to reject all non-int arguments, so that
the only argument that can arrive at the real constructor is the
literal 0.
This results in better generated code, and rejecting invalid comparisons
against nullptr, 0L, and so on, while also rejecting invalid comparisons
against (1-1) and similar that would be allowed if we required an
integer constant expression with value 0.
Differential Revision: https://reviews.llvm.org/D85051
JonChesterfield [Tue, 29 Sep 2020 22:11:46 +0000 (23:11 +0100)]
[nfc][libomptarget] Drop parameter to named_sync
[nfc][libomptarget] Drop parameter to named_sync
named_sync has one call site (in sync.cu) where it always passed L1_BARRIER.
Folding this into the call site and dropping the macro is a simplification.
amdgpu doesn't have ptx' bar.sync instruction. A correct implementation of
__kmpc_impl_named_sync in terms of shared memory is much easier if it can
assume that the barrier argument is this constant. Said implementation is left
for a second patch.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D88474
Michael Kruse [Tue, 29 Sep 2020 21:57:05 +0000 (16:57 -0500)]
[flang][msvc] Define access flags under Windows. NFC.
The flags F_OK, R_OK and W_OK are defined in unistd.h, which does not exist under the Windows platform. Windows still defines the `access` function. Its access flags are documented at https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess. For compatibility, define the flags F_OK, R_OK and W_OK using these constants.
This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D88508
Michael Kruse [Tue, 29 Sep 2020 21:30:07 +0000 (16:30 -0500)]
[flang][msvc] Define implicit conversion from UnsignedInt128 to int64_t.
The custom implementation of UnsignedInt128 has an implicit conversion operator to unit64_t, but not int64_t. Considering that the former is already truncating, and C++ implicitly converts uint64_t to int64_t, UnsignedInt128 should also support an implicit conversion to int64_t. An analogous conversion would be from uint32_t to int16_t.
Without the conversion operator overload, the msvc emits the following error:
```
descriptor-io.h(44): error C2440: 'static_cast': cannot convert from 'A' to 'int64_t'
with
[
A=Fortran::common::uint128_t
]
```
This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D88509
Cameron McInally [Tue, 29 Sep 2020 21:20:33 +0000 (16:20 -0500)]
[SVE] Lower fixed length VECREDUCE_[FMAX|FMIN] to Scalable
Differential Revision: https://reviews.llvm.org/D88444
Eric Astor [Tue, 29 Sep 2020 21:02:18 +0000 (17:02 -0400)]
[ms] [llvm-ml] Create the @feat.00 symbol, and populate it appropriately
@feat.00 is a bitfield read by Microsoft-style linkers, and is required to signal (e.g.) /safeseh support on 32-bit systems.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D88451
Eric Astor [Tue, 29 Sep 2020 21:01:05 +0000 (17:01 -0400)]
[ms] [llvm-ml] Accept whitespace around the dot operator
MASM allows arbitrary whitespace around the Intel dot operator, especially when used for struct field lookup
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D88450
Eric Astor [Tue, 29 Sep 2020 20:59:42 +0000 (16:59 -0400)]
[ms] [llvm-ml] Add support for "alias" directive
Support the "alias" directive.
Required support for emitWeakReference in MCWinCOFFStreamer.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D87403
Eric Astor [Tue, 29 Sep 2020 20:58:39 +0000 (16:58 -0400)]
[ms] [llvm-ml] Add REAL10 support (x87 extended precision)
Add MASM support for 80-bit reals in the x87 extended precision format.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D87402
Eric Astor [Tue, 29 Sep 2020 20:57:25 +0000 (16:57 -0400)]
[ms] [llvm-ml] Add MASM hex float support
Implement MASM's syntax for specifying floats in raw hexadecimal bytes.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D87401
Eric Astor [Tue, 29 Sep 2020 20:17:47 +0000 (16:17 -0400)]
[ms] [llvm-ml] Add support for .radix directive, and accept all radix specifiers
Add support for .radix directive, and radix specifiers [yY] (binary), [oOqQ] (octal), and [tT] (decimal).
Also, when lexing MASM integers, require radix specifier; MASM requires that all literals without a radix specifier be treated as in the default radix. (e.g., 0100 = 100)
Relanding D87400, now with fewer ms-inline-asm tests broken!
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D88337
Tim Shen [Wed, 23 Sep 2020 06:36:08 +0000 (23:36 -0700)]
[MLIR] Avoid adding debuginfo for a function if it contains calls that has no debug info.
Also add a verifier pass to ExecutionEngine.
It's hard to come up with a test case, since mlir-opt always add location info after parsing it (?)
Differential Revision: https://reviews.llvm.org/D88135
Nathan James [Tue, 29 Sep 2020 20:51:14 +0000 (21:51 +0100)]
[clangd] Trivial setter support when moving items to fields
Extend the Trivial setter documentation to support cases where the value is moved into a field using `std::move`.
Reviewed By: sammccall, kadircet
Differential Revision: https://reviews.llvm.org/D88297
Chris Hamilton [Tue, 29 Sep 2020 20:34:46 +0000 (22:34 +0200)]
Revert "[Sema] Address-space sensitive check for unbounded arrays (v2)"
This reverts commit
d9ee935679e7164d1c47e351bbbcf5c25742b59c.
Aaron Ballman [Tue, 29 Sep 2020 20:27:51 +0000 (16:27 -0400)]
Better diagnostics for anonymous bit-fields with attributes or an initializer.
The current C++ grammar allows an anonymous bit-field with an attribute,
but this is ambiguous (the attribute in that case could appertain to the
type instead of the bit-field). The current thinking in the Core Working
Group is that it's better to disallow attributes in that position at the
grammar level so that the ambiguity resolves in favor of applying to the
type.
During discussions about the behavior of the attribute, the Core Working
Group also felt it was better to disallow anonymous bit-fields from
specifying a default member initializer.
This implements both sets of related grammar changes.
Louis Dionne [Tue, 29 Sep 2020 20:28:41 +0000 (16:28 -0400)]
[libc++] Rename the -fno-rtti Lit feature to just no-rtti
This is consistent to the way we name other Lit features, and it removes
the possibility for confusing the Lit feature with the actual compiler
flag.
Jonas Devlieghere [Tue, 29 Sep 2020 20:26:09 +0000 (13:26 -0700)]
[lldb] Hoist --server argument out of LLDB_TEST_COMMON_ARGS (NFC)
Give the server argument its own variable (LLDB_TEST_SERVER) so that we
can configure it in lit.site.cfg.py if we so desire.
Louis Dionne [Tue, 29 Sep 2020 20:21:20 +0000 (16:21 -0400)]
[libc++] Fix some test failures in unusual configurations
Mehdi Amini [Tue, 29 Sep 2020 20:19:23 +0000 (20:19 +0000)]
Fix TODO in the mlir-cpu-runner/bare_ptr_call_conv.mlir test: call ops in bare-ptr calling convention is supported now (NFC)
This was fixed in
a89fc12653c.
Walter Erquinigo [Tue, 29 Sep 2020 20:08:22 +0000 (13:08 -0700)]
[trace] Fix destructor declaration
The destructor must be defined in the implementation class so that it
can be called, as Vedant Kumar pointed out in:
'''
What were your thoughts, re:
+class Trace : public PluginInterface {
+public:
+ ~Trace() override = default;
Does this need to be `virtual ~Trace() = ...`?
Otherwise, when a std::shared_ptr<Trace> is destroyed, the
destructor for the derived TraceIntelPT instance won't run.
'''
Louis Dionne [Thu, 24 Sep 2020 15:45:55 +0000 (11:45 -0400)]
[libc++][ci] Turn on Phabricator reporting by default
Dave Lee [Tue, 29 Sep 2020 19:50:38 +0000 (12:50 -0700)]
[lldb/docs] Remove manual codesigning documentation
The `macos-setup-codesign.sh` script has been in place for over two years. If there are no known issues, it's a good time to drop the manual steps from the docs.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D88257
Louis Dionne [Tue, 29 Sep 2020 19:29:11 +0000 (15:29 -0400)]
[libc++][ci] Improve the phabricator-report script
- Detect whether a build has passed more accurately
- Retry pushing the status to Phabricator
- Allow running on a non-review branch
Louis Dionne [Tue, 29 Sep 2020 19:30:42 +0000 (15:30 -0400)]
[libc++][ci] Add a script to describe when to trigger libc++ CI builds
Sanjay Patel [Tue, 29 Sep 2020 19:25:04 +0000 (15:25 -0400)]
[InstCombine] ease alignment restriction for converting masked load to normal load
I think we initially made this fold conservative to be safer, but we do not
need the alignment attribute/metadata limitation because the masked load
intrinsic itself specifies the alignment. A normal vector load is better for
IR transforms and should be no worse in codegen than the masked alternative.
If it is worse for some target, the backend can reverse this transform.
Differential Revision: https://reviews.llvm.org/D88505
Diego Caballero [Tue, 29 Sep 2020 18:11:27 +0000 (11:11 -0700)]
[mlir] Support return and call ops in bare-ptr calling convention
This patch adds support for the 'return' and 'call' ops to the bare-ptr
calling convention. These changes also align the bare-ptr calling
convention code with the latest changes in the default calling convention
and reduce the amount of customization code needed.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D87724
Nikita Popov [Tue, 29 Sep 2020 18:48:32 +0000 (20:48 +0200)]
[ValueTracking] Early exit known non zero for phis
After D88276 we no longer expect computeKnownBits() to prove
non-zeroness for cases where isKnownNonZero() can't, so don't
fall through to it.
Aaron Ballman [Tue, 29 Sep 2020 19:03:29 +0000 (15:03 -0400)]
Use "default member initializer" instead of "in-class initializer" for diagnostics.
This changes some diagnostics to use terminology from the standard
rather than invented terminology, which improves consistency with other
diagnostics as well. There are no functional changes intended other
than wording and naming.
Zequan Wu [Tue, 29 Sep 2020 18:58:37 +0000 (11:58 -0700)]
[CodeGen] emit CG profile for COFF object file
Differential Revision: https://reviews.llvm.org/D87811
Jim Ingham [Mon, 28 Sep 2020 17:28:29 +0000 (10:28 -0700)]
Revert "Revert "Add the ability to write target stop-hooks using the ScriptInterpreter.""
This reverts commit
f775fe59640a2e837ad059a8f40e26989d4f9831.
I fixed a return type error in the original patch that was causing a test failure.
Also added a REQUIRES: python to the shell test so we'll skip this for
people who build lldb w/o Python.
Also added another test for the error printing.
Kadir Cetinkaya [Tue, 29 Sep 2020 18:06:47 +0000 (20:06 +0200)]
[clangd] Fix assertion in remote-index marshalling
convert_to_slash is a no-op on posix style.
Eugene Zhulenev [Tue, 29 Sep 2020 05:47:00 +0000 (22:47 -0700)]
[MLIR] Add Async dialect with trivial async.region operation
Start Async dialect for modeling asynchronous execution.
Reviewed By: mehdi_amini, herhut
Differential Revision: https://reviews.llvm.org/D88459
LLVM GN Syncbot [Tue, 29 Sep 2020 17:50:16 +0000 (17:50 +0000)]
[gn build] Port
6d193ba3337
Stella Laurenzo [Mon, 28 Sep 2020 16:08:09 +0000 (09:08 -0700)]
Adds MLIR C-API for marshaling Python capsules.
* Providing stable, C-accessible definitions for bridging MLIR Python<->C APIs, we eliminate inter-extension dependencies (i.e. they can all share a diamond dependency on the MLIR C-API).
* Just provides accessors for context and module right now.
* Needed in NPComp in ~a week or so for high level Torch APIs.
Differential Revision: https://reviews.llvm.org/D88426
Mircea Trofin [Mon, 28 Sep 2020 23:41:28 +0000 (16:41 -0700)]
[NFC][regalloc] Unit test for AllocationOrder iteration.
Added unittests. In the process, separated core construction - which just
needs the hits, order, and 'HardHints' values - from construction from
current register allocation state, to simplify testing.
Differential Revision: https://reviews.llvm.org/D88455
Fangrui Song [Tue, 29 Sep 2020 17:38:51 +0000 (10:38 -0700)]
Add -fprofile-update={atomic,prefer-atomic,single}
GCC 7 introduced -fprofile-update={atomic,prefer-atomic} (prefer-atomic is for
best efforts (some targets do not support atomics)) to increment counters
atomically, which is exactly what we have done with -fprofile-instr-generate
(D50867) and -fprofile-arcs (
b5ef137c11b1cc6ae839ee75b49233825772bdd0).
This patch adds the option to clang to surface the internal options at driver level.
GCC 7 also turned on -fprofile-update=prefer-atomic when -pthread is specified,
but it has performance regression
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89307). So we don't follow suit.
Differential Revision: https://reviews.llvm.org/D87737
Sanjay Patel [Tue, 29 Sep 2020 17:29:34 +0000 (13:29 -0400)]
[InstCombine] adjust duplicate test for masked load; NFC
The test after the changed test was checking exactly the same dereferenceable bytes.