568986 Commits

Author SHA1 Message Date
Jan Svoboda
f724d867e3
[clang][modules] Don't rely on std::vector CTAD (#181182) 2026-02-12 10:22:49 -08:00
Louis Dionne
e087d42882
[libc++] Add __strftime__ formatting attribute to locale base API __strftime (#179545)
Tip-of-trunk Clang seems to have started complaining about the missing
attribute.
2026-02-12 13:13:31 -05:00
h-vetinari
783fd2f9d5
[libc++] Sort _LIBCPP_INTRODUCED_IN_LLVM_<X> usages in reverse chronological order (#176857)
I noticed that the various `_LIBCPP_INTRODUCED_IN_LLVM_<ver>` usages in
`availability.h` were defined a bit all over the place. I think it'd
make the most sense to sort them in reverse chronological order (like
their definitions).
2026-02-12 13:11:49 -05:00
Dave Lee
4baab258b8
[lldb] Add Get(Non)SyntheticValue formatter bytecodes (#174839)
`GetSyntheticValue` in synthetic providers which need to operate on raw
root values, but will often want to use the synthetic value of children,
or nested children.
2026-02-12 10:07:17 -08:00
jeanPerier
63826ea33e
[flang] still apply vectorization cost model with IVDEP (#180760)
The current implementation of `!DIR IVDEP` leads flang to bypass LLVM
cost model and always vectorize the loop carrying `!DIR$ IVDEP`.

IVDEP is an extension and its documentation varies, and while it usually
leads to vectorization because it is added on loops where it is usually
profitable, its documentation only tells it is meant to tell the
compiler that there are no loop carried dependencies and that the loop
is safe to vectorize.

In some application, such directive may have been added to help the
compiler proving it is safe to vectorize, but vectorizing is not always
the best choice for all architectures. The cost model should still be
applied. This is at least the case for classic flang.

When users want vectorization to happen, they should use `!DIR$ VECTOR
ALWAYS`.

This patch updates flang to not emit `llvm.loop.vectorize.enable` just
because IVDEP was seen. Instead, IVDEP now only controls the emissions
of the access groups to translate the independence of the accesses and
leave the vectorization decision up to the cost model. `!DIR$ VECTOR
ALWAYS` can be used in combination with IVDEP to force vectorization (it
causes the emission of `llvm.loop.vectorize.enable`).
2026-02-12 19:04:02 +01:00
Sang Ik Lee
647fcc9a65
[XeGPU] Add missing StoreMatrix and LoadMatrix entries for bmg uArch. (#181006)
uArch for bmg was missing entries for StoreMatrix and LoadMatrix
instruction.
2026-02-12 10:02:13 -08:00
Florian Mayer
79a63fbb97
[NFC] [FlowSensitive] [StatusOr] remove unneeded NOLINT (#181032)
This was for cpplint, a leftover from when this model was downstream.
2026-02-12 09:56:13 -08:00
Aaron Ballman
2a560a8645
Move Chris Bieneman to the inactive maintainers list (#181192)
While reaching out to folks for a maintainers list refresh, Chris asked
to step down due to other commitments. Thank you for all your help!
2026-02-12 12:50:52 -05:00
Madhur Kumar
5d057a125c
[clang] Add __builtin_bitreverseg (#179126)
fixes #177125
2026-02-12 17:39:22 +00:00
Ryan Buchner
95ef1a5c31
[SLP] Use the correct identity when combining binary opcodes with AND/MUL (#180457)
Fixes #180456

Fix bug in the following SLP lowering:
```
define void @sub_mul(ptr %p, ptr %s) {
entry:
  %p1 = getelementptr i16, ptr %p, i64 1

  %l0 = load i16, ptr %p
  %l1 = load i16, ptr %p1

  %mul0 = sub i16 %l0, 0
  %mul1 = mul i16 %l1, 5

  %s1 = getelementptr i16, ptr %s, i64 1

  store i16 %mul0, ptr %s
  store i16 %mul1, ptr %s1
  ret void
}
```
to
```
define void @sub_mul(ptr %p, ptr %s) {
entry:
%tmp0 = load <2 x i16>, ptr %p, align 2
%tmp1 = mul <2 x i16> %tmp0, <i16 0, i16 5> -> updates to <i16 1, i16 5>
store <2 x i16> %tmp1, ptr %s, align 2
ret void
}
```
2026-02-12 09:34:44 -08:00
Tarun Prabhu
b4e9cf03a6
[flang][docs] Correct time of Flang OpenMP call and add link to calendar
The time in flang/docs/GettingInvolved.md says 8:00 a.m. Pacific, but
the scheduled meeting occurs at 7:30 a.m. Pacific. A link to the LLVM
community calendar was also added to both this and the entry for the
main biweekly flang call since it is not clear when the calls actually
happen.
2026-02-12 10:32:01 -07:00
Jonas Devlieghere
e4bbd9b1dc
[lldb] Document DBGSearchPaths (#178634)
Document DBGSearchPaths on the Symbols on macOS page.

rdar://169137293
2026-02-12 09:26:00 -08:00
Jonas Devlieghere
5e2518f2cc
[lldb] Convert highlighters to plugins (#181026)
This PR converts the syntax highlighters to plugins. Previously, the
highlighters were part of the Language plugin, using a library shared by
the C-like languages. The Highlighters already had a plugin-like design,
with a clang and default highlighter. This PR takes them out of the
language plugin and into their own highlighter plugin. They are still
accessed thought he HighlightManager.

This change is motivated by #170250. It will allow us to have both a
clang and tree-sitter based highlighter, as well as make it possible to
have a highlighter for a language that doesn't have an upstream language
plugin, like Swift or Rust.
2026-02-12 09:09:47 -08:00
Victor Chernyakin
beac6260c4
[clang-tidy] Speed up readability-uppercase-literal-suffix (#178149)
As usual, this is one of our most expensive checks according to
`--enable-check-profile`.

Measuring overall runtime:

```sh
hyperfine \
    --shell=none \
    --prepare='cmake --build build/release --target clang-tidy' \
    './build/release/bin/clang-tidy --checks=-*,readability-uppercase-literal-suffix all_headers.cpp -header-filter=.* -system-headers -- -std=c++23 -fno-delayed-template-parsing'
```

Status quo:
```txt
Time (mean ± σ):      4.435 s ±  0.012 s    [User: 4.158 s, System: 0.275 s]
Range (min … max):    4.409 s …  4.455 s    10 runs
```
With this change:
```txt
Time (mean ± σ):      3.549 s ±  0.010 s    [User: 3.328 s, System: 0.223 s]
Range (min … max):    3.540 s …  3.569 s    10 runs
```

Measuring with `--enable-check-profile`:

Status quo:
```txt
---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
1.1875 (100.0%)   0.1406 (100.0%)   1.3281 (100.0%)   1.3147 (100.0%)  readability-uppercase-literal-suffix
```
With this change:
```txt
---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
0.2500 (100.0%)   0.0469 (100.0%)   0.2969 (100.0%)   0.2904 (100.0%)  readability-uppercase-literal-suffix
```
However, subtracting 200 ms to account for the "[`hasParent`
tax](https://github.com/llvm/llvm-project/pull/178149#discussion_r2736652174)",
the "true" numbers are probably closer to:
```
                  ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
Status quo:       0.9875 (100.0%)   0.1406 (100.0%)   1.1281 (100.0%)   1.1147 (100.0%)  readability-uppercase-literal-suffix
With this change: 0.0500 (100.0%)   0.0469 (100.0%)   0.0969 (100.0%)   0.0904 (100.0%)  readability-uppercase-literal-suffix
2026-02-12 10:04:59 -07:00
Jan Svoboda
827b5d9423
[clang][deps] Parallelize module compilations (#180047)
In a typical build, the build system schedules many TUs from the same
target to be scanned/compiled at the same time. These TUs tend to depend
on a similar set of modules, and they usually keep their imports
alphabetically sorted. The nature of implicit modules then means that
scanning these TUs reduces into a single-threaded computation, since
only one TU wins the race to compile the common dependency module, and
the same thread/process keeps being responsible for compiling all
transitive dependencies of such module.

This PR makes use of the single-module-parse-mode in a new scanning step
that runs at the start of each TU scan. In this step, the scanner
quickly discovers unconditional module dependencies of the TU without
blocking on its compile. This typically discovers plenty of work to keep
the available threads busy and compile modules in more parallel fashion.
Modules discovered here are compiled on separate threads right away in
the same two-step fashion.

The second step then performs the regular dependency scan of the TU
where each module import is a blocking operation. However, by this time,
the first scanning step most likely already compiled the majority of
modules, so there's actually little to no waiting happening here. The
compiler only deserializes previously-built modules.

This is a barebones implementation with some known quirks marked in
FIXME comments. I will continue working on performance and polish once
this lands.
2026-02-12 08:48:13 -08:00
Jonathan Thackray
2de6d980de
[AArch64][llvm] Allow FPRCVT insns to run in streaming mode if safe (#177334)
For FEAT_FPRCVT instructions, allow them to run in streaming mode if safe
2026-02-12 16:41:57 +00:00
Twice
16ef4ed48f
[MLIR][Python] Ensure traits are attached when load(register=False) (#181174)
Currently, when calling `.load(register=False)`, `op._attach_traits()`
isn’t executed. This PR ensures traits are attached regardless of
whether `register` is `True` or `False`.
2026-02-13 00:41:32 +08:00
Jueon Park
b4e4616342 [mlir] Return null from DenseElementsAttr::get on unsupported attribute types (#181159)
`DenseElementsAttr::get(ShapedType, ArrayRef<Attribute>)` crashed with an unconditional `cast<IntegerAttr>` when encountering attribute types that are neither `FloatAttr` nor `IntegerAttr` (e.g. `ub.poison`). This can happen when folding ops like `tensor.from_elements` whose operands include poison values.

This patch fixes the issue at the `DenseElementsAttr::get` level rather than in individual op folders. The `cast<IntegerAttr>` is replaced with `dyn_cast<IntegerAttr>`, and when the attribute is neither `FloatAttr` nor `IntegerAttr`, a null `DenseElementsAttr` is returned. This is a more robust fix because it prevents the same class of crashes in any caller that passes unsupported attributes to `DenseElementsAttr::get`.

Fixes #178209.

---------

Co-authored-by: rebel-jueonpark <jueonpark@rebellions.ai>
2026-02-12 16:31:56 +00:00
Bertik23
d8ebb80e94
[AsmParserContext] Fix regression after #174566 (#180068)
This fixes the regressions after merging #174566

The problem was, that the lookup of the location takes logarithmic time
as a function of the number of lines, and a large number of lines causes
the slowdowns. Now all the lookups are guarded with checks if the
AsmParserContext was passed in, to not waste time on information, that
isn't requested.
2026-02-12 17:29:54 +01:00
mitchell
bec8fff251
[clang-tidy] Add support for member pointers in cppcoreguidelines-init-variables (#180973)
Closes #180894
2026-02-13 00:13:45 +08:00
Kunqiu Chen
85e07bad93
[InstructionSimplify] Extend simplifyICmpWithZero to handle equivalent zero RHS (#179055)
Add a new helper function `matchEquivZeroRHS()` that recognizes
comparisons with constants that are equivalent to comparisons with zero,
and transforms the predicate accordingly.

This handles the following transformations:
- icmp sgt X, -1 --> icmp sge X, 0
- icmp sle X, -1 --> icmp slt X, 0
- icmp [us]ge X, 1 --> icmp [us]gt X, 0
- icmp [us]lt X, 1 --> icmp [us]le X, 0

This enables more optimization opportunities in `simplifyICmpWithZero`,
such as folding icmp sgt X, -1 when X is known to be non-negative.

---

- IR Impact: https://github.com/dtcxzyw/llvm-opt-benchmark/pull/3414
2026-02-13 00:06:32 +08:00
Jonathan Thackray
e9d3dd2f5a
[AArch64][llvm] Preserve FP_TO_*_SAT VT operand in SVE scalar-combine (#177333)
Updated RUN lines and generated new `CHECK‑SME`/`CHECK‑SVE` lines in:

   llvm/test/CodeGen/AArch64/arm64-cvt-simd-fptoi.ll
   llvm/test/CodeGen/AArch64/arm64-cvtf-simd-itofp.ll

by adding `-force-streaming` and `-force-streaming-compatible` runs,
as pre-commit tests for change #177334 to enable FPRCVT streaming.

This triggers a SVE scalar-combine path which requires a code update.
FP_TO_*_SAT nodes require operand 1 (the saturation VT) to be present.
Without it the node is malformed and hits the SelectionDAG assertion
“Invalid child # of SDNode!”.

See also #177334
2026-02-12 15:59:23 +00:00
Michael Buch
9c9fff983f
[clang][Sema] Split a err_typecheck_assign_const diagnostic into a separate tablegen entry (#179895)
As of recently, in LLDB, when trying to mutate an object in a const
method, we emit a hint about why we failed to run the expression (with
an associated hint on how to fix it). This relies on the diagnostic ID
that Clang told us about. However, we only want to emit this message
when we assign to a member in a const method. But not all the other
situations that `err_typecheck_assign` gets used in. We currently work
around this by grepping the error message, but it would be nice if we
could just rely on the diagnostic ID.

This patch splits out the relevant diagnostic.

This isn't urgent and we can live with the "grep the error message"
approach. But if the Clang maintainers don't feel strongly about keeping
the tablegen as-is, it'd be nice to clean up from LLDB's perspective.
2026-02-12 15:53:04 +00:00
Alexandros Lamprineas
0584699c11
[BOLT][AArch64] Support FEAT_CMPBR branch instructions. (#174972)
The Armv9.6-A compare-and-branch instructions use a short range 9-bit
immediate value. They do not have a corresponding relocation type in the
ABI. For now we only support them in compact code model, with
diagnostics added in the LongJmp pass to ensure this condition. Some
interesting edge cases we cover:
- function splitting works when target is within or beyond the 1KB range
of those instructions,
 - but doesn't work beyond the 128MB limit of the compact code model
- branch inversion works with block reordering so long as the immediate
value adjustments remain in bounds
2026-02-12 15:49:00 +00:00
Igor Kudrin
ab7a6e6b4e
[lldb][test] Fix TestTlsGlobals.py for remote Linux runs (#181078)
The dynamic library must be transferred to the server; otherwise, the
test will fail because the inferior process will not launch.
2026-02-12 07:42:39 -08:00
Sirui Mu
ee9263bc7f
[CIR] Add sync scope to atomic fetch-and-update operation (#180770)
This patch adds synchronization scope support to the `cir.atomic.fetch`
operation.

Most of the new test code in `atomic-scoped.c` is generated by an AI
agent. The generated tests are manually reviewed and verified.

Assisted-by: Copilot with GPT-5.2-Codex
2026-02-12 23:27:41 +08:00
Nishant Patel
14f20ce795
[MLIR][XeGPU] Remove layout attribute from scf ops after wg to sg (#180771) 2026-02-12 07:26:18 -08:00
Matt Davis
2d53aab859
In-class initialize DenseMapBase members. (#177168)
I've seen a number of false positive defects in Coverity regarding
uninitialized instances of some of these members. I've decided to
in-class initialize 3 scalar members of `DenseMapBase` to hopefully
silence Coverity.

Since the initialization is performed through `initWithExactBucketCount`
I think it makes sense to just zero init them. I assume the original
intent was to avoid some initialization overhead; however, that seems
negligible from my last compile-time tracker results (If I'm reading the
results correctly).

I do see some of the insn size percentages jump around but that might be
noise. I had run an earlier compile time tracker on the same data, and I
think the timing results were a bit different, the most recent run
information is below.

Compile time tracker is showing the following output:
Metric | Old | New
-- | -- | --
instructions:u | 35718151M | 35718325M (+0.00%)
wall-time | 614.01s | 613.82s (-0.03%)
size-file | 132278KiB | 132278KiB (+0.00%)
size-file (stage1) | 151065KiB | 151065KiB (-0.00%)

clang build:
Metric	Old	New

[instructions:u](https://llvm-compile-time-tracker.com/compare_clang.php?from=f97f53e1d925fe702c23ad3a120ad3ab40b4eb51&to=d925643ace32566ea76a60d0642180d077f476f5&stat=instructions%3Au)
35718151M 35718325M (+0.00%)

[wall-time](https://llvm-compile-time-tracker.com/compare_clang.php?from=f97f53e1d925fe702c23ad3a120ad3ab40b4eb51&to=d925643ace32566ea76a60d0642180d077f476f5&stat=wall-time)
614.01s 613.82s (-0.03%)

[size-file](https://llvm-compile-time-tracker.com/compare_clang.php?from=f97f53e1d925fe702c23ad3a120ad3ab40b4eb51&to=d925643ace32566ea76a60d0642180d077f476f5&stat=size-file)
132278KiB 132278KiB (+0.00%)
size-file (stage1)	151065KiB	151065KiB (-0.00%)`
2026-02-12 10:24:04 -05:00
Joseph Huber
846e61c0fb [libc] Small change to accept lambda types in rpc::dispatch
Summary:
This change allows lambdas to be used in the RPC dispatching functions.
Just requires an extra function trait to convert a lambda with no
captures into a function pointer. Also rearranged where the `Port` lives
because it looks better no that we may use  a lambda and it's more
consistent with the dispatch usage (putting the client at the start).
2026-02-12 09:18:56 -06:00
Charles Zablit
3a658906ef
[lldb][windows] add STDIN and STDOUT forwarding support (#180561) 2026-02-12 16:14:41 +01:00
Timm Baeder
1116d0388c
[clang][bytecode] Fix debug-printing one-past-the-end pointers (#181149)
Can't call `getIndex()` on those.
2026-02-12 16:14:27 +01:00
Tom Tromey
97bd838eea
[llvm][DebugInfo] Allow anonymous basic types (#180016)
For the Ada compiler, it is sometimes useful to emit an anonymous basic
type. Currently, this is prohibited by DIBuilder, but there doesn't seem
to be a deep reason for this prohibition -- DWARF allows anonymous base
types, and the LLVM DWARF writer also accounts for this possibility.
2026-02-12 08:07:42 -07:00
Tomer Shafir
1c6278198d
[llvm-mc-assemble-fuzzer] Fix Triple passing (#181135)
The following PR removed deprecated `StringRef` triple APIs, that broke
`llvm-mc-assemble-fuzzer`:
https://github.com/llvm/llvm-project/pull/180448
2026-02-12 17:06:19 +02:00
Erich Keane
3d8d73a7f9
[NFC] Fix the unreachable 'return' in OpenACC Stmt handling (#181153)
A result of various cleanups, reimplementations/etc, I ended up with a
return after an if/else branch where each returned in #168422.

This patch removes the 'else' after a return, and removes the
unreachable return.
2026-02-12 15:04:49 +00:00
Konrad Kleine
574d799052
[DebugInfo] DWARFFormValue use formatv instead of format (#180498)
This relates to #35980 and is a follow up for #179194
2026-02-12 16:04:31 +01:00
Craig Topper
00a8cb4a6b
[RISCV] Move NSRL/NSRA isel to tablegen. NFC (#181096)
These nodes produce a single result so we can handle them in tablegen.

Assisted-by: claude
2026-02-12 07:03:44 -08:00
Luke Lau
3482a9c6cb
[VPlan] Explicitly reassociate header mask in logical and (#180898)
We reassociate ((x && y) && z) -> (x && (y && z)) if x has more than
use, in order to allow simplifying the header mask further. However this
is somewhat unreliable as there are times when it doesn't have more than
one use, e.g. see the case we run into in
https://github.com/llvm/llvm-project/pull/173265/changes#r2769759907.

This moves it into a separate transformation that always reassociates
the header mask regardless of the number of uses, which prevents some
fragile test changes in #173265.

We need to run it before both calls to simplifyRecipes in optimize. I
considered putting it in simplifyRecipes itself but simplifyRecipes is
also called after unrolling and when the loop region is dissolved which
causes vputils::findHeaderMask to assert.

There isn't really any benefit to reassociating masks that aren't the
header mask so the existing simplification was removed.
2026-02-12 14:56:15 +00:00
Timm Baeder
f748c718a8
[clang][bytecode] Don't use throw as invalid in c++26 (#181150)
Don't pass a combination of `-std=c++26` and `-fcxx-exceptions` to tests
and then try to use `throw` as an invalid statement. C++26 actually has
working exceptions at compile time, even if that is currently not
implemented.
2026-02-12 15:52:23 +01:00
Björn Svensson
abf036ba49 [clang-tidy] Correcting fix suggestion in readability-simplify-boolean-expr (#178392)
When the checker `readability-simplify-boolean-expr` is used on C23
code, where the `bool` type is provided but not `static_cast`, the fixer
suggests faulty code.

```
bool negative_condition_conditional_return_statement(int i) {
   if (!(i == 0)) return false; else return true;
}

/xx/llvm-project/build/../clang-tools-extra/test/clang-tidy/checkers/readability/simplify-boolean-expr-c23.c:323:25: warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
  323 |   if (!(i == 0)) return false; else return true;
      |   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |   return static_cast<bool>(i == 0)
```

Let's skip the use of `static_cast` for C code where a cast is not
needed.

---------

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
2026-02-12 22:49:45 +08:00
David Sherwood
8a2255fc42
[IR] Change getParamIndexForOptionalMask to assume masked parameter is last (#180558)
At the moment all code in LLVM seems to explicitly assume that the
masked parameter passed to vector math functions always lives at the end
of the parameter list. See VFShape::get as an example. It seems odd then
for getParamIndexForOptionalMask to walk the parameter list looking for
the mask. Indeed, the loop vectoriser would break if the mask was passed
in any other argument position. For example, if the masked parameter
position was 1 for a vector version of powf it would end up over-writing
the exponent.
2026-02-12 14:36:55 +00:00
Leonard Grey
5fef36767f
[LLDB][NativePDB] Use pointer and not pointee size for pointer constants (#180987)
Follow-up from
https://github.com/llvm/llvm-project/pull/180612#pullrequestreview-3780142672

This was introduced in 2af3416618e6 and not fundamentally changed since.
The review (https://reviews.llvm.org/D54452) doesn't mention any
motivation for why we would want the pointee size/signedness here. As
@Nerixyz points out, only a null pointer can be `S_CONSTANT` anyway.
2026-02-12 09:35:27 -05:00
Leonard Grey
4c08780e7c
[LLDB][NativePDB] Add local constant support (#180612)
This is mostly to support Swift `let`, but I found a way to get MSVC to
emit a local `S_CONSTANT` (see test).

I saw the note about `MakeConstantLocalExpression` at
2e34fecf02/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (L2177)
but couldn't repro with local or global (emitted as `S_LDATA32` in both
cases).
2026-02-12 09:35:00 -05:00
Sirui Mu
6da74dded0
[CIR] Add scoped atomic compare-and-exchange (#180412)
This patch adds synchronization scopes to the atomic
compare-and-exchange operation.
2026-02-12 22:15:37 +08:00
Rolf Morel
a1d7cda1d7
[MLIR][Python] Impl XOpInterface(s) from Python, with X=Transform and X=MemoryEffects (#176920)
Provides the infrastructure for implementing and late-binding
OpInterfaces from Python.

* On the mlir-c API declaration side, each `XOpInterface` has a callback
struct, with a callback for each method and a userdata member (provided
as an arg to each method), and a
`mlirXOpInterfaceAttachFallbackModel(ctx, op_name, callbacks)` func.
* This CAPI is implemented by defining a subclass of
`XOpInterface::FallbackModel` that holds the callback struct and has
each method call the corresponding callback (with userdata as an arg).
Given a callback struct, a new `FallbackModel` is created and attached,
i.e. late bound, to the named op. (MLIR's interface infrastructure is
such that the thus registered `FallbackModel` will be returned in case
the op gets cast to the `XOpInterface`.)
* On the Python side, we expose a stand-in `XOpInterface` base class
which has one (class)method: `XOpInterface.attach(cls, op_name, ctx)`.
Python users subclass this class (`class MyInterfaceImpl(XOpInterface):
...`) and implement the interface's methods (with the right names and
signatures). The user calls `attach` on the subclass
(`MyInterfaceImpl.attach("my_dialect.my_op", ctx)`) which prepares the
callbacks struct _with userdata set to the subclass_ (as we use it to
lookup methods). These callbacks (and userdata) are then registered as
an `XOpInterface::FallbackModel` by
`mlirXOpInterfaceAttachFallbackModel(...)`. From then on the Python
methods will be used to respond to calls to the interface methods
(originating in C++).

This PR enables implementing the TransformOpInterface and the
MemoryEffectsOpInterface, both of which are required for making an op
into a transform op.

Everything besides the above linked code is there to facilitate exposing
the interfaces: the right types for the arguments of the methods are
exposed as are functions/methods for manipulating these arguments (e.g.
specifying side effects on `OpOperand`s and `OpResult`s and being able
to access and set the transform handles associated with args and
results).
2026-02-12 14:07:10 +00:00
Florian Hahn
8e1d5ec534
[LV] Add LoopVectorize/VPlan subdirectory for VPlan printing tests. (#180611)
Add a new VPlan subdirectory as common place for tests checking VPlan
printing. It contains a lit.local.cfg that only runs the tests when
assertions are enabled.

This removes the need to add explicit REQUIRES: asserts to VPlan tests.

PR: https://github.com/llvm/llvm-project/pull/180611
2026-02-12 14:06:24 +00:00
Charles Zablit
49ef440525
[lldb] replace usage of $(RM) in Makefile (#180755)
This patch replaces the usages of `$(RM)` with cross platform `$(call
RM,...)` calls which was added in
https://github.com/llvm/llvm-project/pull/180224.
2026-02-12 14:54:33 +01:00
Louis Dionne
5ce7362797 [libc++] Disable commit information in LNT runs
For now, production instances of LNT don't accept strings longer than
256 characters: they crash above that. In order to unblock uploading
results to LNT as soon as possible, disable that information for now.
Note that the commit SHA is still included in the run information, so
it is still possible to correlate orders back to their commit.
2026-02-12 08:53:46 -05:00
Nikita Popov
74bd92d6e2 Revert "[IndVarSimplify] Add safety check for getTruncateExpr in genLoopLimit (#172234)"
This reverts commit 4f551b55aeb316cd2d8f8f911908ea5bd4ced16b.

This change reformatted the file.
2026-02-12 14:52:14 +01:00
Michael Buch
cb6dd90d28
[lldb][test] Make MemoryTest use the threadsafe gtest death-test style (#181127)
The `ASSERT_DEBUG_DEATH` in `MemoryTest` would occasionally crash on
macOS CI with following stacktrace:
```
06:53:31  Death test: { read_results = process_sp->ReadMemoryRanges(ranges, buffer); }
06:53:31      Result: died but not with expected error.
06:53:31    Expected: contains regular expression "read more than requested bytes"
06:53:31  Actual msg:
06:53:31  [  DEATH   ] Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
06:53:31  [  DEATH   ] 0  TargetTests              0x000000010055bb80 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
06:53:31  [  DEATH   ] 1  TargetTests              0x0000000100559778 llvm::sys::RunSignalHandlers() + 64
06:53:31  [  DEATH   ] 2  TargetTests              0x000000010055c668 SignalHandler(int, __siginfo*, void*) + 344
06:53:31  [  DEATH   ] 3  libsystem_platform.dylib 0x0000000196993744 _sigtramp + 56
06:53:31  [  DEATH   ] 4  libsystem_trace.dylib    0x00000001966b5180 _os_log_preferences_refresh + 36
06:53:31  [  DEATH   ] 5  libsystem_trace.dylib    0x00000001966b5740 os_signpost_enabled + 300
06:53:31  [  DEATH   ] 6  TargetTests              0x0000000100500930 llvm::SignpostEmitter::startInterval(void const*, llvm::StringRef) + 68
06:53:31  [  DEATH   ] 7  TargetTests              0x0000000100782c24 lldb_private::Timer::Timer(lldb_private::Timer::Category&, char const*, ...) + 168
06:53:31  [  DEATH   ] 8  TargetTests              0x000000010069cd44 lldb_private::Process::ReadMemoryFromInferior(unsigned long long, void*, unsigned long, lldb_private::Status&) + 100
06:53:31  [  DEATH   ] 9  TargetTests              0x000000010069cf68 lldb_private::Process::ReadMemoryRanges(llvm::ArrayRef<lldb_private::Range<unsigned long long, unsigned long>>, llvm::MutableArrayRef<unsigned char>) + 300
06:53:31  [  DEATH   ] 10 TargetTests              0x000000010045482c MemoryDeathTest_TestReadMemoryRangesReturnsTooMuch_Test::TestBody() + 1748
```

By default, Google death-tests execute the code under test in a
sub-process (e.g., via `fork`, see [official
docs](https://google.github.io/googletest/reference/assertions.html#death)).
However, the os_log APIs are not safe across forks, and using the os_log
handles of a parent process is not guaranteed to work (read undefined).
This is why we sometimes non-deterministically crash.

On Darwin we compile with signposts enabled, and there's no mechanism of
avoiding calling into os_log once you've compiled with them enabled
(e.g., in our case we just check the runtime `os_signpost_enabled`). And
we seemingly seem to call into the signpost infrastructure from
arbitrary points in LLDB (wherever we use `Timer`s for example).

GoogleTest provides an alternative mechanism to spawn the death tests.
It "re-executes the unit binary but only runs the death tests". This
should avoid sharing the os_log handles with the parent. This mode is
called "threadsafe".

This patch sets this style for the only 2 death-tests currently in the
LLDB test-suite.

Since this is quite the foot-gun we should disable it for the entire
LLDB unit-test suite (or rethink the way we set up the signposts for
tests/llvm/etc.). But to make CI less flakey for now, do this for only
the tests in question.
2026-02-12 13:44:29 +00:00
Michael Buch
f35c0cc61b
[lldb][test] TestBatchMode.py: don't load lldbinit in --batch test (#181128)
This test was failing locally for me because I command script import
statements in my `~/.lldibinit` which print to `stdout`. E.g.,:
```
Traceback (most recent call last):
  File "/Users/michaelbuch/Git/llvm-worktrees/main/lldb/test/API/driver/batch_mode/TestBatchMode.py", line 33, in test_batch_mode_no_commands_quits
    self.assertEqual(proc.stdout, "")
AssertionError: 'The "bt" python commands have been instal[326 chars]p.\n' != ''
- The "bt" python commands have been installed and are ready for use.
- The "sd" python command has been installed and is ready for use.
- The "expr" python aliases have been installed and are ready for use.
- "malloc_info", "ptr_refs", "cstr_refs", "find_variable", and "objc_refs" commands have been installed, use the "--help" options on these commands for detailed help.
```

I guess we could have a separate test for `--batch` with a test-local
`.lldibinit` that confirms we actually load the lldbinit before
quitting. Not sure how much value that would be. For now I just added
the `--no-lldbinit` to the test
2026-02-12 13:44:18 +00:00