summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp
AgeCommit message (Collapse)Author
2025-11-15[mlir] Adopt cast function objects. NFC. (#168228)Jakub Kuderski
These were added in https://github.com/llvm/llvm-project/pull/165803.
2025-11-06[mlir] Remove redundant declarations (NFC) (#166714)Kazu Hirata
In C++17, static constexpr members are implicitly inline, so they no longer require an out-of-line definition. Identified with readability-redundant-declaration.
2025-08-29[MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in ↵Mehdi Amini
TransformInterfaces.cpp (NFC)
2025-07-28Introduce a "log level" support for DEBUG_TYPE (#150855)Mehdi Amini
This allows to set an optional integer level for a given debug type. The string format is `type[:level]`, and the integer is interpreted as such: - if not provided: all debugging for this debug type is enabled. - if >0: all debug that is < to the level is enabled. - if 0: same as for >0 but also does not disable the other debug-types, it acts as a negative filter. The LDBG() macro is updated to accept an optional log level to illustrate the feature. Here is the expected behavior: LDBG() << "A"; // Identical to LDBG(1) << "A"; LDBG(2) << "B"; With `--debug-only=some_type`: we'll see A and B in the output. With `--debug-only=some_type:1`: we'll see A but not B in the output. With `--debug-only=some_type:2`: we'll see A and B in the output. (same with any level above 2) With `--debug-only=some_type:0`: we'll see neither A nor B in the output, but we'll see any other logging for other debug types.
2025-07-27[MLIR] Migrate some "transform dialect" source to use the standard LDBG ↵Mehdi Amini
macro (NFC) (#150695)
2025-07-25[MLIR] Fix release build: the definition for the FULL_LDBG macro was incorrectMehdi Amini
2025-07-25[MLIR] Fix release build: FULL_LDBG macro was incorrect when NDEBUG is ↵Benoit Jacob
defined (#150698) DEBUGLOG_WITH_STREAM_AND_TYPE is an internal implementation detail of LDBG in DebugLog.h. When NDEBUG is defined, DEBUGLOG_WITH_STREAM_AND_TYPE is not defined at all. Signed-off-by: Benoit Jacob <jacob.benoit.1@gmail.com>
2025-07-25[mlir] Switch to new LDBG macro (#150616)Jacques Pienaar
Change local variants to use new central one.
2025-07-23[mlir] Remove unused includes (NFC) (#150266)Kazu Hirata
These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures.
2025-05-21[mlir] Use llvm::is_contained (NFC) (#140986)Kazu Hirata
2025-05-06[mlir] Remove unused local variables (NFC) (#138642)Kazu Hirata
2025-04-19[mlir][transform] Clean up prints. NFC. (#136401)Jakub Kuderski
Use `llvm::interleaved` from #135517 to simplify printing.
2025-03-10[mlir] Add a utility method to move operation dependencies. (#129975)MaheshRavishankar
The added utility method moves all SSA values that an operation depends upon before an insertion point. This is useful during transformations where such movements might make transformations (like fusion) more powerful. To test the operation add a transform dialect op that calls the move operation. To be able to capture the `notifyMatchFailure` messages from the transformation and to report/check these in the test modify the `ErrorCheckingTrackingListener` to capture the last match failure notification. --------- Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com>
2024-12-21[Dialect] Migrate away from PointerUnion::{is,get} (NFC) (#120818)Kazu Hirata
Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T> I'm not touching PointerUnion::dyn_cast for now because it's a bit complicated; we could blindly migrate it to dyn_cast_if_present, but we should probably use dyn_cast when the operand is known to be non-null.
2024-10-03Fix LLVM_ENABLE_ABI_BREAKING_CHECKS macro check: use #if instead of #ifdef ↵Mehdi Amini
(#110938) This macros is always defined: either 0 or 1. The correct pattern is to use #if. Re-apply #110185 with more fixes for debug build with the ABI breaking checks disabled.
2024-10-02Revert "Fix LLVM_ENABLE_ABI_BREAKING_CHECKS macro check: use #if inst… ↵Christopher Di Bella
(#110923) …ead of #ifdef (#110883)" This reverts commit 1905cdbf4ef15565504036c52725cb0622ee64ef, which causes lots of failures where LLVM doesn't have the right header guards. The errors can be seen on [BuildKite](https://buildkite.com/llvm-project/upstream-bazel/builds/112362#01924eae-231c-4d06-ba87-2c538cf40e04), where the source uses `#ifndef NDEBUG`, but the content in question is defined when `LLVM_ENABLE_ABI_BREAKING_CHECKS == 1`. For example, `llvm/include/llvm/Support/GenericDomTreeConstruction.h` has the following: ```cpp // Helper struct used during edge insertions. struct InsertionInfo { // ... #ifdef LLVM_ENABLE_ABI_BREAKING_CHECKS SmallVector<TreeNodePtr, 8> VisitedUnaffected; #endif }; // ... InsertionInfo II; // ... #ifndef NDEBUG II.VisitedUnaffected.push_back(SuccTN); #endif ```
2024-10-02Fix LLVM_ENABLE_ABI_BREAKING_CHECKS macro check: use #if instead of #ifdef ↵Mehdi Amini
(#110883) This macros is always defined: either 0 or 1. The correct pattern is to use #if. Reapply https://github.com/llvm/llvm-project/pull/110185 with fixes.
2024-09-27Revert "Fix LLVM_ENABLE_ABI_BREAKING_CHECKS macro check: use #if instead of ↵Mehdi Amini
#ifdef" (#110310) Reverts llvm/llvm-project#110185 There are inconsistencies in some of these macros, which unfortunately isn't caught by a single upstream bot.
2024-09-27Fix LLVM_ENABLE_ABI_BREAKING_CHECKS macro check: use #if instead of #ifdef ↵Mehdi Amini
(#110185) This macros is always defined: either 0 or 1. The correct pattern is to use #if.
2024-09-13[NFC][mlir] Simplify code (#108346)Jianjian Guan
2024-09-09[MLIR][Transform] Allow stateInitializer and stateExporter for ↵Amy Wang
applyTransforms (#101186) This is discussed in RFC: https://discourse.llvm.org/t/rfc-making-the-constructor-of-the-transformstate-class-protected/80377
2024-08-04[mlir] Construct SmallVector with ArrayRef (NFC) (#101896)Kazu Hirata
2024-07-02mlir/LogicalResult: move into llvm (#97309)Ramkumar Ramachandra
This patch is part of a project to move the Presburger library into LLVM.
2024-06-19[mlir][side effect] refactor(*): Include more precise side effects (#94213)donald chen
This patch adds more precise side effects to the current ops with memory effects, allowing us to determine which OpOperand/OpResult/BlockArgument the operation reads or writes, rather than just recording the reading and writing of values. This allows for convenient use of precise side effects to achieve analysis and optimization. Related discussions: https://discourse.llvm.org/t/rfc-add-operandindex-to-sideeffect-instance/79243
2024-05-03[mlir] make transform.foreach_match forward arguments (#89920)Oleksandr "Alex" Zinenko
It may be useful to have access to additional handles or parameters when performing matches and actions in `foreach_match`, for example, to parameterize the matcher by rank or restrict it in a non-trivial way. Enable `foreach_match` to forward additional handles from operands to matcher symbols and from action symbols to results.
2024-03-20[mlir] split transform interfaces into a separate library (#85221)Oleksandr "Alex" Zinenko
Transform interfaces are implemented, direction or via extensions, in libraries belonging to multiple other dialects. Those dialects don't need to depend on the non-interface part of the transform dialect, which includes the growing number of ops and transitive dependency footprint. Split out the interfaces into a separate library. This in turn requires flipping the dependency from the interface on the dialect that has crept in because both co-existed in one library. The interface shouldn't depend on the transform dialect either. As a consequence of splitting, the capability of the interpreter to automatically walk the payload IR to identify payload ops of a certain kind based on the type used for the entry point symbol argument is disabled. This is a good move by itself as it simplifies the interpreter logic. This functionality can be trivially replaced by a `transform.structured.match` operation.