Commit Graph

543167 Commits

Author SHA1 Message Date
Meredith Julian
7da8ed8d33 Fix missing/outdated pass options in PassRegistry.def (#146160)
There are a handful of passes in PassRegistry.def with outdated or
missing pass options. These strings describing pass options are used for
the printPassNames() function only, which is likely why they have gotten
out-of-date without being caught. This MR simply changes the few passes
where the option string is out-of-date, fixing the output of
-print-passes. This does not affect functionality of the pipeline
parser, and is hard to verify in a unit test, so no tests were added.
2025-07-01 12:41:26 -07:00
Matthias Springer
d480359420 [mlir][sparse] Do not access operation after it was replaced (#146546)
Accessing an erased operation will no longer work during a One-Shot
Dialect Conversion.
2025-07-01 21:39:54 +02:00
S. VenkataKeerthy
119292c40b [IR2Vec] Add out-of-place arithmetic operators to Embedding class (#145118)
This PR adds out-of-place arithmetic operators (`+`, `-`, `*`) to the `Embedding` class in IR2Vec, complementing the existing in-place operators (`+=`, `-=`, `*=`). 

Tests have been added to verify the functionality of these new operators.

(Tracking issue - #141817)
2025-07-01 12:09:54 -07:00
S. VenkataKeerthy
efe0deae3f [NFC][IR2Vec] Increasing tolerance in approximatelyEquals() of Embedding (#145117)
Increase the default tolerance for `approximatelyEquals` in IR2Vec's Embedding class from 1e-6 to 1e-4.

(Tracking issue - #141817)
2025-07-01 12:03:37 -07:00
Amr Hesham
6fafa46f8c [CIR] Upstream PackIndexingExpr for ScalarExpr (#146239)
Upstream PackIndexingExpr for ScalarExpr
2025-07-01 20:59:53 +02:00
Amr Hesham
e11d354d64 [CIR] Upstream GenericSelectionExpr (#146211)
Upstream GenericSelectionExpr for ScalarExpr
2025-07-01 20:56:39 +02:00
Amr Hesham
67f1eb5c17 [CIR] Comma Operator for ComplexType (#146204)
This change adds support for the comma operator for ComplexType

https://github.com/llvm/llvm-project/issues/141365
2025-07-01 20:55:58 +02:00
Timm Baeder
b54e02a40b [clang][bytecode] Check pointer data type for bitcast eligibility (#146552)
So we get the proper type for a heap-allocated value.
2025-07-01 20:37:09 +02:00
Amr Hesham
8dbfe83681 [CIR] Fix mlir::ValueRange init from ArrayRef warning (#146577)
Fix initalizing ValueRange with ArrayRef
`ValueRange(ArrayRef<Value>(std::forward<Arg>(arg))) {}` warning
2025-07-01 20:32:04 +02:00
Amr Hesham
491c79f763 [CIR] Implement ArraySubscript for ComplexType (#146283)
Implement ArraySubscript for ComplexType

https://github.com/llvm/llvm-project/issues/141365
2025-07-01 20:27:29 +02:00
Changpeng Fang
5035d20dcb AMDGPU: Implement ds_atomic_async_barrier_arrive_b64/ds_atomic_barrier_arrive_rtn_b64 (#146409)
These two instructions are supported by gfx1250. We define the
instructions and implement the corresponding intrinsic and builtin.

Co-authored-by: Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
2025-07-01 11:08:49 -07:00
Jonas Devlieghere
3edae0d5e5 [lldb] Use EL_REFRESH to refresh Editline
Letting Editline refresh itself is more robust and ensures that the
current text is redraw if it was accidentally cleared. In that scenario
MoveCursor would only fix up the cursor position.
2025-07-01 11:08:11 -07:00
S. VenkataKeerthy
35b80031f4 [NFC] Formatting PassRegistry.def (#144139) 2025-07-01 11:03:43 -07:00
Kazu Hirata
c17e88f07e [Analysis] Remove a workaround for ancient GCC (NFC) (#146550)
The version of GCC mentioned is older than currently required GCC 7.4.
The comment about the crash dates back to 2014.
2025-07-01 10:42:29 -07:00
Kazu Hirata
e79e22c9af [AMDGPU] Remove an unnecessary cast (NFC) (#146548)
Val is already of uint64_t.
2025-07-01 10:42:22 -07:00
Kazu Hirata
72a9c3cced [Analysis] Remove an unnecessary cast (NFC) (#146547)
ME is already of ObjCMessageExpr *.
2025-07-01 10:42:14 -07:00
Kazu Hirata
98e6d5cd47 [lldb] Fix warnings
This patch fixes:

  lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:279:15:
  error: format specifies type 'unsigned long' but the argument has
  type 'file_t' (aka 'int') [-Werror,-Wformat]

  lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:383:15:
  error: format specifies type 'unsigned long' but the argument has
  type 'file_t' (aka 'int') [-Werror,-Wformat]
2025-07-01 10:41:07 -07:00
Kazu Hirata
d79c284a2f [flang] Fix a warning
This patch fixes:

  flang/lib/Semantics/check-omp-structure.cpp:1747:41: error: lambda
  capture 'this' is not used [-Werror,-Wunused-lambda-capture]
2025-07-01 10:34:41 -07:00
John Harrison
a79404e50c [lldb] Correct an assertion name. 2025-07-01 10:26:32 -07:00
Changpeng Fang
c8450ea226 AMDGPU: Remove the unnecessary needAlias argument in DS_Real_gfx12 (#146439) 2025-07-01 10:20:25 -07:00
Joe Nash
21d5017a05 [AMDGPU] Refactor FLAT_Load_Pseudo class (#146539)
NFC. Refactor it to make it easier to inherit from.
2025-07-01 12:51:15 -04:00
Simon Pilgrim
b697b801b1 [X86] freeze-vector.ll - fix cut+pasta typo in frozen build vector tests
Ensure we load BOTH scalars, inserted into different positions into separate vectors with the freeze(poison) base

Noticed while triaging regressions in #145939
2025-07-01 17:36:43 +01:00
Sameer Sahasrabuddhe
a34a024812 [AMDGPU][SIInsertWaitCnts] skip meta instructions early (#145720)
When iterating over a block, meta instructions have no effect on wait counts,
but their presence drops the reference to earlier waitcnt instructions before
they are processed. This results in spurious wait counts, which do not affect
correctness, but are also not required in the resulting program. Skipping meta
instructions as soon as they are seen cleans this up.
2025-07-01 22:02:48 +05:30
Benjamin Kramer
13e6ea7b4c [bazel] Add missing dependency for 08cf6ae537 2025-07-01 18:21:45 +02:00
Guy David
01a6c08533 [PHIElimination] Verify reappropriated COPY is of similar register class, update livevars. (#146337)
Follow up to the second bug that
https://github.com/llvm/llvm-project/pull/131837 introduced, described
in
https://github.com/llvm/llvm-project/pull/131837#issuecomment-3018777795.
2025-07-01 19:18:31 +03:00
Krzysztof Parzyszek
ba116a8bed [flang][OpenMP] Split check-omp-structure.cpp into smaller files, NFC (#146359)
Create these new files in flang/lib/Semantics:
  openmp-utils.cpp/.h         - Common utilities
  check-omp-atomic.cpp        - Atomic-related checks
  check-omp-loop.cpp          - Loop constructs/clauses
  check-omp-metadirective.cpp - Metadirective-related checks

Update lists of included headers, std in particular.

---------

Co-authored-by: Jack Styles <jack.styles@arm.com>
2025-07-01 11:12:00 -05:00
John Harrison
1a7b7e24bc [lldb] Adding pipe support to lldb_private::MainLoopWindows. (#145621)
This updates MainLoopWindows to support events for reading from a pipe
(both anonymous and named pipes) as well as sockets.

This unifies both handle types using `WSAWaitForMultipleEvents` which
can listen to both sockets and handles for change events.

This should allow us to unify how we handle watching pipes/sockets on
Windows and Posix systems.

We can extend this in the future if we want to support watching other
types, like files or even other events like a process life time.

---------

Co-authored-by: Pavel Labath <pavel@labath.sk>
2025-07-01 08:59:27 -07:00
sribee8
47e28d9cd1 [libc] wcscspn implementation (#146158)
Implemented wcscspn and tests.

---------

Co-authored-by: Sriya Pratipati <sriyap@google.com>
2025-07-01 15:56:09 +00:00
Luke Lau
04c614327c [InstCombine] Pull vector reverse through intrinsics (#146384)
This is the intrinsic version of #146349, and handles fabs as well as
other intrinsics.

It's largely a copy of InstCombinerImpl::foldShuffledIntrinsicOperands
but a bit simpler since we don't need to find a common mask.

Creating a separate function seems to be cleaner than trying to shoehorn
it into the existing one.
2025-07-01 16:49:10 +01:00
Shilei Tian
4dab0b2300 [AMDGPU] Fix wrong reverse operations for v_cmpx_le_u32 (#146398)
Fixes: SWDEV-538616
2025-07-01 11:48:08 -04:00
Matthias Springer
569ca0f698 [mlir][async] Erase op later to preserve insertion point (#146516)
Delay the erasure of an op, so that the insertion point of the rewriter
remains valid.

This commit is in preparation of the One-Shot Dialect Conversion
refactoring. (The current implementation works with the current dialect
conversion driver because op erasure is delayed.)
2025-07-01 17:25:21 +02:00
Charles Zablit
0c124be33f [lldb][NFC] Inline ResolveSDKPathFromDebugInfo in one of its call site (#146062)
This patch is part of an effort to remove the
`ResolveSDKPathFromDebugInfo` method, and more specifically the variant
which takes a Module as argument.

See the following PR for a follow up on what to do:
- https://github.com/llvm/llvm-project/pull/144913.

---------

Co-authored-by: Michael Buch <michaelbuch12@gmail.com>
2025-07-01 16:23:23 +01:00
Kajetan Puchalski
69b69cbcb4 [flang][tco] Add -emit-final-mlir flag (#146533)
Add a flag to tco for emitting the final MLIR, prior to lowering to LLVM
IR. This is intended to produce output that can be passed directly to
mlir-translate.

---------

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2025-07-01 16:22:36 +01:00
Joseph Huber
3cff3d882b [Offload] Add skeleton for offload conformance tests (#146391)
Summary:
This adds a basic outline for adding 'conformance' tests. These are
tests that are intended to check device code against a standard. In this
case, we will expect this to be filled with math conformance tests to
make sure their results are within the ULP requirements we demand.

Right now this just *assumes* the GPU libc is there, meaning you'll
likely need to do a manual `ninja` before doing `ninja -C
runtimes/runtimes-bins offload.conformance`.
2025-07-01 10:20:40 -05:00
Simon Pilgrim
6b1c92cbcb [X86] legalize-sub-zero.ll - regenerate test checks 2025-07-01 16:07:32 +01:00
Krzysztof Parzyszek
86077c41a7 [flang][OpenMP] Rewrite min/max with more than 2 arguments (#146423)
Given an atomic operation `w = max(w, x1, x2, ...)` rewrite it as `w =
max(w, max(x1, x2, ...))`. This will avoid unnecessary non-atomic
comparisons inside of the atomic operation (min/max are expanded
inline).

In particular, if some of the x_i's are optional dummy parameters in the
containing function, this will avoid any presence tests within the
atomic operation.

Fixes https://github.com/llvm/llvm-project/issues/144838
2025-07-01 09:54:58 -05:00
David Green
6e3465cd0f [AArch64] Fix ldp rename through a bundle (#146415)
std::prev(Paired) will get the previous instruction, that might skip
over the instructions in a bundle to the BUNDLE itself. Change it to
Paired->getPrevNode() to make sure we update the registers in each
instruction in the bundle.
2025-07-01 15:44:59 +01:00
David Green
5332534b9c [ARM] Add neon vector support for ceil
As per #142559, this marks fceil as legal for Neon and upgrades the existing
arm.neon.vrintp intrinsics.
2025-07-01 15:41:10 +01:00
Ilya Biryukov
cf9374933d [Modularize] Make Location::operator bool explicit
This unbreaks C++20 buildbot that was broken since
402baea0a9.

With implicit conversion in C++20 compilation mode the spaceship
will unintentionally be based on `operator bool`:

```cpp
auto foo(Location L, Location R) {
  return L <=> R;
  // Equivalent to the following line due to implicit conversions.
  // return L.operator bool() <=> R.operator bool();
}
```

The spaceship operator is rarely used explicitly, but its implicit uses
in the STL may cause surprising results, as exposed by the use of  `std::tie`
in 402baea0a9, which ended up changing the
comparisons results unintentionally.
2025-07-01 16:38:07 +02:00
Rahul Joshi
d7b8b65e23 [LLVM][TableGen][DecoderEmitter] Add wrapper struct for bit_value_t (#146248)
Add a convenience wrapper struct for the `bit_value_t` enum type to host
various constructors, query, and printing support. Also refactor related
code in several places. In `getBitsField`, use `llvm::append_range` and
`SmallVector::append()` and eliminate manual loops. Eliminate
`emitNameWithID` and instead use the `operator <<` that does the same
thing as this function. Have `BitValue::getValue()` (replacement for
`Value`) return std::optional<> instead of -1 for unset bits. Terminate
with a fatal error when a decoding conflict is encountered.
2025-07-01 07:36:17 -07:00
Kazu Hirata
e99da2b7a9 [mlir] Remove unused includes (NFC) (#146467) 2025-07-01 07:32:44 -07:00
Kazu Hirata
f4cdb89b47 [mlir] Remove unnecessary casts (NFC) (#146465)
Note that encodeStringLiteralInto returns void.
2025-07-01 07:32:36 -07:00
Kazu Hirata
7622bf9d12 [IR] Remove an unnecessary cast (NFC) (#146464)
The destructor does not return anything.
2025-07-01 07:32:29 -07:00
Kazu Hirata
bb080107e4 [CodeGen] Remove unnecessary casts (NFC) (#146463)
Both of these functions return void.
2025-07-01 07:32:21 -07:00
cmtice
11ecd4742b [LLDB] Update DIL to pass current 'frame var' tests. (#145055)
As a preliminary to making DIL the default implementation for
 'frame var', ran check-lldb forcing 'frame var' to always use DIL, 
and discovered a few failing tests. This fixes most of them. The only
remaining failing test is TestDAP_evaluate.py, which now passes
a test case that the test says should fail (still investigating this).

Changes in this PR:
- Sets correct VariableSP, as well as returning ValueObjectSP (needed
for several watchpoint tests).
- Updates error messages, when looking up members, to match what the
rest of LLDB expects. Also update appropriate DIL tests to expect the
updated error messages.
- Updates DIL parser to look for and accept "(anonymous namespace)::" at
the front of a variable name.
2025-07-01 07:30:47 -07:00
Ege Beysel
ace5108f37 feat(linalg): add a way to pass controlFn to foldIntoPackUnpackPatterns (#143685)
This PR adds a mechanism, so that downstream consumers can pass in
control functions for the application of these patterns. This change
shouldn't affect any consumers of this method that do not specify a
controlFn. The controlFn always gets the source operand of the consumer
in each of the patterns as a parameter.

In IREE, we (will) use it to control preventing folding patterns that
would inhibit fusion. See IREE issue
[#20896](https://github.com/iree-org/iree/issues/20896) for more
details.
2025-07-01 07:22:38 -07:00
Frederik Harwath
f9413e1754 [clang][test] Remove duplication from gcc toolchain test (NFC) (#146487)
Changes from Commit 40aab0412f "[test]
Migrate -gcc-toolchain with space separator to --gcc-toolchain=" made
two previously different RUN lines equal.

Remove one RUN line.
2025-07-01 16:17:26 +02:00
David Green
42e7796920 [ARM] Add a comment about fixupImmediateBr updaing ImmBranches. NFC
To prevent people from modernizing the loop, add a comment that
fixupImmediateBr can append to ImmBranches.
2025-07-01 15:01:25 +01:00
Shilei Tian
bab9d4c2d7 [NFC][AMDGPU] Pre-commit a test case that shows wrong reverse operation is used for V_CMPX_LE_U32 (#146527) 2025-07-01 09:57:04 -04:00
Nikita Popov
a6592ddf4e [AArch64] Mark neon.stN intrinsics as writeonly (#145289)
I found this peculiar comment in EarlyCSE:

1c78d8d9d7/llvm/lib/Transforms/Scalar/EarlyCSE.cpp (L1620-L1624)

Looking back over history, this seems to be referring to the
aarch64.neon.stN intrinsics, which are indeed not marked writeonly
(though the ldN intrinsics are readonly).

Possibly I'm missing something special about these intrinsics, but I
think it is safe to mark them as writeonly.
2025-07-01 15:56:02 +02:00