summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Math/IR/MathDialect.cpp
AgeCommit message (Collapse)Author
2025-07-13[mlir] Remove unused includes (NFC) (#148535)Kazu Hirata
2024-03-27[NFC][mlir] Reorder `declarePromisedInterface()` operands (#86628)Justin Fargnoli
Reorder the template operands of `declarePromisedInterface()` to match `declarePromisedInterfaces()`.
2024-01-08[mlir] Declare promised interfaces for the ConvertToLLVM extension (#76341)Justin Fargnoli
This PR adds promised interface declarations for `ConvertToLLVMPatternInterface` in all the dialects that support the `ConvertToLLVM` dialect extension. Promised interfaces allow a dialect to declare that it will have an implementation of a particular interface, crashing the program if one isn't provided when the interface is used.
2023-09-07[mlir][ub] Add poison support to CommonFolders.hIvan Butygin
Return poison from foldBinary/unary if argument(s) is poison. Add ub dialect as dependency to affected dialects (arith, math, spirv, shape). Add poison materialization to dialects. Add tests for some ops from each dialect. Not all affected ops are covered as it will involve a huge copypaste. Differential Revision: https://reviews.llvm.org/D159013
2023-01-12[mlir] Add operations to BlockAndValueMapping and rename it to IRMappingJeff Niu
The patch adds operations to `BlockAndValueMapping` and renames it to `IRMapping`. When operations are cloned, old operations are mapped to the cloned operations. This allows mapping from an operation to a cloned operation. Example: ``` Operation *opWithRegion = ... Operation *opInsideRegion = &opWithRegion->front().front(); IRMapping map Operation *newOpWithRegion = opWithRegion->clone(map); Operation *newOpInsideRegion = map.lookupOrNull(opInsideRegion); ``` Migration instructions: All includes to `mlir/IR/BlockAndValueMapping.h` should be replaced with `mlir/IR/IRMapping.h`. All uses of `BlockAndValueMapping` need to be renamed to `IRMapping`. Reviewed By: rriddle, mehdi_amini Differential Revision: https://reviews.llvm.org/D139665
2021-12-08Adjust "end namespace" comment in MLIR to match new agree'd coding styleMehdi Amini
See D115115 and this mailing list discussion: https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html Differential Revision: https://reviews.llvm.org/D115309
2021-06-29[mlir] Generare .cpp.inc files for dialects.Stella Laurenzo
* Previously, we were only generating .h.inc files. We foresee the need to also generate implementations and this is a step towards that. * Discussed in https://llvm.discourse.group/t/generating-cpp-inc-files-for-dialects/3732/2 * Deviates from the discussion above by generating a default constructor in the .cpp.inc file (and adding a tablegen bit that disables this in case if this is user provided). * Generating the destructor started as a way to flush out the missing includes (produces a link error), but it is a strict improvement on its own that is worth doing (i.e. by emitting key methods in the .cpp file, we root vtables in one translation unit, which is a non-controversial improvement). Differential Revision: https://reviews.llvm.org/D105070
2021-02-12[mlir][math] Split off the math dialect.Stephan Herhut
This does not split transformations, yet. Those will be done as future clean ups. Differential Revision: https://reviews.llvm.org/D96272