[MLIR][Python] Add a DSL for defining dialects in Python bindings (#169045)
Python bindings for the IRDL dialect were introduced in #158488. They
are currently usable—for constructing IR and dynamically loading modules
that contain `irdl.dialect` into MLIR. However, there are still several
pain points when working with them:
* The IRDL IR-building interface is not very intuitive and tends to be
quite verbose.
* We do not yet have the corresponding `OpView` classes for IRDL-defined
operations.
To address these issues, I propose creating a wrapper (effectively a
small “DSL”) on top of the existing IRDL Python bindings. This wrapper
aims to simplify IR construction and automatically generate the
corresponding `OpView` types. A simple example is shown below.
Currently, using the IRDL bindings looks like this:
[72 lines not shown]
[NFCI][AMDGPU] Use `GET_SUBTARGETINFO_MACRO` in `GCNSubtarget.h` and `R600Subtarget.h` (#177402)
We can finally get rid of the manually defined boolean variables, like
other targets. Even though most of them are now defined by macros, we
still need to add the entries.
[libclang/python] Move SPELLING_CACHE into CodeCompletion (#177586)
This adresses point 2 from
https://github.com/llvm/llvm-project/issues/156680.
Also add a dummy object that serves as an alias to `SPELLING_CACHE`,
used to replicate the old behavior and throw a `DeprecationWarning`.
[libc++][ranges] implement `ranges::shift_left` (#83231)
Implement the `ranges::shift_left` algorithm from
[P2440R1](https://wg21.link/P2440R1).
Closes: #134061
---------
Co-authored-by: Hui Xie <hui.xie1990 at gmail.com>
Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>
[mlir][Affine] affine-super-vectorize transform op (#177755)
Added an operation in the transform dialect to apply the
affine-super-vectorize pass locally.
The operation vectorizes the loops that are children of the provided
operation, itself included.
Also added a test file verifying the operation behaves.
[mlir][python] Support Arbitrary Precision Integers in MLIR C API and Python Bindings (#177733)
This PR extends the MLIR C API and Python bindings to support
**arbitrary-precision integers (`APInt`)**, overcoming the previous
limitation where `IntegerAttr` values were restricted to 64 bits.
Cryptographic applications often require integer types much larger than
standard machine words (e.g., the 256-bit modulus for the BN254 curve).
Previously, attempting to bind these values resulted in truncation or
errors. This PR exposes the underlying word-based `APInt` structure via
the C API and updates the Python bindings to seamlessly handle Python's
arbitrary-precision integers.
[AMDGPU] Fix DomTree preservation in SILowerControlFlow when nodes are removed (#176691)
I would think the "applyUpdates" API should also take care of deleting
the nodes from the analyses objects but this does not seem to be the
case. https://godbolt.org/z/38a7rfzjd shows an example where
SILowerControlFlow removes a basic block which is not removed in the
Post dominator tree.
[RISCV] Use decodeVMaskReg for VMaskCarryInOp. NFC (#177742)
After #177678 we don't need DecodeVMV0RegisterClass to reject vm=1
cases. All instructions that use VMaskCarryInOp have set vm=0 in their
tablegen classes.
[AArch64][SME] Use LibcallLoweringInfo in the MachineSMEABIPass (#177762)
This adds a new helper to add calls to SME routines (addSMELibCall) and
check they are using the expected CC.
---------
Co-authored-by: Matt Arsenault <arsenm2 at gmail.com>
[clang-tidy] Add llvm-use-vector-utils (#177722)
This new check suggests the following replacements:
* `llvm::to_vector(llvm::map_range(X, Fn))` -> `llvm::map_to_vector(X,
Fn)`
* `llvm::to_vector(llvm::make_filter_range(X, Fn))` ->
`llvm::filter_to_vector(X, Fn)`
and add the `SmallVectorExtras.h` include when necessary.
The check is called `vector-utils` because we may want to handle more
cases in the future, like turning explicit calls to SmallVector
constructor to `llvm::to_vector` (which lives in `SmallVector.h`, not
`SmallVectorExtras.h`).
Assisted-by: claude
SystemZ: Use correctly offset MachinePointerInfo in CC lowering (#177793)
Previously this was just using the original base address as
the pointer info.