Commit Graph

441987 Commits

Author SHA1 Message Date
Brett Werling cf4f35b788 [ELF] Handle GCC collect2 -plugin-opt= on Windows
Follows up on commit cd5d5ce235 by
additionally ignoring relative paths ending in "lto-wrapper.exe" as
can be the case for GCC cross-compiled for Windows.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D138065
2022-11-16 09:58:50 -08:00
Muhammad Omair Javaid f678217c24 [llvm-objcopy] XFAIL ELF/update-section.test on 32-bit arm
ELF/update-section.test is failing on 32-bit arm targets. It was
enabled by commit 4f0a1201a4. I am marking it as XFAIL for now.
2022-11-16 21:50:26 +04:00
Simon Pilgrim becf7b2259 [X86] Remove unnecessary override GFNI AFFINE reg-reg overrides from AlderlakeP model
Now matches the default SchedWriteVecIMul values used for the instruction.

NOTE: The folded variant overrides are still there as the latency differs by 1cy
2022-11-16 17:46:29 +00:00
Teresa Johnson 9eacbba290 Restore "[MemProf] ThinLTO summary support" with more fixes
This restores commit 98ed423361 and
follow on fix 00c22351ba, which were
reverted in 5d938eb6f7 due to an
MSVC bot failure. I've included a fix for that failure.

Differential Revision: https://reviews.llvm.org/D135714
2022-11-16 09:42:41 -08:00
Sander de Smalen c2600244fc [AArch64] NFC: Fix broken test sve-fixed-ld2-alloca.ll
There were several issues with this test, the most obvious being
that %strided.vec wasn't used and therefore could be deadcoded.

I've verified that the updated test still covers the code-changes
from its original patch.
2022-11-16 17:23:20 +00:00
Nick Desaulniers 2d3d8c9ad7 [LangRef] remove callbr references from Addresses of BasicBlock section
Since D129288, we no longer use BlockAddress constants as operands of
callbr.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D138080
2022-11-16 09:19:20 -08:00
Matt Arsenault ad3c91eedc MemoryBuiltins: Don't check for unsized allocas
The verifier rejects these.
2022-11-16 09:13:11 -08:00
Simon Pilgrim c6a838e9c8 [MCA][X86] Add test coverage for VBMI instructions 2022-11-16 16:58:26 +00:00
Guray Ozen 5ce68f4284 [mlir] Introduce `replaceUsesOfWith` to `RewriterBase`
Finding uses of a value and replacing them with a new one is a common method. I have not seen an safe and easy shortcut that does that. This revision attempts to address that by intoroducing `replaceUsesOfWith` to `RewriterBase`.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D138110
2022-11-16 17:53:11 +01:00
Sander de Smalen 6f48e68d39 [SME] Store buffer to the correct pointer when setting up lazy-save.
This fixes a bug in 'allocateLazySaveBuffer' that led to the
buffer pointer being stored to the wrong address.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D137734
2022-11-16 16:37:33 +00:00
Mahesh Ravishankar da8a8e9280 [mlir][Linalg] Move patterns to remove dead arguments and results out of canonicalization.
The patterns to remove dead arguments and results of `linalg.generic`
operations are not necessarily canonicalizations. Instead a new entry
point `populateEraseUnusedOperandsAndResults` is added to allow using
these patterns when needed. The transformations that rely on this
pattern for cleanup now include these patterns explicitly.

Differential Revision: https://reviews.llvm.org/D138085
2022-11-16 16:00:43 +00:00
Aart Bik 8474a20b1f [mlir][sparse] bring CHECK tests back (but disabled)
We have a strange nondeterministic failure on windows
by not getting the desired fill statement in the resulting
IR. Probably something wrong with our option passing or
pass construction?

https://github.com/llvm/llvm-project/issues/59016#issuecomment-1316410249

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D138089
2022-11-16 07:55:50 -08:00
Kadir Cetinkaya e5739eb4f8
[include-cleaner] Defer decl->stdlib conversion into decl->location conversion
We preserve decls for stdlib symbols after this patch in symbol. That
way we have a more unified view of stdlib and regular decls and can provide
reacher information in applications.

Differential Revision: https://reviews.llvm.org/D138134
2022-11-16 16:52:39 +01:00
Matt Arsenault 712d35b417 GlobalISel: Fold some idempotent operations
This makes the existing fabs_fabs fold redundant, which
I thought was using more tablegen matching, but apparently not.
I'm not sure how to make match work with multiple opcodes. There
are a few more this could handle, but these are the ones that
legalization are more likely to introduce.
2022-11-16 07:44:46 -08:00
Alexey Bataev 2f8f17c157 [SLP]Fix PR58956: fix insertpoint for reduced buildvector graphs.
If the graph is only the buildvector node without main operation, need
to inherit insrtpoint from the redution instruction. Otherwise the
compiler crashes trying to insert instruction at the entry block.
2022-11-16 07:38:49 -08:00
zhongyunde 8fbb6f8678 [NFC] Fix typo in comment
Address comment in https://reviews.llvm.org/D137936

Differential Revision: https://reviews.llvm.org/D138124
2022-11-16 23:35:53 +08:00
Erich Keane 6c38ffc7b6 [Concepts] Fix friend-checking to include NTTPs
More work for temp.friend p9, this fixes a previous bug where we didn't
properly consider a friend to depend on the enclosing template if it
only did so via an NTTP.
2022-11-16 07:33:15 -08:00
LLVM GN Syncbot ed4943d560 [gn build] Port 332c4af35d 2022-11-16 15:19:13 +00:00
Muhammad Omair Javaid 332c4af35d Revert "[NFC] Make format() more amenable to format attributes"
This reverts commit cf239c2f17.
It has broken tools/llvm-dwarfdump/X86/simplified-template-names.s on
following buildbot:
https://lab.llvm.org/buildbot/#/builders/178/builds/3148
2022-11-16 19:09:49 +04:00
serge-sans-paille cb3f8d53e6
[Lexer] Speedup LexTokenInternal
Only reset "NeedsCleaning" flag in case of re-entrant call.
Do not needlessly blank IdentifierInfo. This information will be set
once the token type is picked.

This yields a nice 1% speedup when pre-processing sqlite amalgamation
through:

valgrind --tool=callgrind ./bin/clang -E sqlite3.c -o/dev/null

Differential Revision: https://reviews.llvm.org/D137960
2022-11-16 15:57:32 +01:00
Jay Foad 462e461666 [AMDGPU] Reinstate some dwordx3 tests 2022-11-16 14:57:01 +00:00
Nicholas Guy 41a3f92596 [AArch64][CodeGen] Add AArch64 support for complex deinterleaving
Differential Revision: https://reviews.llvm.org/D129066
2022-11-16 14:00:54 +00:00
Joseph Huber 0e7e426c0c [OMPT] Fix debug prefix not being defined
Summary:
This header file uses the `DP` prefixes but does not define
`DEBUG_PREFIX`. This patch adds a simple fix, but realistically the `DP`
system isn't ideal. Now that we have access to LLVM libraries and other
utilities we should consider rewriting all of the debugging and error
handling glue.
2022-11-16 07:53:16 -06:00
Paul Robinson 56470b72f1 [lit] Add `target=<triple>` as a feature keyword
As proposed first in D107162 and later in discourse at
https://discourse.llvm.org/t/rfc-lits-requires-and-triples/66041

Modified a couple of lit's own tests to use this; left others as-is,
because for now triple substrings still work in UNSUPPORTED/XFAIL.

Differential Revision: https://reviews.llvm.org/D137434
2022-11-16 05:50:45 -08:00
Dmitry Preobrazhensky e468b1b740 [AMDGPU][GFX11] Refactor VOPD operands handling
Differential Revision: https://reviews.llvm.org/D137952
2022-11-16 16:29:12 +03:00
David Green 71609871dd [AArch64][MachineCombiner] Use MIMetadata to copy pcsections metadata to reassociated instructions.
D134260/D138107 exposed that the MachineCombiner was not copying
pcsections metadata where it should. This patch switches the MIBuild
methods to use MIMetadata that can copy the debug loc and pcsections at
the same time.

Differential Revision: https://reviews.llvm.org/D138112
2022-11-16 13:22:48 +00:00
Kevin Sala 6bacbea826 [Libomptarget] Build plugins-nextgen/common/PluginInterface with protected visibility
Summary:
This commit sets the default visibility of PluginInterface's symbols (in
nextgen plugins) as protected. This prevents symbols from a plugin
library to be preempted by another plugin library's symbol. It applies
the same fix introduced by D136365.

Issue reported by @ggeorgakoudis.

Differential Revision: https://reviews.llvm.org/D138002
2022-11-16 07:11:38 -06:00
Simon Pilgrim a92f5a08a1 [DAG] simplifySelect - add support for vselect(0, T, F) -> F fold
We still need to add handling for the non-zero T fold (which requires getBooleanContents handling)
2022-11-16 13:11:14 +00:00
Guillaume Chatelet 2a6d4c5d8a [libc][benchmark] Fix wrong BatchSize leading to data not fitting in L1.
Differential Revision: https://reviews.llvm.org/D138111
2022-11-16 12:55:37 +00:00
Lorenzo Chelini c9f0a3e39d [MLIR][Tensor] Clean-up `ops.mlir` test (NFC)
Split input file was not used.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D138009
2022-11-16 13:46:16 +01:00
David Green 5f7f484ee5 [AArch64] Add GPR rr instructions to isAssociativeAndCommutative
This adds some more scalar instructions that are both associative and
commutative to isAssociativeAndCommutative, allowing the machine
combiner to reassociate them to reduce critical path length.

Differential Revision: https://reviews.llvm.org/D134260
2022-11-16 12:39:13 +00:00
John Brawn 49510c5020 [AArch64] Mark all instructions that read/write FPCR as doing so
All instructions that can raise fp exceptions also read FPCR, with the
only other instructions that interact with it being the MSR/MRS to
write/read FPCR.

Introducing an FPCR register also requires adjusting
invalidateWindowsRegisterPairing in AArch64FrameLowering.cpp to use
the encoded value of registers instead of their enum value, as the
enum value is based on the alphabetical order of register names and
now FPCR is placed between FP and LR.

This change unfortunately means a large number of mir tests need to
be adjusted due to instructions now requiring an implicit fpcr operand
to be present.

Differential Revision: https://reviews.llvm.org/D121929
2022-11-16 12:29:50 +00:00
OCHyams 4898568caa [Assignment Tracking][11/*] Update RemoveRedundantDbgInstrs
The Assignment Tracking debug-info feature is outlined in this RFC:

https://discourse.llvm.org/t/
rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir

Update the RemoveRedundantDbgInstrs utility to avoid sometimes losing
information when deleting dbg.assign intrinsics.

removeRedundantDbgInstrsUsingBackwardScan - treat dbg.assign intrinsics that
are not linked to any instruction just like dbg.values. That is, in a block of
contiguous debug intrinsics, delete all other than the last definition for a
fragment. Leave linked dbg.assign intrinsics in place.

removeRedundantDbgInstrsUsingForwardScan - Don't delete linked dbg.assign
intrinsics and don't delete the next intrinsic found even if it would otherwise
be eligible for deletion.

remomveUndefDbgAssignsFromEntryBlock - Delete undef and unlinked dbg.assign
intrinsics encountered in the entry block that come before non-undef
non-unlinked intrinsics for the same variable.

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D133294
2022-11-16 12:27:18 +00:00
Michał Górny b3f94fe1c3 [clang][Driver] allow tilde in user config dir
This patch allows users to configure clang with option
e.g. `-DCLANG_CONFIG_FILE_USER_DIR=~/.config/clang` or invoke clang
with `--config-user-dir=~/.config/clang`.

Patch merged on behalf of @paperchalice (LJC)

Differential Revision: https://reviews.llvm.org/D136940
2022-11-16 13:23:25 +01:00
luxufan f8979512ea [JITLink][RISCV] Add R_RISCV_LO12_S relocation support
Fixes: https://github.com/llvm/llvm-project/issues/58979

Reviewed By: Hahnfeld

Differential Revision: https://reviews.llvm.org/D138030
2022-11-16 19:50:18 +08:00
Simon Pilgrim ff252e6b13 [X86] combineConcatVectorOps - don't concat(vselect,vselect) if the concatenated selection mask isn't legal
One of the crash regression tests now exposes an existing issue with SelectionDAG::simplifySelect not folding vselect with constant masks

Fixes #59003
2022-11-16 11:49:14 +00:00
Benjamin Maxwell a95a8188e8 [AArch64] Lower fixed-length vector_shuffle to SVE splat if possible
This adds an extra case to check if a vector_shuffle for a fixed-length
vector that's being lowered to SVE, is just a splat. Doing this avoids
a round trip to the stack and back for a few cases.

Reviewed By: c-rhodes

Differential Revision: https://reviews.llvm.org/D137966
2022-11-16 11:47:27 +00:00
Jeremy Morse 5d938eb6f7 Revert "Restore "[MemProf] ThinLTO summary support" with fixes"
This reverts commit 00c22351ba.
This reverts commit 98ed423361.

Seemingly MSVC has some kind of issue with this patch, in terms of linking:

  https://lab.llvm.org/buildbot/#/builders/123/builds/14137

I'll post more detail on D135714 momentarily.
2022-11-16 11:21:02 +00:00
Pavel Labath 22887ff964 Revert "Send statistics in initialized event"
The test is failing on linux.

This reverts commits 7fe3586cda and
d599ac41aa.
2022-11-16 12:20:21 +01:00
Benjamin Maxwell 1814921893 [AArch64][CodeGen] Remove redundant vector negations before concat
This adds a new canonicalization rule to replace concats of truncated
negations with a negation of the concatenated truncates, e.g.

    (concat_vectors (v4i16 (truncate (not (v4i32)))),
                    (v4i16 (truncate (not (v4i32)))))
   ->
    (not (concat_vectors (v4i16 (truncate (v4i32))),
                         (v4i16 (truncate (v4i32)))))

Doing this allows avoiding redundant negations being emitted in
certain cases.

Reviewed By: peterwaller-arm

Differential Revision: https://reviews.llvm.org/D137433
2022-11-16 11:17:07 +00:00
Simon Pilgrim 5ea7b6b78f [X86] vselect-avx.ll - add AVX512 test coverage
Ensure we test predicate selects as well
2022-11-16 11:12:27 +00:00
Guillaume Chatelet a5f4f12b5e [libc][NFC] move memmove implementation
Moving memmove implementation to its own file for symmetry with other mem functions.

Differential Revision: https://reviews.llvm.org/D136687
2022-11-16 10:36:14 +00:00
Guillaume Chatelet fe8d211f1a [libc] deprecate LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB
Differential Revision: https://reviews.llvm.org/D136693
2022-11-16 10:33:20 +00:00
Guillaume Chatelet 534f4bca58 [libc] remove mem functions dead code
Let's wait a bit for https://reviews.llvm.org/D136595 to settle before
cleaning up. Just in case we would need to revert.

Differential Revision: https://reviews.llvm.org/D136673
2022-11-16 10:29:29 +00:00
Ties Stuij 983f63f7f0 [AArch64][ARM] add Armv8.9-a/Armv9.4-a identifier support
For both ARM and AArch64 add support for specifying -march=armv8.9a/armv9.4a to
clang. Add backend plumbing like target parser and predicate support.

For a summary of Amv8.9/Armv9.4 features, see:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022

For detailed information, consult the Arm Architecture Reference Manual for
A-profile architecture:
https://developer.arm.com/documentation/ddi0487/latest/

People who contributed to this patch:
- Keith Walker
- Ties Stuij

Reviewed By: tmatheson

Differential Revision: https://reviews.llvm.org/D138010
2022-11-16 10:20:14 +00:00
OCHyams a1ac6efcb0 [NFC][SelectionDAG][DebugInfo] Refactor DanglingDebugInfo class
Hide the underlying DbgValueInst by adding methods to extract the necessary
information and by adding a raw_ostream &operator<< overload to print it.

Remove the DebugLoc field as this is always the same as the DbgValueInst's
DebugLoc (see D136247).

Reviewed By: StephenTozer

Differential Revision: https://reviews.llvm.org/D136249
2022-11-16 10:10:24 +00:00
OCHyams 9792744650 [NFC][SelectionDAG][DebugInfo] Remove duplicate parameter from handleDebugValue
handleDebugValue has two DebugLoc parameters that appear to always take the
same value. Remove one of the duplicate parameters. See phabricator review for
more detail.

Reviewed By: StephenTozer

Differential Revision: https://reviews.llvm.org/D136247
2022-11-16 09:59:35 +00:00
Reed e08ca4bb1d Add Float8E4M3FN type to MLIR.
The paper https://arxiv.org/abs/2209.05433 introduces two new FP8 dtypes: E5M2 (called Float8E5M2 in LLVM) and E4M3 (called Float8E4M3FN in LLVM). Support for Float8E5M2 in APFloat and MLIR was added in https://reviews.llvm.org/D133823. Support for Float8E4M3FN in APFloat was added in https://reviews.llvm.org/D137760. This change adds Float8E4M3FN to MLIR as well.

There is an RFC for adding the FP8 dtypes here: https://discourse.llvm.org/t/rfc-add-apfloat-and-mlir-type-support-for-fp8-e5m2/65279.

This change is identical to the MLIR changes in the patch that added Float8E5M2, except that Float8E4M3FN is added instead.

Reviewed By: stellaraccident, bkramer, rriddle

Differential Revision: https://reviews.llvm.org/D138075
2022-11-16 10:24:25 +01:00
Vladislav Vinogradov 2ada5cbea4 [mlir][linalg] Fix bug in InferStaticShapeOfOperands pattern
The pattern tries to deduce static shape from `tensor.cast` producer of linalg operation operands.
The original code unconditionally casts type of the `tensor.cast` source to `RankedTensorType`.
But the `tensor.cast` can also operate on `UnrankedTensorType`, so this cast either fail on assertion
in debug build or introduce UB in release build.

The patch replaces unconditional cast with `dyn_cast` and check for the cast result.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D137775
2022-11-16 12:19:16 +03:00
Timm Bäder 981dac8bd6 [clang][Parse][NFC] Remove unused DenseMap 2022-11-16 10:02:52 +01:00