wren romano [Wed, 17 May 2023 20:23:04 +0000 (13:23 -0700)]
[mlir][sparse] Adjusting error message wording, to better match new field names
This is a followup to D150330, split out because it's not purely mechanical.
Depends On D150330
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D150409
Alex Langford [Thu, 4 May 2023 00:09:32 +0000 (17:09 -0700)]
[lldb] Refactor ObjCLanguage::MethodName
The goal of this patch is to make it easier to reason about the state of
ObjCLanguage::MethodName. I do that in several ways:
- Instead of using the constructor directly, you go through a factory
method. It returns a std::optional<MethodName> so either you got an
ObjCLanguage::MethodName or you didn't. No more checking if it's valid
to know if you can use it or not.
- ObjCLanguage::MethodName is now immutable. You cannot change its
internals once it is created.
- ObjCLanguage::MethodName::GetFullNameWithoutCategory previously had a
parameter that let you get back an empty string if the method had no
category. Every caller of this method was enabling this behavior so I
dropped the parameter and made it the default behavior.
- No longer store all the various components of the method name as
ConstStrings. The relevant `Get` methods now return llvm::StringRefs
backed by the MethodName's internal storage. The lifetime of these
StringRefs are tied to the MethodName itself, so if you need to
persist these you need to create copies.
Differential Revision: https://reviews.llvm.org/D149914
LLVM GN Syncbot [Thu, 18 May 2023 21:29:09 +0000 (21:29 +0000)]
[gn build] Port
16eb14806d1e
Alex Langford [Fri, 12 May 2023 22:32:51 +0000 (15:32 -0700)]
[lldb][NFCI] Switch to using llvm::DWARFAbbreviationDeclaration
Both LLVM and LLDB implement DWARFAbbreviationDeclaration. As of
631ff46cbf51, llvm's implementation of
DWARFAbbreviationDeclaration::extract behaves the same as LLDB's
implementation, making it easier to merge the implementations.
The only major difference between LLDB's implementation and LLVM's
implementation is that LLVM's DWARFAbbreviationDeclaration is slightly
larger. Specifically, it has some metadata that keeps track of the size
of a declaration (if it has a fixed size) so that it can potentially
optimize extraction in some scenarios. I think this increase in size
should be acceptable and possibly useful on the LLDB side.
Differential Revision: https://reviews.llvm.org/D150716
Peter Klausler [Wed, 17 May 2023 17:23:18 +0000 (10:23 -0700)]
[flang] Don't complain about dummy subroutine under IMPLICIT NONE
The compiler emits a bogus 'No explicit type declared for...' error
when a dummy procedure turns out to be a subroutine (or at least not
a function or object) under control of IMPLICIT NONE.
Fixes https://github.com/llvm/llvm-project/issues/60224
Differential Revision: https://reviews.llvm.org/D150814
Nick Desaulniers [Thu, 18 May 2023 20:52:25 +0000 (13:52 -0700)]
[libcxxabi] allow downstreams to override _LIBCPP_VERBOSE_ABORT
@asbirlea reports that Google does this for sanitizer analysis
downstream. Looks like a few #defines are added into a header which is
then injected into the build.
Reviewed By: vitalybuka, ldionne, #libc_abi
Differential Revision: https://reviews.llvm.org/D150825
Fazlay Rabbi [Thu, 11 May 2023 18:18:02 +0000 (11:18 -0700)]
[OpenMP 5.2] Deprecate MINUS(-) operator on 'reduction' clause
Siva Chandra Reddy [Thu, 18 May 2023 19:25:41 +0000 (19:25 +0000)]
[libc] Use the new wide integer to hex string facility in LibcTest.
The old code, which has regressed over many cleanups, has been replaced
with the new wide integer to hex string facility.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D150901
Peiming Liu [Tue, 16 May 2023 23:52:45 +0000 (23:52 +0000)]
[mlir][sparse] Make sparse_tensor::StorageLayout publicly available.
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D150739
Johannes Doerfert [Mon, 15 May 2023 23:02:38 +0000 (16:02 -0700)]
[Attributor][OpenMP-Opt][NFC] Run the update test checks script
Johannes Doerfert [Mon, 15 May 2023 22:37:40 +0000 (15:37 -0700)]
[OpenMP] Add JIT and IR tests
The OpenMP target JIT needs testing, so does the IR we actually generate
for the device. This is the initial commit with variations of an "empty
OpenMP kernel" that should all result in a empty IR kernel.
Differential revision: https://reviews.llvm.org/D150623
Johannes Doerfert [Mon, 15 May 2023 20:52:20 +0000 (13:52 -0700)]
[Attributor] Teach AAMemoryLocation about constant GPU memory
AS(4), when targeting GPUs, is constant. Accesses to constant memory are
(historically) not treated as "memory accesses", hence we should deduce
`memory(none)` for those.
Johannes Doerfert [Mon, 15 May 2023 19:38:20 +0000 (12:38 -0700)]
[OpenMP][NFC] Eliminate warning
Craig Topper [Thu, 18 May 2023 20:25:28 +0000 (13:25 -0700)]
[RISCV] Fix test that was still using __RISCV_RVV_VLEN_BITS. NFC
This constant was renamed to __riscv_v_fixed_vlen during code
review. I missed this in my search and replace.
Joseph Huber [Thu, 18 May 2023 20:20:17 +0000 (15:20 -0500)]
[libc] Add comparison specialization for cpp:string type
We compare this type in the string_test. It had no specialization here
so it could cause linker errors. This patch simply extends the interface
to support it.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D150904
Matt Arsenault [Thu, 18 May 2023 20:19:19 +0000 (21:19 +0100)]
AMDGPU/GlobalISel: Fix broken test
Michael Platings [Thu, 18 May 2023 20:14:56 +0000 (21:14 +0100)]
[NFC][Driver] Fix -Wdangling-else warning
GCC emits this warning because the EXPECT_STREQ macro contains an
if-else statement:
warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
Alexander Shaposhnikov [Thu, 18 May 2023 20:08:54 +0000 (20:08 +0000)]
[Clang] Fix typo in ReleaseNotes.rst
Alexander Shaposhnikov [Thu, 18 May 2023 20:02:07 +0000 (20:02 +0000)]
[Clang] Update release notes
Update release notes.
This is a follow-up to https://reviews.llvm.org/D146178
Differential revision: https://reviews.llvm.org/D149906
Evandro Menezes [Thu, 18 May 2023 00:07:02 +0000 (19:07 -0500)]
[AArch64] Predicate for ROR immediate
Add a common predicate for when the `ROR` immediate or "Bitfield
extract, one register" idiom is used for `EXTR` or "Bitfield extract,
two registers".
Differential revision: https://reviews.llvm.org/D150832
Hanhan Wang [Fri, 12 May 2023 23:30:59 +0000 (16:30 -0700)]
[mlir][linalg] Unify generic vectorization interface.
It breaks the logic of maskedVectorize (on tensor.pad ops) into
precondition checks and vectorization implementation; unifies the
interface.
The revision also rename`s vectorizeLinalgOpPrecondition` to
`vectorizeOpPrecondition` because we can vectorize ops other
than LinalgOps.
Reviewed By: dcaballe
Differential Revision: https://reviews.llvm.org/D150495
Aaron Ballman [Thu, 18 May 2023 19:57:56 +0000 (15:57 -0400)]
Fix LLVM Sphinx build
Addresses the issue found in:
https://lab.llvm.org/buildbot/#/builders/30/builds/35298
Anders Waldenborg [Tue, 16 May 2023 06:19:55 +0000 (08:19 +0200)]
[bindings] Remove LLVM python bindings
The LLVM python bindings are defunct.
They have not seen any substantial active development since 2014.
The version number, which is used to find the libLLVM-NN.so library, has
not been updated since LLVM 10.0 (2019) (and even then they were
probably mostly broken)
After fixing the version number to be able to run them at all, a large
number of tests in the test suite fails.
Already in 2017 the removal was discussed:
https://discourse.llvm.org/t/is-anyone-using-still-using-the-python-bindings/46063
https://lists.llvm.org/pipermail/llvm-dev/2017-August/116857.html
There exist external projects providing python bindings for LLVM, e.g:
https://github.com/numba/llvmlite
Differential Revision: https://reviews.llvm.org/D150642
Argyrios Kyrtzidis [Fri, 12 May 2023 19:30:06 +0000 (12:30 -0700)]
[clang/Driver] Also consider `gnu++` standard when checking for modules support
Differential Revision: https://reviews.llvm.org/D150473
wren romano [Wed, 17 May 2023 20:44:45 +0000 (13:44 -0700)]
[mlir][sparse] Calling `SparseTensorType::get{Pos,Crd}Type` directly
The `SparseTensorType` versions of these methods have some special handling to ensure that they work for unannotated tensors; whereas, the `stt.getEncoding().get{Pos,Crd}Type()` idiom can cause segfaults.
Reviewed By: Peiming
Differential Revision: https://reviews.llvm.org/D150815
Peter Klausler [Wed, 17 May 2023 21:29:25 +0000 (14:29 -0700)]
[flang] Allow redudant attributes on use-/host- associated names
Constraint C815 in F'2018 allows a name to acquire an attribute at
most once per scope. For some attributes, the attribute may have
already been inherited, and the compiler was emitting a bogus error
message for a redundant application of the same attribute in another
scope.
Fixes https://github.com/llvm/llvm-project/issues/60274
Differential Revision: https://reviews.llvm.org/D150819
Diego Caballero [Thu, 18 May 2023 17:35:42 +0000 (17:35 +0000)]
[mlir][Vector] Add folding for vector.mask with all-true masks
This patch removes `vector.mask` operations with all-true masks (i.e.,
all lanes enabled).
Reviewed By: hanchung
Differential Revision: https://reviews.llvm.org/D150743
Joseph Huber [Thu, 18 May 2023 19:04:04 +0000 (14:04 -0500)]
[libc] Disable newly added test from running on NVPTX
A recent patch enabled this test which turns out to segfault on the
NVPTX architecture. We disable it for now.
Differential Revision: https://reviews.llvm.org/D150898
Amaury Séchet [Thu, 18 May 2023 18:33:01 +0000 (18:33 +0000)]
[NFC][DAG] Simplify a giant expression in visitMul.
Peter Klausler [Wed, 17 May 2023 15:34:35 +0000 (08:34 -0700)]
[flang] Fix bogus error under IMPLICIT NONE(EXTERNAL)
Don't emit an error message for a possible implicit use of an
external procedure when it is known that the symbol is not
a procedure (e.g., an array).
Fixes https://github.com/llvm/llvm-project/issues/62047
Differential Revision: https://reviews.llvm.org/D150789
Artem Belevich [Thu, 18 May 2023 18:41:14 +0000 (11:41 -0700)]
Revert "[NVPTX/CUDA] added an optional src_size argument to __nvvm_cp_async*"
Breaks MLIR which happens to be using the intrinsics.
This reverts commit
e7b9c2f00fa04ef8d9b69ee0e36d7775823dbe6b.
Matt Arsenault [Tue, 11 Apr 2023 19:44:37 +0000 (15:44 -0400)]
SimplifyLibCalls: Pass AssumptionCache to isKnownNeverInfinity
Let's assumes work for determining no infinities.
Matt Arsenault [Sun, 7 May 2023 10:41:39 +0000 (11:41 +0100)]
AMDGPU: Fix missing C++ mode comment
Matt Arsenault [Tue, 9 May 2023 15:21:19 +0000 (16:21 +0100)]
AMDGPU: Drop broken fast math patterns for fract matching
These didn't make much sense and we can match the real
pattern.
Matt Arsenault [Thu, 4 May 2023 20:25:26 +0000 (16:25 -0400)]
AMDGPU: Add baseline tests for fract matching
Matt Arsenault [Sun, 7 May 2023 10:19:36 +0000 (11:19 +0100)]
AMDGPU: Add baseline test for gfx8 fptrunc combine
Peter Klausler [Wed, 17 May 2023 14:57:38 +0000 (07:57 -0700)]
[flang] Better error recovery for missing THEN in IF construct
Presented with "IF (...)" with no following tokens in the statement,
diagnose a missing "THEN" instead of complaining about all of the
possible action statement initial tokens that could have been there
for a non-construct IF statement.
Fixes https://github.com/llvm/llvm-project/issues/62299.
Differential Revision: https://reviews.llvm.org/D150783
Craig Topper [Thu, 18 May 2023 18:37:22 +0000 (11:37 -0700)]
[RISCV] Fix comment about what version of Zvk* we support. NFC
We support 0.5.1.
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D150888
Fangrui Song [Thu, 18 May 2023 18:31:38 +0000 (11:31 -0700)]
[test] Driver/code-coverage.c: chdir to a temporary directory
-coverage-notes-file=aaa.gcno -coverage-data-file=bbb.gcda creates aaa.gcno in
the current directory (a pattern to be avoided; which may be read-only in an
alternative lit runner).
Peter Klausler [Wed, 17 May 2023 18:19:14 +0000 (11:19 -0700)]
[flang] Respect !DIR$ IGNORE_TKR in generic matching
Generic matching needs to relax argument compatibility checks when
dummy arguments have !DIR$ IGNORE_TKR directives.
Differential Revision: https://reviews.llvm.org/D150806
Artem Belevich [Wed, 17 May 2023 21:41:47 +0000 (14:41 -0700)]
[NVPTX/CUDA] added an optional src_size argument to __nvvm_cp_async*
The optional argument is needed for CUDA-11+ headers when we're compiling for
sm_80+ GPUs.
Differential Revision: https://reviews.llvm.org/D150820
Peter Klausler [Wed, 17 May 2023 13:44:56 +0000 (06:44 -0700)]
[flang] Allow compiler directives in macros
Modify the prescanner to allow compiler directives to appear in
macro expansions, and adjust the parser to accept a semicolon
as a directive terminator.
Differential Revision: https://reviews.llvm.org/D150780
Augusto Noronha [Wed, 26 Apr 2023 11:00:01 +0000 (12:00 +0100)]
[lldb] Implement GetValueTypeFromAddressType
Value::ValueType is a superset of AddressType. Add a function to
convert an AddressType into a Value::ValueType.
Differential Revision: https://reviews.llvm.org/D150826
Vy Nguyen [Tue, 28 Feb 2023 20:17:44 +0000 (15:17 -0500)]
[RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs.
Details: https://github.com/rust-lang/rust/issues/102754
The MachO format uses 2 bits to encode these personality funtions, with 0 reserved for "no-personality".
This means we can only have up to 3 personality. There are already three popular personalities: __gxx_personality_v0, __gcc_personality_v0, and __objc_personality_v0.
As a result, any system that needs custom-personality will run into a problem.
This patch implemented jyknight's proposal to simply force DWARFs for all non-canonical personality functions.
Differential Revision: https://reviews.llvm.org/D144999
Craig Topper [Thu, 18 May 2023 17:09:50 +0000 (10:09 -0700)]
[RISCV] Reduce dependency on RISCV::RVVBitsPerBlock for calculating vector size for -mrvv-vector-bits.
We can use the minimum value of the BuiltinType's ElementCount and
the element size.
This needs to be done to support LMUL!=1 types anyway.
I did have to make an ordering change in the error checks in
HandleRISCVRVVVectorBitsTypeAttr to check if the type is an RVV
VLS type before checking the size.
Siva Chandra Reddy [Thu, 18 May 2023 06:35:59 +0000 (06:35 +0000)]
[libc] Add a functioning realloc for hermetic tests.
Reviewed By: jhuber6
Differential Revision: https://reviews.llvm.org/D150846
Siva Chandra Reddy [Thu, 18 May 2023 08:19:24 +0000 (08:19 +0000)]
[libc] Extend IntegerToString to convert UInt* numbers to hex string.
This new functionality will help us avoid duplicated code in various
places in the testing infrastructure. Since the string representation
of the wide numbers is to be used by tests, to keep it simple, we
zero-pad the strings.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D150849
Dave Lee [Mon, 15 May 2023 21:36:17 +0000 (14:36 -0700)]
[lldb] Delay removal of persistent results
Follow up to "Suppress persistent result when running po" (D144044).
This change delays removal of the persistent result until after `Dump` has been called.
In doing so, the persistent result is available for the purpose of getting its object
description.
In the original change, the persistent result removal happens indirectly, by setting
`EvaluateExpressionOptions::SetSuppressPersistentResult`. In practice this has worked,
however this exposed a latent bug in swift-lldb. The subtlety, and the bug, depend on
when the persisteted result variable is removed.
When the result is removed via `SetSuppressPersistentResult`, it happens within the call
to `Target::EvaluateExpression`. That is, by the time the call returns, the persistent
result is already removed.
The issue occurs shortly thereafter, when `ValueObject::Dump` is called, it cannot make
use of the persistent result variable (instead it uses the `ValueObjectConstResult`). In
swift-lldb, this causes an additional expression evaluation to happen. It first tries an
expression that reference `$R0` etc, but that always fails because `$R0` is removed. The
fallback to this failure does work most of the time, but there's at least one bug
involving imported Clang types.
Differential Revision: https://reviews.llvm.org/D150619
Aaron Ballman [Thu, 18 May 2023 16:37:53 +0000 (12:37 -0400)]
Clean up Clang's index page slightly
Set the charset to UTF-8, link to the actual liscense we used,
claim support for targets LLVM supports instead of listing them
manually, and stop listing individual language standards we support.
Aaron Ballman [Thu, 18 May 2023 16:22:30 +0000 (12:22 -0400)]
Removed outdated information from Clang's webpage menu
This removes the link to Planet Clang as well as the LLVM coverage
reports, as neither has been actively worked on for several years.
Craig Topper [Thu, 18 May 2023 16:21:38 +0000 (09:21 -0700)]
[RISCV] Fix assertion when casting LMUL!=1 RVV types to GNU types with -mrvv-vector-bits.
We need to call isRVVVLSBuiltinType() before calling getRVVTypeSize().
Erich Keane [Thu, 18 May 2023 16:05:51 +0000 (09:05 -0700)]
Ensure comparison of constraints creates a code synth context
This is a regression from
6db007a0 that was reported in:
https://github.com/llvm/llvm-project/issues/62697
The assertion was because we require a code synthesis context for the
instantiation of templates, and this reproducer causes a comparison that
doesn't have a parent-template causing one to exists.
This patch fixes it by creating a ConstraintNormalization context.
Aaron Ballman [Thu, 18 May 2023 15:49:33 +0000 (11:49 -0400)]
Remove unreferenced files from Clang's website
None of these files are referenced by anything else on the website, and
the content for these files is quite dated or experiments that did not
pan out. I used a few search engines to see if others were linking to
this content (esp the libstdc++ patches) and did not find significant
evidence that they were.
Thomas Lively [Thu, 18 May 2023 15:24:58 +0000 (08:24 -0700)]
[WebAssembly] Add wasm_simd128.h intrinsics for relaxed SIMD
Add user-friendly intrinsic functions for all relaxed SIMD instructions
alongside the existing SIMD128 intrinsic functions in wasm_simd128.h. Test that
the new instrinsics lower to the expected instructions in the existing
cross-project-tests test file.
Reviewed By: aheejin, sbc100
Differential Revision: https://reviews.llvm.org/D150833
Louis Dionne [Wed, 17 May 2023 14:17:53 +0000 (07:17 -0700)]
[libc++] Avoid dereferencing a const iterator in std::sort
This is a workaround to provide a grace period for folks that were
broken by D147089. As a fly-by, also apply comments by Mark I had
somehow missed in the review.
Differential Revision: https://reviews.llvm.org/D150779
zhijian [Thu, 18 May 2023 15:22:35 +0000 (11:22 -0400)]
Summary:
Fixed a test case llvm\test\Object\bigarchive-malformed-header.test fail caused by windowi OS has 'llvm-ar.exe' instead of llvm-ar.
Mateja Marjanovic [Thu, 18 May 2023 14:15:57 +0000 (16:15 +0200)]
Revert "[AMDGPU] Trim zero components from buffer and image stores"
This reverts commit
3181a6e3e7dae9292782216a55c5e1f0583c1668.
zhijian [Thu, 18 May 2023 14:54:14 +0000 (10:54 -0400)]
[AIX] support 64bit global symbol table for big archive
Summary:
In big archive , there is 32bit global symbol table and 64 bit global symbol table. llvm-ar only support 32bit global symbol table this moment, we need to support the 64 bit global symbol table.
https://www.ibm.com/docs/en/aix/7.2?topic=formats-ar-file-format-big
Global Symbol Tables
Immediately following the member table, the archive file contains two global symbol tables. The first global symbol table locates 32-bit file members that define global symbols; the second global symbol table does the same for 64-bit file members. If the archive has no 32-bit or 64-bit file members, the respective global symbol table is omitted. The strip command can be used to delete one or both global symbol tables from the archive. The fl_gstoff field in the fixed-length header contains the offset to the 32-bit global symbol table, and the fl_gst64off contains the offset to the 64-bit global symbol table.
Reviewers: James Henderson,Stephen Peckham
Differential Revision: https://reviews.llvm.org/D142479
Amaury Séchet [Thu, 18 May 2023 14:44:53 +0000 (14:44 +0000)]
[NFC] Flatten the logic in RISCVTargetLowering::decomposeMulByConstant
Stefan Pintilie [Wed, 17 May 2023 14:36:23 +0000 (10:36 -0400)]
[PowerPC] Add DFP multiply and divide instructions.
This patch adds the DFP mul and div instructions. This includes both the
double and quad forms of the instructions as well as the record form.
Reviewed By: amyk
Differential Revision: https://reviews.llvm.org/D150787
Sergio Afonso [Mon, 10 Apr 2023 13:24:25 +0000 (14:24 +0100)]
[Flang][OpenMP][OMPIRBuilder] Add lowering of TargetOp for device codegen
This patch adds support in the `OpenMPIRBuilder` for generating working
device code for OpenMP target regions. It generates and handles the
result of a call to `__kmpc_target_init()` at the beginning of the
function resulting from outlining each target region, and it also
generates the matching `__kmpc_target_deinit()` call before returning.
It relies on the implementation of target region outlining for host
codegen to handle the production of the new function and the lowering of
its body based on the contents of the associated target region.
Depends on D147172
Differential Revision: https://reviews.llvm.org/D147940
Alex Bradbury [Thu, 18 May 2023 14:01:48 +0000 (15:01 +0100)]
[clang][RISCV] Set HasLegalHalfType to true if zhinx is enabled
Now that codegen support for zhinx in landed (D149811), we should set
HasLegalHalfType=true for zhinx (see D145071 for the patch doing this
for zfh).
Differential Revision: https://reviews.llvm.org/D150777
Sergei Barannikov [Wed, 17 May 2023 23:10:52 +0000 (02:10 +0300)]
[clang] Convert several tests to opaque pointers
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D150829
Erich Keane [Thu, 18 May 2023 13:23:24 +0000 (06:23 -0700)]
Revert "[clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables"
This reverts commit
0e167fc0a2147c9b673b8afd5fea001b0d127781.
This patch causes its assertion to fire when doing AST-dump, so
reverting so that the author has time to fix this.
Matt Arsenault [Thu, 18 May 2023 13:39:32 +0000 (14:39 +0100)]
ValueTracking: Check context instruction is in a function
Shengchen Kan [Thu, 18 May 2023 11:59:09 +0000 (19:59 +0800)]
[X86][MC] Add labels for BSF in the switch-cases of X86MCInstLower::Lower, NFCI
BSF is not special here and leaving it in default label looked weird.
Matt Arsenault [Thu, 18 May 2023 11:56:53 +0000 (12:56 +0100)]
Reapply "ValueTracking: Handle phi in computeKnownFPClass"
This reverts commit
e13f88d1ff5234946af6349a9a7cf56fcb6c040e.
Fix off by one recursion limit check.
Matt Arsenault [Thu, 18 May 2023 11:41:28 +0000 (12:41 +0100)]
EarlyCSE: Add regression test for computeKnownFPClass phi handling
This was reduced from the failure that caused the revert in
e13f88d1ff5234946af6349a9a7cf56fcb6c040e
Shengchen Kan [Thu, 18 May 2023 11:40:33 +0000 (19:40 +0800)]
[X86][MC] Move the code about fixed register encoding optimization to X86EncodingOptimization.cpp, NFCI
Matt Arsenault [Thu, 18 May 2023 11:16:04 +0000 (12:16 +0100)]
ValueTracking: Check instruction is in a parent in computeKnownFPClass
For some reason the inliner calls simplifyInstruction with disembodied
instructions. I consider this to be an API defect. Either the instruction
should always be inserted prior to simplification, or we at least
should pass in the new function for the context.
Ramkumar Ramachandra [Thu, 18 May 2023 09:22:14 +0000 (10:22 +0100)]
MachineTraceMetrics: modernize loops (NFC)
Differential Revision: https://reviews.llvm.org/D150854
Tom Eccles [Thu, 27 Apr 2023 09:53:54 +0000 (09:53 +0000)]
[flang][runtime] Add dynamically allocated temporary storage
These functions will be used as part of the HLFIR lowering for
forall/where. The contents of the API were requested by @jeanPerier.
The API is designed around that use case, assuming that the caller knows
through some side channel what size to allocate for boxes returned from
the pop() function.
Differential Revision: https://reviews.llvm.org/D150050
Tom Eccles [Tue, 25 Apr 2023 09:07:11 +0000 (09:07 +0000)]
[flang][hlfir] Add pass to inline elementals
Implement hlfir.elemental inlining as proposed in
flang/docs/HighLevelFIR.md.
This is a separate pass to make the code easier to understand. One
alternative would have been to modify the hlfir.elemental lowering in
the HLFIR bufferization pass.
Currently, a hlfir.elemental can only be inlined once; if there are
more uses, the existing bufferization is used instead.
Usage of mlir::applyPatternsAndFoldGreedily was suggested by @jeanPerier
Differential Revision: https://reviews.llvm.org/D149258
David Sherwood [Tue, 25 Apr 2023 08:46:41 +0000 (08:46 +0000)]
[AArch64][LoopVectorize] Enable tail-folding of simple loops on neoverse-v1
This patch enables the tail-folding of simple loops by default
when targeting the neoverse-v1 CPU. Simple loops exclude those
with recurrences or reductions or loops that are reversed.
New tests have been added here:
Transforms/LoopVectorize/AArch64/sve-tail-folding-option.ll
In terms of SPEC2017 only one benchmark is really affected when
building with "-Ofast -mcpu=neoverse-v1 -flto", which is
(+ faster, - slower):
525.x264: +7.0%
Differential Revision: https://reviews.llvm.org/D130618
Florian Hahn [Thu, 18 May 2023 10:35:17 +0000 (11:35 +0100)]
[LV] Add extra uniformity tests with UDIV and UREM.
Extra tests for D148841.
Shengchen Kan [Thu, 18 May 2023 10:30:54 +0000 (18:30 +0800)]
[X86][MC] Move encoding optimization for VCMP to X86::optimizeInstFromVEX3ToVEX2, NFCI
This is a follow-up for
c13ed1cc7578
Shengchen Kan [Thu, 18 May 2023 10:08:57 +0000 (18:08 +0800)]
[X86][MC] Simplify code for X86::optimizeInstFromVEX3ToVEX2
Shengchen Kan [Thu, 18 May 2023 09:26:00 +0000 (17:26 +0800)]
[X86][MC] Move the code about MOV encoding optimization to X86EncodingOptimization.cpp, NFCI
Balázs Kéri [Thu, 18 May 2023 09:16:17 +0000 (11:16 +0200)]
[clang][analyzer] Improve documentation of StdCLibraryFunctionArgs checker (NFC)
Documentation is made more exact, term "constraint" is removed entirely,
description of checker option is corrected.
Reviewed By: Szelethus, gamesh411
Differential Revision: https://reviews.llvm.org/D149447
OCHyams [Wed, 17 May 2023 17:15:57 +0000 (18:15 +0100)]
[DebugInfo][SelectionDAG] Do not drop dbg intrinsics with empty metadata locs
Without this patch SelectionDAG silently drops dbg.values using `!{}` operands.
Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value
This causes assignment-tracking to behaviour to match non-assignment-tracking
behaviour after a recent change (see D140990).
Reviewed By: jmorse
Differential Revision: https://reviews.llvm.org/D150767
Jay Foad [Tue, 16 May 2023 10:26:30 +0000 (11:26 +0100)]
[XCore] Use backwards scavenging in frame index elimination
This is preferred because it does not rely on accurate kill flags.
Differential Revision: https://reviews.llvm.org/D150673
Jay Foad [Mon, 15 May 2023 15:58:16 +0000 (16:58 +0100)]
[Lanai] Use backwards scavenging in frame index elimination
This is preferred because it does not rely on accurate kill flags.
Differential Revision: https://reviews.llvm.org/D150600
Jay Foad [Mon, 15 May 2023 15:52:59 +0000 (16:52 +0100)]
[ARC] Use backwards scavenging in frame index elimination
This is preferred because it does not rely on accurate kill flags.
Differential Revision: https://reviews.llvm.org/D150599
Matt Arsenault [Thu, 18 May 2023 08:42:54 +0000 (09:42 +0100)]
Revert "ValueTracking: Handle phi in computeKnownFPClass"
This reverts commit
cac9e427eb1ff3dabda8ac08968b998c3bc5ab47.
Causing crashes in lencod
Vitaly Buka [Sat, 13 May 2023 01:46:43 +0000 (18:46 -0700)]
[test][clang-repl] Disable test incompatible with msan
Matt Arsenault [Thu, 18 May 2023 08:22:54 +0000 (09:22 +0100)]
Revert "AMDGPU: Add baseline test for f16 fmed3 matching"
This reverts commit
b233eb70cd82ca3c320fac4bb8c2cccd1fe97696.
Vitaly Buka [Fri, 12 May 2023 22:35:28 +0000 (15:35 -0700)]
[AST] Initialized AutoTypeLocInfo::FoundDecl
Msan complains if getFoundDecl called before it's set.
This looks like data class, so I see no reason to keep
the single field uninitialized.
Vitaly Buka [Thu, 18 May 2023 08:18:01 +0000 (01:18 -0700)]
[NFC][AST] Align one line
Vitaly Buka [Fri, 12 May 2023 22:20:58 +0000 (15:20 -0700)]
[AST] Initialize local counter
I assume it's optional and ReadAST does not have to set the
counter on success.
Without the patch msan complains that we pass
uninitialized value into noundef parameters of setCounterValue.
Reviewed By: bnbarham, barannikov88
Differential Revision: https://reviews.llvm.org/D150492
Chuanqi Xu [Thu, 18 May 2023 08:11:20 +0000 (16:11 +0800)]
[C++20] [Modules] Emit an warning for experimental header units
Currently, the header units are rarely used and it is not well tested.
To avoid further misunderstandings, let's mark it as experimental and
emit a warning when users wants to import it.
This is discussed in modules developers meeting.
Vitaly Buka [Mon, 8 May 2023 19:42:50 +0000 (12:42 -0700)]
[LSAN] Use ThreadArgRetval in LSAN
Fixes false leaks on thread retval.
Reviewed By: thurston
Differential Revision: https://reviews.llvm.org/D150165
Vitaly Buka [Mon, 8 May 2023 07:50:26 +0000 (00:50 -0700)]
[ASAN] Use ThreadArgRetval in ASAN
Fixes false leaks on thread retval.
Reviewed By: thurston
Differential Revision: https://reviews.llvm.org/D150106
Vitaly Buka [Thu, 18 May 2023 07:53:53 +0000 (00:53 -0700)]
[NFC][HWASAN] Fix pthread_attr_getdetachstate use
Luckely of Linux PTHREAD_CREATE_DETACHED is 1.
Matt Arsenault [Fri, 5 May 2023 17:16:58 +0000 (13:16 -0400)]
AMDGPU: Fold fmed3 of fpext sources to f16 fmed3
InstCombine already does this for minnum/maxnum. If we
also apply this to fmed3, we don't need to explicitly
use 16-bit fmed3 if we're not sure the target
supports 16-bit instructions yet.
Matt Arsenault [Fri, 5 May 2023 16:15:23 +0000 (12:15 -0400)]
AMDGPU: Add baseline test for f16 fmed3 matching
Matt Arsenault [Tue, 9 May 2023 08:52:44 +0000 (09:52 +0100)]
GlobalISel: Refactor unary FP op constant folding
Fangrui Song [Thu, 18 May 2023 07:27:10 +0000 (00:27 -0700)]
[gcov] Make .gcno/.gcda paths absolute
This restores
737a452173a67f88d111f27b688bf3696c260db9 (2013) which was removed
by my
a07b135ce0c0111bd83450b5dc29ef0381cdbc39.
This behavior turns out to be depended on by `bazel coverage`.
Add a `PWD=/proc/self/cwd %clang -### -c --coverage %s -o foo/bar.o` test.
Vitaly Buka [Tue, 16 May 2023 17:54:41 +0000 (10:54 -0700)]
[LiveDebugValues] Initialized variable to avoid msan reports
Reproducible with =-1 and assert: https://reviews.llvm.org/P8309
Reviewed By: jmorse
Differential Revision: https://reviews.llvm.org/D150420
Wang, Xin10 [Thu, 18 May 2023 07:14:24 +0000 (03:14 -0400)]
[X86]Fix wrong asm match for MASKMOVDQU
Missing work for D150835, aside from VMASKMOVDQU, MASKMOVDQU will also be affected by D150436.
Reviewed By: skan
Differential Revision: https://reviews.llvm.org/D150844
Matt Arsenault [Sat, 29 Apr 2023 23:31:01 +0000 (19:31 -0400)]
ValueTracking: Handle phi in computeKnownFPClass
Doesn't try the all the tricks computeKnownBits does.