[MLIR][Python] Support dialect conversion in python bindings (#177782)
This PR adds dialect conversion support to the MLIR Python bindings.
Because it introduces a number of new APIs, it’s a fairly large PR. It
mainly includes the following parts:
* Add a set of types and APIs to the C API, including
`MlirConversionTarget`, `MlirConversionPattern`, `MlirTypeConverter`,
`MlirConversionPatternRewriter`, and others.
* Add the corresponding types and APIs to the Python bindings.
* Extend `mlir-tblgen` with codegen for Python adaptor classes, which
generates an adaptor class for each op.
Note that this PR only adds support for 1-to-1 conversions, 1-to-N
type/value conversions are not supported yet.
---------
Co-authored-by: Maksim Levental <maksim.levental at gmail.com>
[MC/DC] Enable nested expressions (#125413)
A warning "contains an operation with a nested boolean expression." is
no longer emitted. At the moment, split expressions are treated as
individual Decisions.
[alpha.webkit.NoDeleteChecker] Don't emit a warning for a function without annotation. (#178824)
This PR fixes the bug in alpha.webkit.NoDeleteChecker that it emits a
warning for any function without
[[clang::annotate_type("webkit.nodelete")]] annotation if it contains
non-trivial code. It also fixes a bug hat we weren't checking the
presence of the annotation on superclass' corresponding member
functions.
[MC/DC] Make covmap tolerant of nested Decisions (#125407)
CoverageMappingWriter reorders `Region`s by `endLoc DESC` to prioritize
wider `Decision` with the same `startLoc`.
In `llvm-cov`, tweak seeking Decisions by reversal order to find smaller
Decision first.
[HLSL] Implement Texture2D type and Sample method in Clang (#177240)
This patch implements the `Texture2D` resource type and its `Sample`
member
function in Clang. It includes the necessary AST and Sema changes to
support
the new type and its built-in methods, as well as CodeGen support for
both
DirectX and SPIR-V targets.
Key changes:
- Added `ResourceDimension` to `HLSLAttributedResourceType` and
`HLSLResourceDimension` attribute.
- Implemented `Texture2D` and `SamplerState` in
`HLSLExternalSemaSource`.
- Added `__builtin_hlsl_resource_sample` and associated Sema checking.
- Updated `DirectXTargetCodeGenInfo` and `CommonSPIRTargetCodeGenInfo`
to handle texture types.
- Added AST, Sema, and CodeGen tests for `Texture2D`.
Part 2 of https://github.com/llvm/llvm-project/issues/175630
[VectorCombine] Fix the PtrAdd offset in shrinkLoadForShuffles to account for element type size (#179001)
This PR fixes an [issue I pointed out in regards to incorrect GEP
indices](https://github.com/llvm/llvm-project/pull/149093#discussion_r2748266079)
introduced by PR #149093.
Changes:
- Updated the pointer offset calculation in
`VectorCombine::shrinkLoadForShuffles` so that the offset is now
multiplied by the element size (`ElemSize`) when computing the new
pointer for loads
- Updated the GEP indices in
`llvm/test/Transforms/VectorCombine/load-shufflevector.ll` for the
correct byte offsets
[HLSL] Make Matrix types in `buildInitializerListImpl` index in row major order for initializer lists. (#178931)
fixes #178930
- changes the loop indexing order
- updates the associated tests
[msan] Support Arm NEON usdot (#178982)
Handle tariff-free dot-product using the existing
handleVectorDotProductIntrinsic() instead of with the default handler.
Restore unintentionally changed files
This restores files that were unintentionally added to commit
21a74f527839b5b8dd882e62a25093d980c79078, 'Revert "[lldb] Add FP
conversion instructions to IR interpreter (#175292)"'
[SPIRV][NFC] Merge Subgroup Reduce into uniform selector (#178802)
The ReduceMax, ReduceMin, and ReduceSum selectors were all doing the
samething with the exception of which opcode they were using.
This change unifies these implementations and allows pick the opcode via
a helper lambda.
[clang][driver][darwin] Tweak the use after scope fix in Darwin driver toolchain (#178981)
It's ever so slightly cleaner looking and less error prone to make the
SmallVector hold std::string instead of making a local just for the
version string.
[compiler-rt][common] Don't try to unmap non-page aligned pointers
When the sanitizer hasn't mapped the alternate signal stack, but the
host program has (like LLVM), the stack's base pointer may not be
aligned, if it were allocated via malloc, and thus wouldn't be safe to
unmap anyway. A solution that doesn't unmap the alternate stack unless
the sanitizer had mapped it in the first place will take more time to
design. For now, we can just avoid calling munmap on pointers without
the correct alignment.
[flang] Add support for additional compiler directive sentinel (#178941)
This patch allows to set up additional compiler directive sentinel in
addition to the default `!dir$`. Some user code could use other vendor
specific compiler directive sentinel and this solution allows to add
them to the parser options.