Commit Graph

425540 Commits

Author SHA1 Message Date
Craig Topper fa20bf1636 [DAGCombiner][RISCV] Improve computeKnownBits for (smax X, C) where C is non-negative.
If C is non-negative, the result of the smax must also be
non-negative, so all sign bits of the result are 0.

This allows DAGCombiner to remove a zext_inreg in the modified test.
This zext_inreg started as a sext that became zext before type
legalization then was promoted to a zext_inreg.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D126896
2022-06-02 12:34:24 -07:00
Joe Loser 4be36dc77f
[libc++][test] Fix unused variable warning in string_view tests
In 6423a9f0ec, I accidentally thought this was
getting tested, but these variables are unused. Just remove the lines instead of
leaving them commented out.

Differential Revision: https://reviews.llvm.org/D126901
2022-06-02 13:33:37 -06:00
Daniel Douglas 5d25dbff67 [OpenMP][libomp] do not try to dlopen libmemkind on macOS
The memkind library is only available for linux. Calling dlopen here
can also be problematic in a client app that fork'ed.

Differential Revision: https://reviews.llvm.org/D126579
2022-06-02 14:28:09 -05:00
Paul Robinson 30b7ffe74e [PS5] Pack non-POD members in packed structs, matching PS4 ABI 2022-06-02 12:26:26 -07:00
Paul Robinson bb7835e2a7 [PS5] Apply 'packed' attribute to base classes, matching PS4 ABI 2022-06-02 12:26:26 -07:00
Florian Hahn 44c86e5cdc
[GVN] Add test for capture tracking use limit.
Test for capture-tracking-max-uses-to-explore, adjusted in D126236.
2022-06-02 20:15:26 +01:00
Aart Bik bf7dbc2a30 [mlir][sparse][bufferization] fix doc on new init operation
The example was still using the -now- removed sparse_tensor.init_tensor.
Also, I made the input operands of the matrix multiplication sparse too
(since it looks a bit strange to multiply two dense matrices into a sparse).

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D126897
2022-06-02 12:04:36 -07:00
Adrian Prantl 8eed95c83e Adapt IRForTarget::RewriteObjCSelector() for D126689.
With opaque pointers, the LLVM IR expected by this function changed.
2022-06-02 11:42:28 -07:00
Joe Nash 3732cd59be [AMDGPU] gfx11 vop3 and inherited vop instructions
This patch includes MC layer support for VOP3 encoded instructions and generic VOP support
classes.
Some VOP1 and VOP2 instructions which share an encoding with gfx10 and are using
the AssemblerPredicate = isGFX10Plus are also enabled. That predicate
will be changed to isGFX10Only in a later patch.

Patch 15/N for upstreaming of AMDGPU gfx11 architecture.

Depends on D126468

Reviewed By: dp

Differential Revision: https://reviews.llvm.org/D126475
2022-06-02 14:03:02 -04:00
Chia-hung Duan 2aeffc6d8d [mlir:MultiOpDriver] Don't add ops which are not in the allowed list
In strict mode, only the new inserted operation is allowed to add to the
worklist. Before this change, it would add the users of a replaced op
and it didn't check if the users are allowed to be pushed into the
worklist

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D126899
2022-06-02 18:27:37 +00:00
Alexey Bataev 9980c99718 [SLP]Improve shuffles cost estimation where possible.
Improved/fixed cost modeling for shuffles by providing masks, improved
cost model for non-identity insertelements.

Differential Revision: https://reviews.llvm.org/D115462
2022-06-02 11:18:14 -07:00
Anders Waldenborg 4c1e487c41 scan-build-py: Change scripts to explicitly require python3
The "#!" line in all scan-build-py scripts were using just bare
"/usr/bin/python" which according to PEP-0394 can be either python3,
python2 or not exist at all.

E.g in latest debian and ubuntu releases "/usr/bin/python" does not
exist at all by default and user must install python-is-python2 or
python-is-python3 packages to get the bare version less "python"
command.

Until recently (70b06fe8a1 "scan-build-py: Force the opening in utf-8"
changed "libscanbuild") these scripts worked in both python2 and
python3, but now they (rightfully) are python3 only, and broke on
systems where the "python" command means python2.

By changing the "#!" to be "python3" it is not only explicit that the
scripts require python3 it also works on systems where "python" command
is python2 or nonexistent.

Differential Revision: https://reviews.llvm.org/D126804
2022-06-02 20:08:21 +02:00
Paul Pluzhnikov 35ab2a11bb Fix a buglet in remove_dots().
The function promises to canonicalize the path, but neglected to do so
for the root component.

For example, calling remove_dots("/tmp/foo.c", Style::windows_backslash)
resulted in "/tmp\foo.c". Now it produces "\tmp\foo.c".

Also fix FIXME in the corresponding test.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D126412
2022-06-02 11:07:44 -07:00
Joe Nash e4870c8357 [AMDGPU] gfx11 ds instructions
MC layer support for ds instructions

Contributors:
Piotr Sobczak <Piotr.Sobczak@amd.com>

Patch 14/N for upstreaming of AMDGPU gfx11 architecture.

Depends on D126463

Reviewed By: arsenm, #amdgpu

Differential Revision: https://reviews.llvm.org/D126468
2022-06-02 13:36:56 -04:00
Paul Robinson dc5175adef [PS5] Make passing unions in registers match PS4 ABI 2022-06-02 11:00:54 -07:00
Paul Robinson cc756f91c3 [PS5] Classify __m64 as integer, matching PS4 ABI 2022-06-02 11:00:53 -07:00
Balazs Benics 7d24641f89 [llvm][analyzer][NFC] Introduce SFINAE for specializing FoldingSetTraits
Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126803
2022-06-02 19:46:38 +02:00
Balazs Benics cf1f1b7240 [analyzer][NFC] Uplift checkers after D126801
Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126802
2022-06-02 19:46:38 +02:00
Balazs Benics 33ca5a447e [analyzer][NFC] Add partial specializations for ProgramStateTraits
I'm also hoisting common code from the existing specializations into a
common trait impl to reduce code duplication.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126801
2022-06-02 19:46:38 +02:00
Will Hawkins 7b291b6f50 [libc++] Fix typo in comment at __optional_storage_base
Small typo fix(es) for struct definition of __optional_storage_base for
a reference type.

Reviewed By: #libc, jloser, philnik

Differential Revision: https://reviews.llvm.org/D126621
2022-06-02 19:46:04 +02:00
Ashay Rane 5fee1799f4
[mlir] translate memref.reshape with static shapes but dynamic dims
Prior to this patch, the lowering of memref.reshape operations to the
LLVM dialect failed if the shape argument had a static shape with
dynamic dimensions.  This patch adds the necessary support so that when
the shape argument has dynamic values, the lowering probes the dimension
at runtime to set the size in the `MemRefDescriptor` type.  This patch
also computes the stride for dynamic dimensions by deriving it from the
sizes of the inner dimensions.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D126604
2022-06-02 10:00:58 -07:00
Craig Topper 01ba470826 [RISCV] Add test case showing unnecessary extend after i32 smax on rv64. NFC
One of the operands of the smax is a positive value so computeKnownBits
determines the result of the smax must always be positive. This allows
DAG combiner to convert the sign extend to zero extend before type
legalization.

After type legalization the smax is promoted to i64 by sign extending
its inputs and the zero extend becomes an AND instruction. We are unable
to remove the AND at this point and it becomes a pair of shifts or a
zext.w.

The result of smax has as many sign bits as the minimum of its inputs.
Had we kept the sign extend instead of turning it into a zero extend
it would be removed by DAG combiner after type legalization.
2022-06-02 09:58:11 -07:00
Luís Ferreira 3da4f9c57b [lldb][NFC] Move non-clang specific method to the generic DWARF Parser
This patch renames DW_ACCESS_to_AccessType function and move it to the abstract
DWARFASTParser, since there is no clang-specific code there. This is useful for
plugins other than Clang.

Reviewed By: shafik, bulbazord

Differential Revision: https://reviews.llvm.org/D114719
2022-06-02 16:39:39 +00:00
David CARLIER 2ba5d820e2 [OpenMP] omp_get_proc_id uses sched_getcpu fallback on FreeBSD 13.1 and above.
Reviewers: jlpeyton, jdoerfert

Reviewed-By: jlpeyton

Differential-Revision: https://reviews.llvm.org/D126408
2022-06-02 17:10:29 +01:00
Mikael Simberg e27ce28139 [OpenMP][libomp] Make LIBOMP_CONFIGURED_LIBFLAGS a list instead of string
When configuring llvm with the openmp subproject, the build for the omp
target fails if LIBOMP_CONFIGURED_LIBFLAGS contains more than one item.
LIBOMP_CONFIGURED_LIBFLAGS should be a semicolon-separated list instead
of a string with items separated by spaces.

Differential Revision: https://reviews.llvm.org/D125370
2022-06-02 10:50:21 -05:00
Liqiang Tao 14e8add939 [llvm][ModuleInliner] Refactor InlineSizePriority and PriorityInlineOrder
This patch introduces the abstract base class InlinePriority to serve as
the comparison function for the priority queue.  A derived class, such
as SizePriority, may choose to cache the priorities for different
functions for performance reasons.

This design shields the type used for the priority away from classes
outside InlinePriority and classes derived from it.  In turn,
PriorityInlineOrder no longer needs to be a template class.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D126300
2022-06-02 23:40:26 +08:00
Liqiang Tao 5c6ed60c51 Revert "[llvm][ModuleInliner] Refactor InlineSizePriority and PriorityInlineOrder"
This reverts commit 50de7f1e77.
2022-06-02 23:18:47 +08:00
Mark de Wever 89818f2dc0 [libc++] Lets to_chars use header implementation.
This removes the duplicated code from the dylib. Instead the dylib will
call the new functions in the header. Since this code is unneeded it's
removed from the unstable ABI.

Depends on D125704

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D125761
2022-06-02 17:11:32 +02:00
Philip Reames dcdb0bf25b [RISCV] Fix an inconsistency with compatible load/store handling
Once we've computed the incoming predecessor state, we should use the same compatibility check with knowledge of MI as we did in phase 2 in order to be consistent across all phases.

Differential Revision: https://reviews.llvm.org/D126574
2022-06-02 08:03:51 -07:00
Joe Loser 6423a9f0ec
[libc++][test] Enable some more string_view tests
Some test cases for `ends_with.ptr.pass` and `starts_with.ptr.pass` for
`string_view` are commented out, but work just fine. Uncomment them.

Differential Revision: https://reviews.llvm.org/D126849
2022-06-02 08:56:02 -06:00
Paul Robinson 5a6352bc70 Tidy up `pragma comment lib` handling and testing
A bit of historical research shows that over the years:
Commit 99efc036 added `pragma comment lib` support for PS4.
Commit fd4db533 added `pragma comment lib` support for all ELF targets.
Commit 1d16515f reworked dependent-library support for all ELF targets.

The upshot is that some PS4-specific code became dead, and the
testing became somewhat fragmented.  I've removed the dead code and
combined the previous PS4-specific and linux-specific tests for the
diagnostics into one generic ELF test.
Also added a couple of PS5 runs while I was in there.
2022-06-02 07:52:26 -07:00
LLVM GN Syncbot 883b09b664 [gn build] Port f9b8f422e7 2022-06-02 14:47:37 +00:00
Luís Ferreira f9b8f422e7 [lldb][NFC] Move generic DWARFASTParser code out of Clang-specific code
This patch moves ParseChildArrayInfo out of DWARFASTParserClang in order
to decouple Clang-specific logic from DWARFASTParser.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D114668

Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2022-06-02 14:44:07 +00:00
Liqiang Tao 50de7f1e77 [llvm][ModuleInliner] Refactor InlineSizePriority and PriorityInlineOrder
This patch introduces the abstract base class InlinePriority to serve as
the comparison function for the priority queue.  A derived class, such
as SizePriority, may choose to cache the priorities for different
functions for performance reasons.

This design shields the type used for the priority away from classes
outside InlinePriority and classes derived from it.  In turn,
PriorityInlineOrder no longer needs to be a template class.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D126300
2022-06-02 22:28:33 +08:00
serge-sans-paille 4d73c46ccf [MCParser] Set default alignment value when meeting invalid align
Upon invalid alignment value, still set a default valid alignment value to avoid
hitting later asserts.

Fix #55273

Differential Revision: https://reviews.llvm.org/D125688
2022-06-02 16:22:35 +02:00
Paul Walker 48ea26a387 [SVE] Fixed custom lowering of ISD::INSERT_SUBVECTOR.
LowerINSERT_SUBVECTOR emits AArch64ISD::UUNPK## when lowering
scalable vector floating point INSERT_SUBVECTOR. However, these
nodes only make sense for integer types and thus isel patterns do
not exist for floating point, which leads to isel failures.

This patch ensures floating point operands are cast to integer
before the core lowering takes place.

Fixes: #55037

Differential Revision: https://reviews.llvm.org/D126487
2022-06-02 14:51:04 +01:00
Joseph Huber 6bdf352ed8 [Binary] Remove OffloadBinary from the Objects enumeration
Summary:
We use the beginning and end of this enumeration to determine what is
and isn't an object format. The enumeration for the OffloadBinary was
put here by mistake which led to it being mistakenly classified as an
Object file.
2022-06-02 09:34:23 -04:00
Aaron Ballman 0b46121c41 Update more DR status information for C.
This adds new files to track DRs 100-199 and 400-499, but the file
contents are still a work in progress. It also updates the associated
status in the DR tracking page.
2022-06-02 09:32:44 -04:00
Nico Weber e37421669e Revert "unbreak Modules/cxx20-export-import.cpp with LLVM_APPEND_VC_REV after 8c8a2679a20f"
This reverts commit 4463bd0f89.
8c8a2679a2 was reverted in d42fe9aa84.
2022-06-02 09:31:57 -04:00
Paul Robinson b2c6251c06 [PS5] Support r and y specifiers of freebsd_kernel_printf format strings 2022-06-02 06:27:11 -07:00
Alex Zinenko ce2e198bc2 [mlir] add decompose and generalize to structured transform ops
These ops complement the tiling/padding transformations by transforming
higher-level named structured operations such as depthwise convolutions into
lower-level and/or generic equivalents that are better handled by some
downstream transformations.

Differential Revision: https://reviews.llvm.org/D126698
2022-06-02 15:25:18 +02:00
Hans Wennborg d42fe9aa84 Revert "[clang][AIX] add option mdefault-visibility-export-mapping"
This caused assertions, see comment on the code review:

llvm/clang/lib/AST/Decl.cpp:1510:
clang::LinkageInfo clang::LinkageComputer::getLVForDecl(const clang::NamedDecl *, clang::LVComputationKind):
Assertion `D->getCachedLinkage() == LV.getLinkage()' failed.

> The option mdefault-visibility-export-mapping is created to allow
> mapping default visibility to an explicit shared library export
> (e.g. dllexport). Exactly how and if this is manifested is target
> dependent (since it depends on how they map dllexport in the IR).
>
> Three values are provided for the option:
>
> * none: the default and behavior without the option, no additional export linkage information is created.
> * explicit: add the export for entities with explict default visibility from the source, including RTTI
> * all: add the export for all entities with default visibility
>
> This option is useful for targets which do not export symbols as part of
> their usual default linkage behaviour (e.g. AIX), such targets
> traditionally specified such information in external files (e.g. export
> lists), but this mapping allows them to use the visibility information
> typically used for this purpose on other (e.g. ELF) platforms.
>
> Reviewed By: MaskRay
>
> Differential Revision: https://reviews.llvm.org/D126340

This reverts commit 8c8a2679a2.
2022-06-02 15:09:39 +02:00
Xing Xue dfaee3c9cf [libunwind][ci][AIX] Add libunwind to buildbot CI
Summary:
This patch changes scripts to add libunwind CI on AIX. Test config file ibm-libunwind-shared.cfg.in is introduced for testing on AIX.

Reviewed by: ldionne, MaskRay, libunwind, ibc++abi

Differential Revision: https://reviews.llvm.org/D126017
2022-06-02 09:03:10 -04:00
PeixinQiao e2ac99b79d [flang] Add check for conflict of BIND(C) and Parameter attributes
The entity with BIND(C) attribute cannot be a named constant, so the
BIND(C) and parameter attributes are conflicted. Add check for it.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D126654
2022-06-02 20:58:05 +08:00
Nikita Popov 30ad481e87 Revert "cmake: use llvm dir variables for clang/utils/hmaptool"
As discussed on the review, this change breaks the standalone
clang build. When building against an installed LLVM, the
LLVM_TOOLS_BINARY_DIR cmake variable points to the location of
the installed LLVM tools, not to the cmake build directory. This
means that we would end up trying to move hmaptool into something
like /usr/bin as part of the normal build, while this should only
be happening when running an install target.

This reverts commit bf1ab1f0eb.
2022-06-02 14:55:58 +02:00
Aaron Ballman c745f2ce6c Revert "Drop qualifiers from return types in C (DR423)"
This reverts commit d374b65f2d.

The changes lose AST fidelity (reported in #55778), but also may be
improperly dropping _Atomic qualifiers. I am rolling the changes back
until I've finished discussions in WG14 about the proper resolution to
DR423.
2022-06-02 08:28:43 -04:00
Andrzej Warzynski 72911227d4 [flang][docs] Document CMake support
One out-of-date section is also deleted.

Differential Revision: https://reviews.llvm.org/D126712
2022-06-02 12:04:36 +00:00
Nicolas Vasilache 311967701a [mlir][SCF] Add scf.foreach_thread.parallel_insert_slice canonicalization.
Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D126761
2022-06-02 11:53:25 +00:00
Guillaume Chatelet 53efdf33f8
Fix llvm.memset semantics description
The description was referring to a ``src`` parameter probably copied over from ``llvm.memcpy``
2022-06-02 13:25:03 +02:00
Florian Hahn 4f1c86e3d5
[VPlan] Remove dead VPlan-native special case from BranchOnCount (NFC).
After 05776122b6 this special case doesn't exist any longer.
2022-06-02 12:07:54 +01:00