Commit Graph

380920 Commits

Author SHA1 Message Date
Joachim Protze
f3a72509a7 [OpenMP][Tests][NFC] lit might also be known as llvm-lit.py 2021-02-24 18:32:24 +01:00
Philip Reames
532d4814ac Revert "[tests] Mark an autogened test as such"
This reverts commit 43a569faeb.

Unhelpfully, the tool just added the header and didn't actually update any of the tests.  I didn't notice until after pushing.
2021-02-24 09:26:26 -08:00
serge-sans-paille
ca0bb0e887 Make sure some types are indeed trivially_copyable per llvm::is_trivially_copyable
Test a few types used as llvm::SmallVector parameter. It is important to ensure
we have a consistent behavior for these types to prevent ABI issues as the one
we met in https://bugs.llvm.org/show_bug.cgi?id=39427.

Differential Revision: https://reviews.llvm.org/D96536
2021-02-24 18:24:57 +01:00
Manoel Roemmer
542d9c2154 [libomptarget] Load images in order of registration
This makes sure that images are loaded in the order in which they are registered with libomptarget.

If a target can load multiple images and these images depend on each other (for example if one image contains the programs target regions and one image contains library code), then the order in which images are loaded can be important for symbol resolution (for example, in the VE plugin).
In this case: because the same code exist in the host binaries, the order in which the host linker loads them (which is also the order in which images are registered with libomptarget) is the order in which the images have to be loaded onto the device.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D95530
2021-02-24 18:15:41 +01:00
Philip Reames
43a569faeb [tests] Mark an autogened test as such 2021-02-24 09:15:19 -08:00
Joachim Protze
e0f3acc5d3 [OpenMP][Tests][NFC] rename macro to avoid naming clash
Rename a macro and macro use missed in 35ab6d6390
2021-02-24 18:13:28 +01:00
Jay Foad
449e36ce72 [AMDGPU] Add a bit more gfx90a test coverage
Update the GlobalISel version of llvm.amdgcn.workitem.id.ll to mostly
match the SelctionDAG version.

Differential Revision: https://reviews.llvm.org/D97377
2021-02-24 17:08:32 +00:00
Joachim Protze
35ab6d6390 [OpenMP][Tests][NFC] rename macro to avoid naming clash
When including <ostream>, the register_callback macro of the OMPT callback.h
clashes with a function defined in ostream. This patch renames the macro
and includes ompt into the macro name.
2021-02-24 18:03:54 +01:00
Siva Chandra Reddy
6628387c9a [libc][NFC] Exclude few targets from the all target. 2021-02-24 08:59:55 -08:00
Louis Dionne
5f5416e1c4 [libc++] NFC: Fix a few tests in tuple that would succeed trivially 2021-02-24 11:33:41 -05:00
Louis Dionne
4814985dec [libc++] NFC: Fix a few tests in pair that would succeed trivially 2021-02-24 11:25:45 -05:00
Eric Schweitz
3304061432 [flang][fir] Add zero_bits operation.
This patch adds the new zero_bits operation and upstrams other changes
including the following:

  - update tablegen syntax to newer forms
  - update memory effects annotations
  - update documentation [NFC]
  - other NFC, such as whitespace and formatting

Differential revision: https://reviews.llvm.org/D97331
2021-02-24 08:15:16 -08:00
Nathan James
a34532c330
[clang-tidy] Fix readability-avoid-const-params-in-decls removing const in template paramaters
Fixes https://bugs.llvm.org/show_bug.cgi?id=38035

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D96209
2021-02-24 15:54:10 +00:00
Eugene Zhulenev
ce976d2db3 [mlir] Add polynomial approximation for math::LogOp (using builders API)
Replace math::LogOp with an approximations from the the Julien Pommier's SSE math library

Link: http://gruntthepeon.free.fr/ssemath

Reviewed By: asaadaldien

Differential Revision: https://reviews.llvm.org/D97304
2021-02-24 07:50:25 -08:00
Siva Chandra Reddy
5f0800cc18 [libc][NFC] Remove headergen for the cacheline size macro.
We want to be able to build and test the string functions in contexts
like that of Fuchsia where LLVM pieces like tablegen are not available.
Since header generation uses tablegen, we are removing the dependency on
headergen here.

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D97363
2021-02-24 07:29:09 -08:00
Nathan James
b90fdb7c11
[clang-tidy][test] Allow specifying potentially unused suffixes
If a check-suffix is only required for a CHECK-FIXES or CHECK-MESSAGES. check_clang_tidy will pass the prefixes CHECK-FIXES<...> and CHECK-MESSAGES<...> to FileCheck.
This will result in a FileCheck failing because of an unused prefix.

This addresses the problem by not passing unused prefixes. Its also possible to fix this be passing `--allow-unused-prefixes` flag to FileCheck, but seeing as we have already done the legwork in the script to see its unused, this fix seems the better way to go.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D97322
2021-02-24 15:22:54 +00:00
Jinsong Ji
ff6dc053b7 [Coverage][Unittest] Fix stringref issue
We will pass StringRef and change it in reader.
But we reuse the same Filename vector without clear it,
so in some systems, we may clobbeer previous results.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D97353
2021-02-24 14:59:40 +00:00
Jez Ng
9ced8b3b61 [lld-macho] Add REQUIRES to incompatible-arch-tapi test 2021-02-24 09:42:52 -05:00
Sander de Smalen
5e19208d96 [InstructionCost] NFC: Fix up missing cases in LoopVectorize and CodeGenPrep.
This fixes the types of a few more cost variables to be of type InstructionCost.
2021-02-24 14:30:03 +00:00
Nico Weber
3d837ad704 Revert "[ValueTracking] computeKnownBitsFromShiftOperator - remove non-zero shift amount handling."
This reverts commit d37400168c.
Breaks Analysis/./AnalysisTests/ComputeKnownBitsTest.KnownNonZeroShift
2021-02-24 09:06:12 -05:00
Simon Pilgrim
d37400168c [ValueTracking] computeKnownBitsFromShiftOperator - remove non-zero shift amount handling.
This no longer affects any tests after the improvements to the KnownBits shift helpers.
2021-02-24 13:49:13 +00:00
Alexander Belyaev
7377ef9357 [mlir] Add a builder to linalg.tiled_loop.
https://llvm.discourse.group/t/rfc-add-linalg-tileop/2833

Differential Revision: https://reviews.llvm.org/D97372
2021-02-24 14:47:27 +01:00
Raphael Isemann
6201017d54 [lldb] Prevent double new lines behind errors/warning/messages from LLDB commands
The current API for printing errors/warnings/messages from LLDB commands
sometimes adds newlines behind the messages for the caller. However, this
happens unconditionally so when the caller already specified a trailing newline
in the error message (or is trying to print a generated error message that ends
in a newline), LLDB ends up printing both the automatically added newline and
the one that was in the error message string. This leads to all the randomly
appearing new lines in error such as:

```
(lldb) command a
error: 'command alias' requires at least two arguments
(lldb) apropos a b
error: 'apropos' must be called with exactly one argument.

(lldb) why is there an empty line behind the second error?
```

This code adds a check that only appends the new line if the passed message
doesn't already contain a trailing new line.

Also removes the AppendRawWarning which had only one caller and doesn't serve
any purpose now.

Reviewed By: #lldb, mib

Differential Revision: https://reviews.llvm.org/D96947
2021-02-24 14:42:01 +01:00
Jay Foad
aab709f090 [AMDGPU] Add more PAL metadata register names
Add all the registers that are currently used by
LLPC: https://github.com/GPUOpen-Drivers/llpc

This only affects disassembly of PAL metadata generated by LLPC and
similar frontends.

Differential Revision: https://reviews.llvm.org/D95619
2021-02-24 13:37:05 +00:00
Christian Sigg
eb8d6af5e4 [mlir] Specify cuda-runner pass pipeline as command line options.
The cuda-runner registers two pass pipelines for nested passes,
so that we don't have to use verbose textual pass pipeline specification.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D97091
2021-02-24 14:36:52 +01:00
Jay Foad
67f0620831 [AMDGPU] Update s_sendmsg messages
Update the list of s_sendmsg messages known to the assembler and
disassembler and validate the ones that were added or removed in gfx9
and gfx10.

Differential Revision: https://reviews.llvm.org/D97295
2021-02-24 13:07:00 +00:00
Raphael Isemann
0512b01ebe [lldb][NFC] Move trivial ValueObject getters/setters to the header
NFC refactoring that moves the definitions of all the trivial getters/setters to the header file
which is what we usually do in LLVM.

Reviewed By: #lldb, JDevlieghere

Differential Revision: https://reviews.llvm.org/D97298
2021-02-24 14:04:01 +01:00
Raphael Isemann
4631afdeb3 [lldb][NFC] Rename the second ValueObjectManager to ValueObjectUpdater and remove the dead code
`ValueObject.h` contains the `ValueObject::ValueObjectManager` type which is
just a typedef for the ClusterManager that takes care of the whole ValueObject
memory management. However, there is also `ValueObjectManager` defined in the
same header which is only used in the curses UI implementation and consists
mostly of dead and completely untested code.

This code been around since a while (it was added in 2016 as
8369b28da0), so I think we shouldn't just revert
the whole patch.

Instead this patch just moves the class to its own header that it isn't just
hiding in the ValueObject header and renames it to `ValueObjectUpdater` that it
at least has a unique name (which I hope also slightly better reflects the
purpose of this class). I also deleted all the dead code branches and functions.

Reviewed By: #lldb, mib, JDevlieghere

Differential Revision: https://reviews.llvm.org/D97287
2021-02-24 13:58:01 +01:00
Anastasia Stulova
abbdb5639c [OpenCL] Allow taking address of functions as an extension.
When '__cl_clang_function_pointers' extension is enabled
the parser should allow obtaining the function address.

This fixes PR49264!

Differential Revision: https://reviews.llvm.org/D97203
2021-02-24 12:32:02 +00:00
Raphael Isemann
2105912ee0 [lldb] Add asserts that prevent construction of cycles in the decl origin tracking
LLDB tracks where any imported `clang::Decl` originally came from via a simple
map from 'imported decl' to 'original decl'. That information is used to later
complete parts of the Decl when more information is requested about a certain
Decl (e.g., via the ExternalASTSource interface from Clang).

When finding the 'original decl' for a given decl, the ASTImporterDelegate
essentially just recursively follows the previously mentioned map from
'imported' to 'original decl' until it can find any further 'original decl'. The
final found decl is then the one that will be imported. The recursion is
necessary as in LLDB we don't just import decls from one ASTContext to another,
but also from one ASTContext to another via a (potentially temporary)
ASTContext. For example, the expression parser creates a temporary ASTContext
for parsing the current expression.

The problem with the recursion is however that if we somehow get a cycle into
our mapping, then the ASTImporterDelegate will just infinite recurse. As the
infinite recursion usually happens after the cycle was already created in a code
path such as completing a type, the crash backtraces we get for these bugs are
not very useful. However having the backtrace where the faulty map entry is
created usually makes the code trivial to fix (as there should be some rogue
CopyType call or something similar nearby. See for example D96366).

This patch tries to make these issues easier to track down by putting a bunch of
sanity asserts in the code that fills out the map. All the asserts are just
checking that there is no direct cycle (ASTContext maps to itself) when updating
the origin tracking map.

The assert in the ASTImportDelegate constructor is an `lldbassert` (which also
is getting checked in release builds with disabled asserts) as the code path
there is pretty cold and we can reliably detect a rogue CopyType call from
there.

I also had to update some code in
`ClangASTImporter::ASTImporterDelegate::Imported`. This code already had a
safety check for creating a cycle in the origin tracking map, but it still
constructed an ASTImporter while checking for the cycle (by requesting a
delegate via `GetDelegate` and passing two identical ASTContexts which looks
like a rogue CopyType call to the checks).

Reviewed By: shafik

Differential Revision: https://reviews.llvm.org/D97300
2021-02-24 13:25:49 +01:00
Simon Pilgrim
d65ddca83f [ValueTracking] ComputeKnownBits - minimum leading/trailing zero bits in LSHR/SHL (PR44526)
Followup to D72573 - as detailed in https://blog.regehr.org/archives/1709 we don't make use of the known leading/trailing zeros for shifted values in cases where we don't know the shift amount value.

Stop ValueTracking returning zero for poison shift patterns and use the KnownBits shift helpers directly.

Extend KnownBits::shl to combine all possible shifted combinations if both min/max shift amount values are in range.

Differential Revision: https://reviews.llvm.org/D90479
2021-02-24 12:15:45 +00:00
Pierre Gousseau
27830bc2b1 [asan] Avoid putting globals in a comdat section when targetting elf.
Putting globals in a comdat for dead-stripping changes the semantic and
can potentially cause false negative odr violations at link time.
If odr indicators are used, we keep the comdat sections, as link time
odr violations will be dectected for the odr indicator symbols.

This fixes PR 47925
2021-02-24 12:01:56 +00:00
Simon Pilgrim
b94c215592 [Utils] collectBitParts - add truncate() handling 2021-02-24 11:48:34 +00:00
Lang Hames
912bc4980e [docs][JITLink] Remove the JITLink doc for now.
I'll reinstate and continue investigation tomorrow.
2021-02-24 22:32:18 +11:00
Lang Hames
038a09120b [docs][JITLink] Yet more experiments to try to understand sphinx error. 2021-02-24 22:22:48 +11:00
Lang Hames
3fbe630e03 [docs][JITLink] More experiments to try to understand sphinx error. 2021-02-24 22:22:47 +11:00
OCHyams
52bc1c1bd5 [dexter] Force dexter tests to use the host triple
If the default target and host triple don't match then print the following
message when the lit test runs:

    Forcing dexter tests to use host triple {HOST_TRIPLE}.

If we can't target the host arch then, when lit runs, we mark
the dexter test directories as UNSUPPORTED and print the message:

    Host triple {HOST_TRIPLE} not supported. Skipping dexter tests in
    the debuginfo-tests project.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D96494
2021-02-24 11:11:17 +00:00
Kadir Cetinkaya
c94ecf3f81
[clangd] Fix a race
Differential Revision: https://reviews.llvm.org/D97366
2021-02-24 12:15:16 +01:00
Simon Pilgrim
8082bfe7e5 [DAG] Add basic mul-with-overflow constant folding support
As noticed on D97160
2021-02-24 11:09:02 +00:00
Lang Hames
a4f9c0f562 [docs][JITLink] Make `ObjectLinkingLayer` not a paragraph start.
More experiments as I try to placate sphinx.
2021-02-24 22:04:14 +11:00
Lang Hames
e2db0d2fa6 [docs][JITLink] Return to `` for inline literals.
Also awkwardly reformat text to test whether the error is occurring
on the line with the '::', or the previous one.
2021-02-24 21:55:49 +11:00
Lang Hames
731a2bcaf7 [docs][JITLink] Try explicit literal blocks for monospace list elements. 2021-02-24 21:50:27 +11:00
Lang Hames
d91cfcebbd [docs][JITLink] More attempted fixes for formatting issues in the JITLink doc.
Try using the literal domain for `ObjectLinkingLayer::Plugin` and literal
blocks for multi-line method names.
2021-02-24 21:41:27 +11:00
Florian Hahn
6240f436dd
Recommit "[LV] Allow tryToCreateWidenRecipe to return a VPValue, use for blends."
This reverts the revert commit 437f0bbcd5.

It adds a new toVPRecipeResult, which forces VPRecipeOrVPValueTy to be
constructed with a VPRecipeBase *. This should address ambiguous
constructor issues for recipe sub-types that also inherit from VPValue.
2021-02-24 10:36:02 +00:00
Alexander Belyaev
945b76d428 [mlir][linalg] Fix Linalg roundtrip test.
The test did not check whether the operations can be parsed again after
printing them once.

Differential Revision: https://reviews.llvm.org/D97368
2021-02-24 11:31:09 +01:00
Douglas Yung
691c3d5948 Update REQUIRES line in 4 tests that attempt to use arm64 which should be aarch64 not arm. 2021-02-24 02:26:19 -08:00
Lang Hames
a5e15c7706 [docs][JITLink] Sphinx does not like '::' in monotype. Try using a
cpp domain expr instead.
2021-02-24 21:23:10 +11:00
Lang Hames
ab4648504b [docs][JITLink] Add a JITLink design and API document. 2021-02-24 21:04:35 +11:00
Lang Hames
8380d07e39 [JITLink] Add assertions, fix a comment.
The new assertions check that Addressables removed when removing
external or absolute symbols are not referenced by another symbol.

A comment on post-fixup passes is updated: vmaddrs have all been
set up by the time the pre-fixup passes are run, post-fixup passes
run after fixups have been applied to content.
2021-02-24 21:02:37 +11:00
Lang Hames
d637235cee [JITLink] Fix comments about JITLink's generic link algorithm.
These comments had gotten out of date with the code.
2021-02-24 21:02:37 +11:00