Vitaly Buka [Thu, 2 Apr 2020 04:56:22 +0000 (21:56 -0700)]
[openmp] Disable tests flaky on Debian
https://bugs.llvm.org/show_bug.cgi?id=45397
Johannes Doerfert [Thu, 2 Apr 2020 03:22:13 +0000 (22:22 -0500)]
[CUDA][NFC] Split math.h functions out of __clang_cuda_device_functions.h
This is not supported to change anything but allow us to reuse the math
functions separately from the device functions, e.g., source them at
different times. This will be used by the OpenMP overlay.
This also adds two `return` keywords that were missing.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D77238
Igor Kudrin [Tue, 31 Mar 2020 10:36:23 +0000 (17:36 +0700)]
[LLD][ELF] Follow the common pattern in a message about an undefined vtable symbol.
In most cases, LLD prints its multiline diagnostic messages starting
additional lines with ">>> ". That greatly helps external tools to parse
the output, simplifying combining several lines of the log back into one
message. The patch fixes the only message I found that does not follow
the common pattern.
Differential Revision: https://reviews.llvm.org/D77132
Ed Maste [Thu, 2 Apr 2020 03:57:16 +0000 (23:57 -0400)]
Correct copy-pasteo in lua script language description
Serguei Katkov [Tue, 31 Mar 2020 05:07:11 +0000 (12:07 +0700)]
[DOC] Remove too strong restriction for ‘llvm.experimental.gc.statepoint’ Intrinsic
The requirement for deopt parameter to be in gc parameter if it can
be modified by GC is very strong and difficult to follow.
The key example of why this can't work:
%p1 = bitcast i8* %p to i8*
statepoint [gc = (%p1)], [deopt = (%p1)]
The optimizer is allowed to replace either use (or both) of %p1 with %p.
If it updates only one of the two (entirely legal), the two sets do not overlap.
So this change removes the strong wording.
Reviewers: reames, dantrushin
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D77122
Nathan Lanza [Tue, 31 Mar 2020 00:22:52 +0000 (20:22 -0400)]
[cmake] Only set deps for an ExternalProject if the type is executable or library
Summary:
cmake fails with an error when attempting to evaluate $<TARGET_FILE:tgt>
where `tgt` is defined via an `add_custom_target` and thus the `TYPE`
is `UTILITY`. Requesting a TARGET_FILE only works on an `EXECUTABLE`
or one of a few differetnt types of `X_LIBRARY` (e.g. added via
`add_library` or `add_executable`). The logic as implemented in cmake
is below:
enum TargetType
{
EXECUTABLE,
STATIC_LIBRARY,
SHARED_LIBRARY,
MODULE_LIBRARY,
OBJECT_LIBRARY,
UTILITY,
GLOBAL_TARGET,
INTERFACE_LIBRARY,
UNKNOWN_LIBRARY
};
if (target->GetType() >= cmStateEnums::OBJECT_LIBRARY &&
target->GetType() != cmStateEnums::UNKNOWN_LIBRARY) {
::reportError(context, content->GetOriginalExpression(),
"Target \"" + name +
"\" is not an executable or library.");
return nullptr;
}
This has always been the case back to at least 3.12 (furthest I
checked) but this is causing a new failure in cmake 3.17 while
evaluating ExternalProjectAdd.
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77284
Johannes Doerfert [Thu, 2 Apr 2020 03:05:24 +0000 (22:05 -0500)]
[Attributor] Use the proper context instruction in genericValueTraversal
There was a TODO in genericValueTraversal to provide the context
instruction and due to the lack of it users that wanted one just used
something available. Unfortunately, using a fixed instruction is wrong
in the presence of PHIs so we need to update the context instruction
properly.
Reviewed By: uenoku
Differential Revision: https://reviews.llvm.org/D76870
Johannes Doerfert [Mon, 23 Mar 2020 06:11:39 +0000 (01:11 -0500)]
[Attributor][FIX] Do not compute ranges for arguments of declarations
This cannot be triggered right now, as far as I know, but it doesn't
make sense to deduce a constant range on arguments of declarations.
Exposed during testing of AAValueSimplify extensions.
Johannes Doerfert [Thu, 2 Apr 2020 02:54:46 +0000 (21:54 -0500)]
[Utils][FIX] Properly deal with occasionally deleted functions
While D68850 allowed functions to be deleted I accidentally saved some
version of the function to be used once a suitable prefix was found.
This turned out to be problematic when the occasionally deleted function
is also occasionally modified. The test case is adjusted to resemble the
case in which the problem was found.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D76586
Johannes Doerfert [Tue, 17 Mar 2020 01:18:07 +0000 (20:18 -0500)]
[Attributor][NFC] Predetermine the module
It could happen that we delete the first function in the SCC in the
future so we should be careful accessing `Functions` after the manifest
stage.
Johannes Doerfert [Thu, 2 Apr 2020 02:46:03 +0000 (21:46 -0500)]
[Attributor] Derive better alignment for accessed pointers
Use DL & ABI information for better alignment deduction, e.g., if a type
is accessed and the ABI specifies an alignment requirement for such an
access we can use it. This is based on a patch by @lebedev.ri and
inspired by getBaseAlign in Loads.cpp.
Depends on D76673.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D76674
Nico Weber [Thu, 2 Apr 2020 02:46:09 +0000 (22:46 -0400)]
Revert "[ORC] Export __cxa_atexit from the main JITDylib in LLJIT."
This reverts commit
0071eaaf0892d7ef733578312abefdcf84311071.
Inputs/noop-main.ll wasn't checked in, so this breaks check-llvm
everywhere.
Johannes Doerfert [Thu, 2 Apr 2020 02:07:41 +0000 (21:07 -0500)]
[Attributor][FIX] Prevent alignment breakage wrt. must-tail calls
If we have a must-tail call the callee and caller need to have matching
ABIs. Part of that is alignment which we might modify when we deduce
alignment of arguments of either. Since we would need to keep them in
sync, which is not as simple, we simply avoid deducing alignment for
arguments of the must-tail caller or callee.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D76673
Johannes Doerfert [Tue, 24 Mar 2020 07:30:32 +0000 (02:30 -0500)]
[Attributor][NFC] Cleanup leftover check lines
Yaxun (Sam) Liu [Fri, 27 Mar 2020 16:38:20 +0000 (12:38 -0400)]
Fix infinite recursion in deferred diag emitter
Currently deferred diagnostic emitter checks variable decl in DeclRefExpr, which
causes infinite recursion for cases like long a = (long)&a;.
Deferred diagnostic emitter does not need check variable decls in DeclRefExpr
since reference of a variable does not cause emission of functions directly or
indirectly. Therefore there is no need to check variable decls in DeclRefExpr.
Differential Revision: https://reviews.llvm.org/D76937
Louis Dionne [Wed, 1 Apr 2020 22:48:22 +0000 (18:48 -0400)]
[libc++] Execute tests from the Lit execution root instead of the test tree
Instead of executing tests from within the libc++ test suite, we execute
them from the Lit execution directory. However, since some tests have
file dependencies, we must copy those dependencies to the execution
directory where they are executed.
This has the major benefit that if a test modifies a file (whether it
is wanted or not), other tests will not see those modifications. This
is good because current tests assume that input data is never modified,
however this could be an incorrect assumption if some test does not
behave properly.
Louis Dionne [Wed, 1 Apr 2020 23:51:37 +0000 (19:51 -0400)]
[libc++] Add missing FILE_DEPENDENCIES markup
Lang Hames [Wed, 1 Apr 2020 22:28:28 +0000 (15:28 -0700)]
[ORC] Export __cxa_atexit from the main JITDylib in LLJIT.
Failure to export __cxa_atexit can lead to an attempt to import a definition
from the process itself (if __cxa_atexit is referenced from another JITDylib),
but the process definition will clash with the existing non-exported definition
to produce an unexpected DuplicateDefinitionError.
This patch fixes the immediate issue by exporting __cxa_atexit. It also fixes a
bug where atexit functions in other JITDylibs were not being run by adding a
copy of run_atexits_helper to every JITDylib.
A follow up patch will deal with the bug where definition generators are called
despite a non-exported definition being present.
Adrian Prantl [Thu, 2 Apr 2020 01:58:11 +0000 (18:58 -0700)]
Revert "Preserve the owning module information from DWARF in the synthesized AST"
This reverts commit
4354dfbdf5c8510a7ddff10ae67a28e16cf7cc79 while investigating bot fallout.
Johannes Doerfert [Thu, 2 Apr 2020 01:41:35 +0000 (20:41 -0500)]
[Attributor][NFC] Use a BumpPtrAllocator to allocate `AbstractAttribute`s
We create a lot of AbstractAttributes and they live as long as
the Attributor does. It seems reasonable to allocate them via a
BumpPtrAllocator owned by the Attributor.
Reviewed By: baziotis
Differential Revision: https://reviews.llvm.org/D76589
Johannes Doerfert [Thu, 2 Apr 2020 01:40:14 +0000 (20:40 -0500)]
[LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects
We already mention that `noalias` is modeled after the C99 `restrict`
qualifier but we did omit one important requirement in the description.
For the restrict guarantees the object affected has to be modified
during the execution of the function, in any way (see 6.7.3.1.4 in [0]).
There are two reasons we want this restriction as well:
1) To match the `restrict` semantics when we lower it to `noalias`.
2) To allow the reasoning that the object pointed to by a `noalias`
pointer is not modified through means not derived from this
pointer. Hence, following the uses of that pointer is sufficient
to determine potential modifications.
The discussion on this came up as part of D73428. In that patch the
Attributor is taught to derive `noalias` for call site arguments based
on alias queries against objects that are accessed in the callee. This
is possible even if the pointer passed at the call site was "not-`noalias`".
To simplify the logic there *and* to allow the use of `noalias` as
described in 2) above, it is beneficial to follow the C `restrict`
semantics in cases where there might be "read-read-aliases". Note that
AliasAnalysis* queries for read only objects already result in
`NoAlias` even if the pointers might "alias".
* From this point of view our Alias Analysis is basically a Dependence
Analysis.
[0] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D74935
Adrian Prantl [Wed, 4 Mar 2020 17:30:12 +0000 (09:30 -0800)]
Preserve the owning module information from DWARF in the synthesized AST
Types that came from a Clang module are nested in DW_TAG_module tags
in DWARF. This patch recreates the Clang module hierarchy in LLDB and
sets the owning module information accordingly. My primary motivation
is to facilitate looking up per-module APINotes for individual
declarations, but this likely also has other applications.
rdar://problem/
59634380
Differential Revision: https://reviews.llvm.org/D75488
Adrian Prantl [Tue, 17 Mar 2020 19:51:58 +0000 (12:51 -0700)]
Remove const qualifier from Modules returned by ExternalASTSource. (NFC)
This API is used by LLDB to attach owning module information to
Declarations deserialized from DWARF.
Differential Revision: https://reviews.llvm.org/D75561
zoecarver [Wed, 1 Apr 2020 23:56:12 +0000 (16:56 -0700)]
[libcxx] Stop using builtin type traits for is_floating_point and is_arithmetic.
Based on an issue brought up in https://reviews.llvm.org/D67900, this commit reverts the changes to is_floating_point and is_arithmetic made in D67900.
After D67900 landed, __float128 behaved differently in those two type traits, causing compiler errors in numeric limits (and possibly others).
Sam Clegg [Wed, 1 Apr 2020 04:45:57 +0000 (21:45 -0700)]
[WebAssembly] EmscriptenEHSjLj: Mark __invoke_ functions as imported
This means the linker will be expect them be undefined at link time an
will generate imports from the `env` module rather than reporting
undefined externals.
Differential Revision: https://reviews.llvm.org/D77192
Vedant Kumar [Mon, 10 Feb 2020 22:35:00 +0000 (14:35 -0800)]
Reapply: [Host.mm] Check for the right macro instead of inlining it
Previously, this was reverted in
bf65f19b becuase it checked whether
TARGET_OS_EMBEDDED is defined, but that macro is always defined.
Update the condition to check that TARGET_OS_OSX is true.
Uday Bondhugula [Wed, 1 Apr 2020 21:04:15 +0000 (02:34 +0530)]
[MLIR][NFC] drop unnecessary matches in affine dma generate test case
Drop unnecessary matches in affine DMA generate test case.
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77243
Uday Bondhugula [Wed, 1 Apr 2020 19:58:09 +0000 (01:28 +0530)]
[MLIR] Add method to drop duplicate result exprs from AffineMap
Add a method that given an affine map returns another with just its unique
results. Use this to drop redundant bounds in max/min for affine.for. Update
affine.for's canonicalization pattern and createCanonicalizedForOp to use
this.
Differential Revision: https://reviews.llvm.org/D77237
River Riddle [Wed, 1 Apr 2020 21:00:49 +0000 (14:00 -0700)]
[mlir] Move LLVMPassIncGen to LLVMIR/Transforms/CMakeLists.txt
This fixes a build error with the make generator for a missing
sub-directory.
Walter Erquinigo [Wed, 1 Apr 2020 21:08:19 +0000 (14:08 -0700)]
Revert "[intel-pt] Implement a basic test case"
This reverts commit
c911cc6c49394909a335c8d7baffcfd8bdcc424b.
Walter Erquinigo [Tue, 31 Mar 2020 00:26:58 +0000 (17:26 -0700)]
[intel-pt] Implement a basic test case
Summary:
Depends on D76872.
There was no test for the Intel PT support on LLDB, so I'm creating one, which
will help making progress on solid grounds.
The test is skipped if the Intel PT plugin library is not built.
Reviewers: clayborg, labath, kusmour, aadsm
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D77107
Louis Dionne [Wed, 1 Apr 2020 18:52:12 +0000 (14:52 -0400)]
[libc++] SSH: Create a tarball of dependencies and scp that instead
The benefit of doing this is that we can now handle directories that
contain symlinks and other arbitrary things, such as the static_test_env
required by filesystem tests.
As a fly-by fix, we also accumulate several commands to perform over SSH
and execute them at once instead of SSHing several times. This should be
faster on average.
Walter Erquinigo [Wed, 1 Apr 2020 20:27:13 +0000 (13:27 -0700)]
Revert "[intel-pt] Implement a basic test case"
This reverts commit
f1242ec54306c5fbdc9a907e936be899a0ad21ee.
Aaron Ballman [Wed, 1 Apr 2020 20:19:25 +0000 (16:19 -0400)]
Updating the documentation for the noescape attribute.
A question came up from a glibc maintainer as to whether it was permissible to
free a pointer marked [[clang::noescape]], and after investigation, I
determined that this is allowed. This updates the documentation in case others
have the same question.
David Blaikie [Wed, 1 Apr 2020 20:00:12 +0000 (13:00 -0700)]
DebugInfo: Defaulted non-type template parameters of bool type
Caused an assertion due to mismatched bit widths - this seems like the
right API to use for a possibly width-varying equality test. Though
certainly open to some post-commit review feedback if there's a more
suitable way to do this comparison/test.
Walter Erquinigo [Tue, 31 Mar 2020 00:26:58 +0000 (17:26 -0700)]
[intel-pt] Implement a basic test case
Summary:
Depends on D76872.
There was no test for the Intel PT support on LLDB, so I'm creating one, which
will help making progress on solid grounds.
The test is skipped if the Intel PT plugin library is not built.
Reviewers: clayborg, labath, kusmour, aadsm
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D77107
Walter Erquinigo [Wed, 1 Apr 2020 00:08:40 +0000 (17:08 -0700)]
[source maps] Ensure all valid source maps are added instead of failing with the first invalid one
Summary:
Several lldb-vscode users have noticed that when a source map rule is invalid (because a folder doesn't exist anymore), the rest of the source maps from their configurations are not applied.
This happens because lldb-vscode executes a single "settings set target.source-map" command with all the source maps and LLDB processes them one by one until one fails.
Instead of doing this, we can process in LLDB all the source map rules and apply the valid ones instead of failing fast.
Reviewers: clayborg, labath, kusmour, aadsm
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D77186
Daniel Sanders [Wed, 1 Apr 2020 19:42:23 +0000 (12:42 -0700)]
[globalisel][legalizer] Fix DebugLoc bugs caught by a prototype lost-location verifier
The legalizer has a tendency to lose DebugLoc's when expanding or
combining instructions. The verifier that detected these isn't ready
for upstreaming yet but this patch fixes the cases that came up when
applying it to our out-of-tree backend's CodeGen tests.
This pattern comes up a few more times in this file and probably in
the backends too but I'd prefer to fix the others separately (and
preferably when the lost-location verifier detects them).
Lang Hames [Wed, 1 Apr 2020 18:36:36 +0000 (11:36 -0700)]
[ORC] Don't require a null-terminator on MemoryBuffers for objects in archives.
The MemoryBuffer::getMemBuffer method's RequiresNullTerminator parameter
defaults to true, but object files are not null terminated so we need to
explicitly pass false here.
Lang Hames [Wed, 1 Apr 2020 17:16:14 +0000 (10:16 -0700)]
[ORC] Add JITDylib name to debugging output when defining symbols.
Alex Brachet [Wed, 1 Apr 2020 19:07:49 +0000 (15:07 -0400)]
[libc] Add sigfillset and sigdelset
Summary: Add's `sigfillset` and `sigdelset` which will be used in D76676.
Reviewers: sivachandra, PaulkaToast
Reviewed By: sivachandra
Subscribers: mgorny, MaskRay, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D76936
Sanjay Patel [Wed, 1 Apr 2020 18:32:13 +0000 (14:32 -0400)]
[InstCombine] enhance freelyNegateValue() by handling xor
Negation is equivalent to bitwise-not + 1, so try to convert more
subtracts into adds using this relationship:
0 - (A ^ C) => ((A ^ C) ^ -1) + 1 => A ^ ~C + 1
I doubt this will recover the regression noted in rGf2fbdf76d8d0,
but seems like we're going to need to improve here and/or revive D68408?
Alive2 proofs:
http://volta.cs.utah.edu:8080/z/Re5tMU
http://volta.cs.utah.edu:8080/z/An-uns
Differential Revision: https://reviews.llvm.org/D77230
Sanjay Patel [Wed, 1 Apr 2020 16:00:22 +0000 (12:00 -0400)]
[InstCombine] add tests for negate with xor operand; NFC
Alexey Bataev [Wed, 1 Apr 2020 18:53:19 +0000 (14:53 -0400)]
Revert "[OPENMP50]Add initial support for OpenMP 5.0 iterator."
This reverts commit
f08df464ae89972a777c0a7e299a2c153a9829d8 to fix the
bug with serialization support for iterator expression.
Jonathan Roelofs [Tue, 31 Mar 2020 19:11:19 +0000 (13:11 -0600)]
Fix PR45371: SeparateConstOffsetFromGEP clean up bookkeeping
find() was altering the UserChain, even in cases where it subsequently
discovered that the resulting constant was a 0. This confuses
rebuildWithoutConstOffset() when it attempts to walk the chain later, since it
is expected that the chain itself be a path down the use-def edges of an
expression.
Nikita Popov [Wed, 1 Apr 2020 18:10:11 +0000 (20:10 +0200)]
Revert "[InstCombine] Erase old instruction when replacing extractelements"
This reverts commit
d40368fdb5e1b90e68b1078f32c283aa800238be.
llvm-clang-x86_64-expensive-checks-debian failure looks related.
Nikita Popov [Sun, 29 Mar 2020 17:10:19 +0000 (19:10 +0200)]
[SimplifyLibCalls] Erase replaced instructions
After RAUWing an instruction, also erase it. This makes sure we
don't perform extra InstCombine iterations to clean up the garbage.
Uday Bondhugula [Sat, 28 Mar 2020 07:33:06 +0000 (13:03 +0530)]
[NewGVN] Make NewGVN aware of aligned_alloc
Make the New GVN pass aware of aligned_alloc.
Depends on D76975.
Differential Revision: https://reviews.llvm.org/D76976
Uday Bondhugula [Sat, 28 Mar 2020 07:27:35 +0000 (12:57 +0530)]
[GVN] Make GVN aware of aligned_alloc
Make the GVN pass aware of aligned_alloc.
Depends on D76974.
Differential Revision: https://reviews.llvm.org/D76975
Uday Bondhugula [Sat, 28 Mar 2020 07:15:59 +0000 (12:45 +0530)]
[Attributor] Make attributor aware of aligned_alloc for heap to stack conversion
Make the attributor pass aware of aligned_alloc for converting heap
allocations to stack ones.
Depends on D76971.
Differential Revision: https://reviews.llvm.org/D76974
Nikita Popov [Mon, 30 Mar 2020 20:05:34 +0000 (22:05 +0200)]
[InstCombine] Erase old instruction when replacing extractelements
As we are not returning the result of replaceInstUsesWith(),
so we need to clean up ourselves.
NFC apart from worklist order.
Nikita Popov [Mon, 30 Mar 2020 20:00:16 +0000 (22:00 +0200)]
[InstCombine] Use replaceOperand() in div transforms
To make sure the old operand is DCEd.
NFC apart from worklist order.
Matt Arsenault [Wed, 1 Apr 2020 17:48:11 +0000 (13:48 -0400)]
AMDGPU: Fix broken check lines
Nicolas Vasilache [Wed, 1 Apr 2020 17:41:45 +0000 (13:41 -0400)]
[mlir][Linalg][Doc] Minor doc fixes
Mehdi Amini [Wed, 1 Apr 2020 17:19:26 +0000 (17:19 +0000)]
Remove linking all targets from `mlir-opt` (NFC)
There is no need to directly depends on this from mlir-opt, some library
may transitively depend on a subset of the targets when enabled (like
NVPTX for Cuda codegen tests) but this is handled by CMake already.
Mehdi Amini [Wed, 1 Apr 2020 17:09:44 +0000 (17:09 +0000)]
Add LLVM_ATTRIBUTE_UNUSED to function used only in assert (NFC)
Uday Bondhugula [Wed, 1 Apr 2020 06:44:47 +0000 (12:14 +0530)]
[MLIR][NFC] clean up affine data copy test case
Capture maps to test better; drop unnecessary matches
Differential Revision: https://reviews.llvm.org/D77196
Uday Bondhugula [Tue, 31 Mar 2020 21:04:04 +0000 (02:34 +0530)]
[MLIR][NFC] loop transforms/analyis utils cleanup / modernize
Modernize/cleanup code in loop transforms utils - a lot of this code was
written prior to the currently available IR support / code style. This
patch also does some variable renames including inst -> op, comment
updates, turns getCleanupLoopLowerBound into a local function.
Differential Revision: https://reviews.llvm.org/D77175
Vedant Kumar [Tue, 31 Mar 2020 17:52:51 +0000 (10:52 -0700)]
[llvm-locstats] Fix labels on x-axis of comparison chart
Summary:
This change makes the labels on the x-axis of a comparison chart look
like: "0%", "(0%, 10%)", "[10%, 20%)", and so on.
Previously, each label was the same (a concatenation of all the possible
coverage buckets).
Reviewers: djtodoro
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77155
Matt Arsenault [Wed, 1 Apr 2020 17:00:55 +0000 (13:00 -0400)]
AMDGPU/GlobalISel: Switch test to checking final ISA
The naming convention is for unprefixed .ll tests to check the final
ISA instructions.
Matt Arsenault [Mon, 30 Mar 2020 19:24:35 +0000 (15:24 -0400)]
AMDGPU/GlobalISel: Change intrinsic ID for _L to _LZ opt
Still should handle the other case changes the opcode this way.
Alexey Bataev [Tue, 18 Feb 2020 15:22:23 +0000 (10:22 -0500)]
[OPENMP50]Add initial support for OpenMP 5.0 iterator.
Added basic parsing/semantic analysis/(de)serialization support for
iterator expression introduced in OpenMP 5.0.
Thomas Lively [Wed, 1 Apr 2020 00:09:08 +0000 (17:09 -0700)]
[WebAssembly] Rename SIMD min/max/avgr intrinsics for consistency
Summary:
The convention for the wasm_simd128.h intrinsics is to have the
integer sign in the lane interpretation rather than as a suffix. This
PR changes the names of the integer min, max, and avgr intrinsics to
match this convention.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77185
Matt Arsenault [Fri, 27 Mar 2020 18:51:29 +0000 (14:51 -0400)]
HIP: Link correct denormal mode library
This wasn't respecting the flush mode based on the default, and also
wasn't correctly handling the explicit
-fno-cuda-flush-denormals-to-zero overriding the mode.
Matt Arsenault [Wed, 1 Apr 2020 15:28:07 +0000 (11:28 -0400)]
AMDGPU: Fix consistently backwards logic for default denormal mode
I forgot to squash this into
c9d65a48af1d7bbfed7e785613cc9d9acf71821b
MaheshRavishankar [Wed, 1 Apr 2020 16:32:41 +0000 (09:32 -0700)]
[mlir] Modify GPU to SPIR-V conversion to respect
spv.interface_var_abi attributes if it exists already.
Differential Revision: https://reviews.llvm.org/D77195
Louis Dionne [Wed, 1 Apr 2020 16:32:14 +0000 (12:32 -0400)]
[libc++] SSH: Use -p when scp'ing to preserve modes and modification times
Kazuaki Ishizaki [Wed, 1 Apr 2020 16:21:08 +0000 (01:21 +0900)]
[lld] NFC: fix trivial typos in comments
Differential Revision: https://reviews.llvm.org/D72339
Arnold Schwaighofer [Mon, 30 Mar 2020 18:11:19 +0000 (11:11 -0700)]
[clang] CodeGen: Make getOrEmitProtocol public for Swift
Summary:
Swift would like to use clang's apis to emit protocol declarations.
This commits adds the public API:
```
emitObjCProtocolObject(CodeGenModule &CGM, const ObjCProtocolDecl *p);
```
rdar://
60888524
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77077
Louis Dionne [Wed, 1 Apr 2020 15:07:48 +0000 (11:07 -0400)]
[libc++] SSH: Properly handle test-executables that are not the first argument
If a ShTest has for example another command in front of the test
executable it wants to execute, ssh.py needs to properly translate
the path of that test executable to the executable on the remote host.
For example, running '%{exec} ! %t.exe', we can't assume that the
test-executable is the first argument after '%{exec}'.
Fangrui Song [Sat, 28 Mar 2020 18:01:37 +0000 (11:01 -0700)]
[ELF] Propagate LMA offset to sections with neither AT() nor AT>
Fixes https://bugs.llvm.org/show_bug.cgi?id=45313
Also fixes linkerscript/{at4.s,overlay.test} LMA address issues exposed by
011b785505b1f6d315a93fd0a0409576ad8d1805.
Related: D74297
This patch improves emulation of GNU ld's heuristics on the difference
between the LMA and the VMA:
https://sourceware.org/binutils/docs/ld/Output-Section-LMA.html#Output-Section-LMA
New test linkerscript/lma-offset.s (based on at4.s) demonstrates some behaviors.
Reviewed By: psmith
Differential Revision: https://reviews.llvm.org/D76995
Artem Dergachev [Wed, 1 Apr 2020 15:15:00 +0000 (18:15 +0300)]
[analyzer] RetainCountChecker: Add a suppression for OSSymbols.
OSSymbol objects are particular XNU OSObjects that aren't really
reference-counted. Therefore you cannot do any harm by over- or
under-releasing them.
Heejin Ahn [Mon, 30 Mar 2020 10:42:40 +0000 (03:42 -0700)]
[WebAssembly] Fix subregion relationship in CFGSort
Summary:
The previous code for determining the innermost region in CFGSort was
not correct. We determine subregion relationship by domination of their
headers, i.e., if region A's header dominates region B's header, B is a
subregion of A. Previously we assumed that if a BB belongs to both a
loop and an exception, the region with fewer number of BBs is the
innermost one. This may not be true, because while WebAssemblyException
contains BBs in all its subregions (loops or exceptions), MachineLoop
may not, because MachineLoop does not contain BBs that don't have a path
to its header even if they are dominated by its header.
Loop header <---|
| |
Exception header |
| \ |
A B |
| \ |
| C |
| |
Loop latch |
| |
-------------|
For example, in this CFG, the loop does not contain B and C, because
they don't have a path back to the loops header. But for CFGSort we
consider the exception here belongs to the loop and the exception should
be a subregion of the loop and scheduled together.
So here we should use `WE->contains(ML->getHeader())` (but not
`ML->contains(WE->getHeader())`, for the stated region above).
This also fixes some comments and deletes `Regions` vector in
`RegionInfo` class, which was not used anywere.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77181
Fangrui Song [Sat, 28 Mar 2020 22:48:38 +0000 (15:48 -0700)]
[ELF] Print symbols with non-default versions for better "undefined symbol" diagnostics
When reporting an "undefined symbol" diagnostic:
* We don't print @ for the reference.
* We don't print @ or @@ for the definition. https://bugs.llvm.org/show_bug.cgi?id=45318
This can lead to confusing diagnostics:
```
// foo may be foo@v2
ld.lld: error: undefined symbol: foo
>>> referenced by t1.o:(.text+0x1)
// foo may be foo@v1 or foo@@v1
>>> did you mean: foo
>>> defined in: t.so
```
There are 2 ways a symbol in symtab may get truncated:
* A @@ definition may be truncated *early* by SymbolTable::insert().
The name ends with a '\0'.
* A @ definition/reference may be truncated *later* by Symbol::parseSymbolVersion().
The name ends with a '@'.
This patch detects the second case and improves the diagnostics. The first case is
not improved but the second case is sufficient to make diagnostics not confusing.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D76999
Georgii Rymar [Wed, 25 Mar 2020 14:30:55 +0000 (17:30 +0300)]
[llvm-readobj] - Do not crash when SHT_HASH table is broken.
We have scenarios when the logic of --elf-hash-histogram/--hash-symbols/--hash-table
options might crash when given a broken hash table.
This patch adds pre-checks for tables for these 3 options
and provides test cases.
Differential revision: https://reviews.llvm.org/D77147
Sylvestre Ledru [Wed, 1 Apr 2020 11:58:15 +0000 (13:58 +0200)]
clagn-tidy/doc: Add a link to readability-static-accessed-through-instance from readability-convert-member-functions-to-static
Louis Dionne [Wed, 1 Apr 2020 14:21:31 +0000 (10:21 -0400)]
[libc++] Handle SSH errors more gracefully and make sure we clean up the tmp directory
Jessica Clarke [Wed, 1 Apr 2020 14:50:47 +0000 (15:50 +0100)]
[LegalizeTypes][RISCV] Correctly sign-extend comparison for ATOMIC_CMP_XCHG
Summary:
Currently, the comparison argument used for ATOMIC_CMP_XCHG is legalised
with GetPromotedInteger, which leaves the upper bits of the value
undefind. Since this is used for comparing in an LR/SC loop with a
full-width comparison, we must sign extend it. We introduce a new
getExtendForAtomicCmpSwapArg to complement getExtendForAtomicOps, since
many targets have compare-and-swap instructions (or pseudos) that
correctly handle an any-extend input, and the existing function
determines the extension of the result, whereas we are concerned with
the input.
This is related to https://reviews.llvm.org/D58829, which solved the
issue for ATOMIC_CMP_SWAP_WITH_SUCCESS, but not the simpler
ATOMIC_CMP_SWAP.
Reviewers: asb, lenary, efriedma
Reviewed By: asb
Subscribers: arichardson, hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, jfb, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, evandro, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74453
Puyan Lotfi [Sat, 28 Mar 2020 08:08:27 +0000 (04:08 -0400)]
[llvm][clang][IFS] Enhancing the llvm-ifs yaml format for symbol lists.
Prior to this change the clang interface stubs format resembled
something ending with a symbol list like this:
Symbols:
a: { Type: Func }
This was problematic because we didn't actually want a map format and
also because we didn't like that an empty symbol list required
"Symbols: {}". That is to say without the empty {} llvm-ifs would crash
on an empty list.
With this new format it is much more clear which field is the symbol
name, and instead the [] that is used to express an empty symbol vector
is optional, ie:
Symbols:
- { Name: a, Type: Func }
or
Symbols: []
or
Symbols:
This further diverges the format from existing llvm-elftapi. This is a
good thing because although the format originally came from the same
place, they are not the same in any way.
Differential Revision: https://reviews.llvm.org/D76979
Tres Popp [Tue, 31 Mar 2020 09:41:51 +0000 (11:41 +0200)]
[MLIR] Implement LoopLikeInterface for loop.parallel
Summary:
This is to allow optimizations like loop invariant code motion to work
on the ParallelOp.
Additional small cleanup on the ForOp implementation of
LoopLikeInterface and the test file of loop-invariant-code-motion.
Differential Revision: https://reviews.llvm.org/D77128
scentini [Wed, 1 Apr 2020 14:33:44 +0000 (16:33 +0200)]
Replace output file name in test with %t
Guillaume Chatelet [Wed, 1 Apr 2020 14:33:27 +0000 (14:33 +0000)]
[Alignment][NFC] Mark IRTranslator::getMemOpAlignment deprecated
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77218
Guillaume Chatelet [Wed, 1 Apr 2020 14:24:51 +0000 (14:24 +0000)]
[Alignment][NFC] Remove remaining uses of MachineFrameInfo::setObjectAlignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77217
Simon Pilgrim [Wed, 1 Apr 2020 14:10:30 +0000 (15:10 +0100)]
[X86][SSE] combinePTESTCC - fold TESTZ(X,~Y) -> TESTC(Y,X)
Sergej Jaskiewicz [Wed, 1 Apr 2020 14:02:55 +0000 (10:02 -0400)]
[libc++abi] Fix remote execution of .sh.cpp tests
This aims to fix test failures on the following buildbots:
- http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l
- http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64
Differential Revision: https://reviews.llvm.org/D77190
Guillaume Chatelet [Wed, 1 Apr 2020 13:49:04 +0000 (13:49 +0000)]
[Alignment][NFC] Transition to MachineFrameInfo::getObjectAlign()
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, atanasyan, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77215
Kai Wang [Mon, 9 Mar 2020 02:05:15 +0000 (10:05 +0800)]
[RISCV] Support RISC-V ELF attributes sections in llvm-readobj.
Enable llvm-readobj to handle RISC-V ELF attribute sections.
Differential Revision: https://reviews.llvm.org/D75833
Simon Pilgrim [Wed, 1 Apr 2020 13:36:33 +0000 (14:36 +0100)]
Fix operator precedence warning. NFCI.
Simon Pilgrim [Wed, 1 Apr 2020 13:36:02 +0000 (14:36 +0100)]
Fix unused variable warnings. NFCI.
Benjamin Kramer [Wed, 1 Apr 2020 13:29:19 +0000 (15:29 +0200)]
[ARM] Silence warning in Release builds
llvm/lib/Target/ARM/MVEVPTBlockPass.cpp:175:37: error: unused variable 'BlockBeg' [-Werror,-Wunused-variable]
MachineBasicBlock::instr_iterator BlockBeg = Iter;
^
Guillaume Chatelet [Wed, 1 Apr 2020 13:02:51 +0000 (13:02 +0000)]
[Alignment][NFC] Convert SelectionDAG::InferPtrAlignment to MaybeAlign
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77212
diggerlin [Wed, 1 Apr 2020 13:14:13 +0000 (09:14 -0400)]
[NFC] run clang format on the file llvm/include/llvm/MC/MCDirectives.h
SUMMARY:
run clang format on the file llvm/include/llvm/MC/MCDirectives.h
Reviewers: Jason liu
Subscribers: rupprecht, seiyai,hiraditya
Differential Revision: https://reviews.llvm.org/D77170
Simon Pilgrim [Wed, 1 Apr 2020 10:51:01 +0000 (11:51 +0100)]
[X86][SSE] matchShuffleWithPACK - generalize zero/signbits matching for any packed src type
First step toward making use of canLowerByDroppingEvenElements to match chains of PACKSS/PACKUS for compaction shuffles.
At the moment we still only match a single stage but the MatchPACK is now more general.
Simon Pilgrim [Wed, 1 Apr 2020 13:08:25 +0000 (14:08 +0100)]
Fix "control reaches end of non-void function" warning. NFCI.
David Green [Wed, 1 Apr 2020 12:12:56 +0000 (13:12 +0100)]
[ARM] Extra vmull loop tests. NFC
shchenz [Wed, 1 Apr 2020 12:58:06 +0000 (12:58 +0000)]
Revert "[LSR] re-add testcase for wrongly phi node elimination - NFC"
This reverts commit
f25a1b4f58d66805257a05f13e8581551574ce22.
ARM and hexagon fail at the new added case.
Guillaume Chatelet [Wed, 1 Apr 2020 09:25:48 +0000 (09:25 +0000)]
[Alignment][NFC] Convert MIR Yaml to MaybeAlign
Summary:
Although it may look like non NFC it is. especially the MIRParser may set `0` to the MachineFrameInfo and MachineFunction, but they all deal with `Align` internally and assume that `0` means `1`.
https://github.com/llvm/llvm-project/blob/
93fc0ba145c2f9619d3174c95cacda5d4a0a2815/llvm/include/llvm/CodeGen/MachineFrameInfo.h#L483
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77203
Kirill Bobyrev [Wed, 1 Apr 2020 12:16:21 +0000 (14:16 +0200)]
[clangd-vscode] NFC; Improve wording in documentation and update VSCode tasks
Summary:
VSCode tasks are updated to the latest supported versions: deprecated
values are removed and replaced by their new counterparts.
Reviewers: hokein
Reviewed By: hokein
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76595
Pierre-vh [Mon, 9 Mar 2020 16:40:33 +0000 (16:40 +0000)]
[Target][ARM] Improvements to the VPT Block Insertion Pass
This allows the MVE VPT Block insertion pass to remove VPNOTs in
order to create more complex VPT blocks such as TE, TEET, TETE, etc.
Differential Revision: https://reviews.llvm.org/D75993
Pierre-vh [Fri, 13 Mar 2020 15:45:32 +0000 (15:45 +0000)]
[Target][ARM] Change VPTMaskValues to the correct encoding
VPTMaskValue was using the "instruction" encoding to represent the masks
(= the same encoding as the one used by the instructions in an object file),
but it is only used to build MCOperands, so it should use the MCOperand
encoding of the masks, which is slightly different.
Differential Revision: https://reviews.llvm.org/D76139