Commit Graph

407363 Commits

Author SHA1 Message Date
Michał Górny 76c876e7e6 Revert "[lldb] Introduce a FreeBSDKernel plugin for vmcores"
This reverts commit aedb328a4d.
I have failed to make the new tests conditional to the presence
of libfbsdvmcore.
2021-12-14 18:17:54 +01:00
Craig Topper 7598ac5ec5 [RISCV] Convert (splat_vector (load)) to vlse with 0 stride.
We already do this for splat nodes that carry a VL, but not for
splats that use VLMAX.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D115483
2021-12-14 09:14:03 -08:00
Michał Górny aedb328a4d [lldb] Introduce a FreeBSDKernel plugin for vmcores
Introduce a FreeBSDKernel plugin that provides the ability to read
FreeBSD kernel core dumps.  The plugin utilizes libfbsdvmcore to provide
support for both "full memory dump" and minidump formats across variety
of architectures supported by FreeBSD.  It provides the ability to read
kernel memory, as well as the crashed thread status with registers
on arm64, i386 and x86_64.

Differential Revision: https://reviews.llvm.org/D114911
2021-12-14 18:03:38 +01:00
Alexander Batashev 84f2ef2f29 Disable issue labeler in LLVM forks
LLVM forks may use GitHub Actions as well as the upstream projects,
but they do not necessarily follow the same development processes.
Disable automatic issue labeling for forks, so that it does not
interfere with downstream repo automation.

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D115708
2021-12-14 20:02:54 +03:00
Zaara Syeda dd245bab9f [LoopUnroll] Disable loop unroll when user explicitly asks for unroll-and-jam
If a loop isn't forced to be unrolled, we want to avoid unrolling it when there
is an explicit unroll-and-jam pragma. This is to prevent automatic unrolling
from interfering with the user requested transformation.

Differential Revision: https://reviews.llvm.org/D114886
2021-12-14 16:46:37 +00:00
Philip Reames 423f19680a Add FMF to hasPoisonGeneratingFlags/dropPoisonGeneratingFlags
These flags are documented as generating poison values for particular input values. As such, we should really be consistent about their handling with how we handle nsw/nuw/exact/inbounds.

Differential Revision: https://reviews.llvm.org/D115460
2021-12-14 08:43:00 -08:00
Jing Bao 2a4a229d6d [WebAssembly] Custom optimization for truncate
When possible, optimize TRUNCATE to generate Wasm SIMD narrow
instructions (i16x8.narrow_i32x4_u, i8x16.narrow_i16x8_u), rather than generate
lots of extract_lane and replace_lane.

Closes #50350.
2021-12-14 08:42:39 -08:00
Mark de Wever 0b9b1c8c49 [libc++] Remove C++ version guards in the dylib.
The library is always build using C++20 so these guards are not needed.

Reviewed By: #libc, Quuxplusone, ldionne

Differential Revision: https://reviews.llvm.org/D115644
2021-12-14 17:37:52 +01:00
Aart Bik ef244ad620 [mlir][sparse] fixed typos
Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D115667
2021-12-14 08:33:06 -08:00
Aart Bik 03fe15cee6 [mlir][sparse] speed up sparse tensor file I/O by more than 2x
data point using the 3-dim tensor nell-2.tns

MLIR:
READ FILE INTO COO: 24424.369294 ms ---> improves to ----> 9638.501044 ms
SORT COO BEFORE PACK: 762.834831 ms
PACK COO TO TENSOR: 1243.376245 ms

TACO:
b file read: 13270.9 ms
b pack: 7137.74 ms
b size: (12092 x 9184 x 28818), 925300328 bytes

https://github.com/llvm/llvm-project/issues/52679

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D115696
2021-12-14 08:30:31 -08:00
Sanjay Patel bb2fc19c63 [InstCombine] prevent infinite looping from opposing cmp and select transforms (PR52684)
As noted in the code comment, we might want to simply give up on this select
transform completely (given how many exceptions there are already and the
risk of future conflicts), but for now, carve out one more bailout to
avoid an infinite loop.

Fixes #52684:
https://github.com/llvm/llvm-project/issues/52684
2021-12-14 11:18:36 -05:00
Sanjay Patel d2be9ae0da [InstCombine] regenerate test checks; NFC 2021-12-14 11:18:35 -05:00
Sanjay Patel 3db974face [InstCombine] convert static function to internal class function; NFC
The transform can require an optional shuffle instruction to be sound,
so we need to use Builder to create all values and then replace the
original instruction with whatever that final value is.
2021-12-14 11:18:35 -05:00
Mircea Trofin 48d868493f [benchmark] Delete BUILD files
Bazel support is through utils/bazel, and the BUILD files in `benchmark`
just complicate downstream integrates for bazel based builds.

Differential Revision: https://reviews.llvm.org/D115733
2021-12-14 08:13:21 -08:00
Louis Dionne bf39e7dc6c [libc++] Fix wrongly non-inline basic_string::shrink_to_fit
As explained in https://stackoverflow.com/a/70339311/627587, the fact
that shrink_to_fit wasn't defined as inline lead to issues when explicitly
instantiating basic_string. While explicit instantiations are always
somewhat brittle, this one was clearly a bug on our end.

Differential Revision: https://reviews.llvm.org/D115656
2021-12-14 11:12:04 -05:00
Alexandros Lamprineas 61bb8b5d40 [AArch64] Convert sra(X, elt_size(X)-1) to cmlt(X, 0)
CMLT has twice the execution throughput of SSHR on Arm out-of-order cores.

Differential Revision: https://reviews.llvm.org/D115457
2021-12-14 16:03:02 +00:00
Pavel Labath ebb6bb725e [lldb/python] Plug SBStructuredData leaks
This applies the from D114259 to the SBStructuredData class.
2021-12-14 17:02:24 +01:00
Matt Devereau fb47725d14 [AArch64][SVE] Instcombine SDIV to ASRD
Instcombine SDIV to ASRD when the third operand of SDIV is a power of 2

Differential Revision: https://reviews.llvm.org/D115448
2021-12-14 15:58:28 +00:00
Kirill Stoimenov c13524856b [ASan] Shared optimized callbacks implementation.
This change moves optimized callbacks from each .o file to compiler-rt. Instead of using code generation it uses direct assembly implementation. Please note that the 'or' version is not implemented and it will produce unresolved external if somehow 'or' version is requested.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D114558
2021-12-14 15:55:14 +00:00
Zaara Syeda 3f066ac648 Test commit 2021-12-14 15:37:28 +00:00
Simon Pilgrim 4f2e183229 [X86] combineOr - don't demand operand elements if the other operand element is 'allones'
If either operand has an element with allbits set, then we don't need the equivalent element from the other operand, as allbits are guaranteed to be set.
2021-12-14 15:36:33 +00:00
Simon Pilgrim a9d811405f [X86] combineOr - pull out repeated SDLoc(). NFCI. 2021-12-14 15:36:32 +00:00
Alexey Bataev f00da7c3bc [SLP][NFC]Update test checks, NFC. 2021-12-14 07:35:02 -08:00
Jay Foad 819fb457a6 [AMDGPU] Regenerate checks in high-bits-zeroed-16-bit-ops.mir 2021-12-14 15:33:35 +00:00
Matt Devereau 08a770c378 [AArch64][SVE] Replace mask pointers in fixed-length-fp-vselect test
Replace mask pointer parameters with fcmp for better quality codegen

Differential Revision: https://reviews.llvm.org/D115641
2021-12-14 15:21:35 +00:00
mydeveloperday cea81e95b0 [clang-format] add support for cppm files
C++20 Modules current style is to assign a new file suffix .cppm.

https://github.com/llvm/llvm-project/issues/52658

Ensure git-clang-format can handle that as a default extension

Reviewed By: ChuanqiXu, HazardyKnusperkeks, curdeius

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

Fixes: #52658
2021-12-14 14:55:38 +00:00
mydeveloperday 6482383e50 [clang-format] FixNamespaceComments does not understand namespace aliases
https://github.com/llvm/llvm-project/issues/35876

Ensure a namespace alias doesn't get incorrectly identifier as a namespace

Reviewed By: HazardyKnusperkeks, curdeius, owenpan

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

Fixes: #35876
2021-12-14 14:53:04 +00:00
Florian Hahn ddfac0759c
Revert "[MemoryLocation] Handle memset_pattern{4,8,16} in getForDest."
This reverts commit ac60263ad1.

It looks like the test fails on certain non-Darwin system, even though
the triple is explicitly set to macos. Revert while I investigate.
2021-12-14 14:48:47 +00:00
Nikita Popov 7abf299fed [InlineAdvisor] Add option to control deferred inlining (NFC)
This change is split out from D115497 to add the option
independently from the switch of the default value.
2021-12-14 15:46:11 +01:00
Fraser Cormack 8002fa6760 [LangRef] Remove incorrect vector alignment rules
The LangRef incorrectly says that if no exact match is found when
seeking alignment for a vector type, the largest vector type smaller
than the sought-after vector type. This is incorrect as vector types
require an exact match, else they fall back to reporting the natural
alignment.

The corrected rule was not added in its place, as rules for other types
(e.g., floating-point types) aren't documented.

A unit test was added to demonstrate this.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D112463
2021-12-14 14:35:40 +00:00
Nikolas Klauser 10a356c47a [libc++] Make __swap_allocator constexpr
Make `__swap_allocator` constexpr

Reviewed By: Quuxplusone, ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D115719
2021-12-14 15:41:56 +01:00
Florian Hahn ac60263ad1
[MemoryLocation] Handle memset_pattern{4,8,16} in getForDest.
memset_pattern{4,8,16} writes to the first argument. Use getForDest
to return the corresponding MemoryLocation.

Reviewed By: ab

Differential Revision: https://reviews.llvm.org/D114906
2021-12-14 14:41:28 +00:00
Nikolas Klauser a376a3f354 [libc++] Make __compressed_pair fully constexpr
Make `__compressed_pair` fully constexpr

Reviewed By: ldionne, #libc, nilayvaish

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D115687
2021-12-14 15:39:46 +01:00
Simon Atanasyan d5d8b1c972 [llvm-objcopy] Fix handling of MIPS64 little endian files
MIPS64 little endian target has a "special" encoding of `r_info`
relocation record field. Instead of one 64-bit little endian number, it
is a little endian 32-bit number followed by a 32-bit big endian number.
For correct reading and writing such fields we must provide information
about target machine into the corresponding routine. This patch does
this for the `llvm-objcopy` tool and fix handling of MIPS64 little
endian files.

The bug was reported in the issue #52647.

Differential Revision: https://reviews.llvm.org/D115635
2021-12-14 17:21:27 +03:00
Alexey Bataev bd05376986 [SLP]Improve multinode analysis.
Changes the preliminary multinode analysis:
1. Introduced scores for reversed loads/extractelements.
2. Improved shallow score calculation.
3. Lowered the cost of external uses (no need to consider it several times, just ones).
4. The initial lane for analysis is the one with the minimal possible
   reorderings.

These changes in general shall reduce compile time and improve the
reordering in many cases.

Part of D57059.

Differential Revision: https://reviews.llvm.org/D101109
2021-12-14 06:01:52 -08:00
Kiran Chandramohan 135d5d4a6d [Flang][NFC] Convert static to static inline for a function
Reviewed By: clementval

Differential Revision: https://reviews.llvm.org/D115619
2021-12-14 13:49:58 +00:00
Jamie Schmeiser 6fef0ffa14 Revert unnecessary and incorrect change made to GraphWriter
Summary:
As pointed out in https://github.com/llvm/llvm-project/issues/52610, the
changes to GraphWriter made in https://reviews.llvm.org/D87202 introduced
some bad code and the changes are actually unnecessary for
-print-changed=dot-cfg. The code in question is guarded by a call to
DefaultDOTGraphTraits::hasEdgeDestLabels() which is always false when the
graph writer is called for -print-changed=dot-cfg. Revert this section of
the changes.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By:jrtc27(Jessica Clarke), xgupta(Shivam Gupta)
Differential Revision: https://reviews.llvm.org/D115649
2021-12-14 08:42:35 -05:00
Nikita Popov 6213f1dd03 [IR] Make VPIntrinsic::getDeclarationForParams() opaque pointer compatible
The vp.load and vp.gather intrinsics require the intrinsic return
type to determine the correct function signature. With opaque pointers,
it cannot be derived from the parameter pointee types.

Differential Revision: https://reviews.llvm.org/D115632
2021-12-14 14:20:59 +01:00
Nikita Popov d733f2c68c [OpenMPIRBuilder] Support opaque pointers in reduction handling
Make the reduction handling in OpenMPIRBuilder compatible with
opaque pointers by explicitly storing the element type in ReductionInfo,
and also passing it to the atomic reduction callback, as at least
the ones in the test need the type there.

This doesn't make things fully compatible yet, there are other
uses of element types in this class. I also left one
getPointerElementType() call in mlir, because I'm not familiar
with that area.

Differential Revison: https://reviews.llvm.org/D115638
2021-12-14 14:07:47 +01:00
David Green 26f6fbe2be [ARM] Add AddrModeT2_i8neg addressing mode support for frame lowering.
As reported from a failing firefox build, we can sometimes get frame
indices with negative offsets from a t2LDRi8. This adds support for
them, to prevent the crash.
2021-12-14 12:49:27 +00:00
Matthias Springer 81eece7f26 [mlir][linalg][bufferize] Debug output as IR attributes
Instead of printing analysis debug information to stderr, annotate the IR. This makes it easier to understand decisions made by the analysis, especially in larger input IR.

Differential Revision: https://reviews.llvm.org/D115575
2021-12-14 21:29:43 +09:00
Simon Moll 6847379e89 [VE] MUL,SUB,OR,XOR v256i32|64 isel
v256i32|i64 isel patterns and tests.

Reviewed By: kaz7

Differential Revision: https://reviews.llvm.org/D115643
2021-12-14 13:23:48 +01:00
Benjamin Kramer 12d42653b3 [bazel] Port debuginfod rules
Needed after 34491ca729
2021-12-14 13:14:30 +01:00
Alexandros Lamprineas 65033ef9e8 [AArch64] Add a tablegen pattern for UZP1.
Converts concat_vectors(V64 (trunc V128), V64 (trunc V128)), which
would otherwise be lowered as xtn followed by xtn2, to uzp1.

Differential Revision: https://reviews.llvm.org/D115435
2021-12-14 11:51:05 +00:00
Nikolas Klauser f2eab339b9 [libc++][NFC] Remove goto from std::string
Remove `goto` from `std::string`

Reviewed By: Quuxplusone, ldionne, #libc, nilayvaish

Spies: nilayvaish, libcxx-commits

Differential Revision: https://reviews.llvm.org/D115598
2021-12-14 12:35:02 +01:00
John Brawn dc9f65be45 [AArch64][SVE] Fix handling of stack protection with SVE
Fix a couple of things that were causing stack protection to not work
correctly in functions that have scalable vectors on the stack:
 * Use TypeSize when determining if accesses to a variable are
   considered out-of-bounds so that the behaviour is correct for
   scalable vectors.
 * When stack protection is enabled move the stack protector location
   to the top of the SVE locals, so that any overflow in them (or the
   other locals which are below that) will be detected.

Fixes: https://github.com/llvm/llvm-project/issues/51137

Differential Revision: https://reviews.llvm.org/D111631
2021-12-14 11:30:48 +00:00
Nikita Popov b81450afb6 [CodeGen] Add std:: qualifier
Hopefully addresses the buildbot failures.
2021-12-14 12:17:55 +01:00
Nikita Popov b8d121eb1d [CodeGen] Require use of Address::invalid() for invalid address (NFC)
This no longer allows creating an invalid Address through the regular
constructor. There were only two places that did this (AggValueSlot
and EHCleanupScope) which did this by converting a potential nullptr
into an Address. I've fixed both of these by directly storing an
Address instead.

This is intended as a bit of preliminary cleanup for D103465.

Differential Revision: https://reviews.llvm.org/D115630
2021-12-14 12:06:05 +01:00
Florian Hahn ff3b085ab0
[X86] Use bundle for CALL_RVMARKER expansion.
This patch updates expandCALL_RVMARKER to wrap the call, marker and
objc runtime call in an instruction bundle. This ensures later passes,
like machine block placement, cannot break them up.

On AArch64, the instruction sequence is already wrapped in a bundle.
Keeping the whole instruction sequence together is highly desirable for
performance and outweighs potential other benefits from breaking the
sequence up.

Reviewed By: ahatanak

Differential Revision: https://reviews.llvm.org/D115230
2021-12-14 10:53:22 +00:00
Jan Svoboda 47eec789ed [clang][deps] Remove hard-coded resource directory from tests
Dependency scanner test for resource directory deduction doesn't account for LLVM builds with custom `CLANG_RESOURCE_DIR`.

This patch ensures we don't hardcode the default behavior into the test and take into account the actual value. This is done by running `%clang -print-resource-dir` and using that as the expected value in test assertions.
New comment also clarifies this is different from running that command as part of the dependency scan.

Reviewed By: mgorny

Differential Revision: https://reviews.llvm.org/D115628
2021-12-14 10:59:47 +01:00