summaryrefslogtreecommitdiff
path: root/mlir/lib/Interfaces/CallInterfaces.cpp
AgeCommit message (Collapse)Author
2025-02-03[mlir] share argument attributes interface between calls and callables (#123176)jeanPerier
This patch shares core interface methods dealing with argument and result attributes from CallableOpInterface with the CallOpInterface and makes them mandatory to gives more consistent guarantees about concrete operations using these interfaces. This allows adding argument attributes on call like operations, which is sometimes required to get proper ABI, like with llvm.call (and llvm.invoke). The patch adds optional `arg_attrs` and `res_attrs` attributes to operations using these interfaces that did not have that already. They can then re-use the common "rich function signature" printing/parsing helpers if they want (for the LLVM dialect, this is done in the next patch). Part of RFC: https://discourse.llvm.org/t/mlir-rfc-adding-argument-and-result-attributes-to-llvm-call/84107
2024-12-21[Interfaces] Migrate away from PointerUnion::{is,get} (NFC) (#120845)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-09-10Reland [MLIR] Make resolveCallable customizable in CallOpInterface (#107989)Henrich Lauko
Relands #100361 with fixed dependencies.
2024-09-10Revert "[MLIR] Make `resolveCallable` customizable in `CallOpInterface`" ↵Matthias Springer
(#107984) Reverts llvm/llvm-project#100361 This commit caused some linker errors. (Missing `MLIRCallInterfaces` dependency.)
2024-09-10[MLIR] Make `resolveCallable` customizable in `CallOpInterface` (#100361)Henrich Lauko
Allow customization of the `resolveCallable` method in the `CallOpInterface`. This change allows for operations implementing this interface to provide their own logic for resolving callables. - Introduce the `resolveCallable` method, which does not include the optional symbol table parameter. This method replaces the previously existing extra class declaration `resolveCallable`. - Introduce the `resolveCallableInTable` method, which incorporates the symbol table parameter. This method replaces the previous extra class declaration `resolveCallable` that used the optional symbol table parameter.
2022-10-13[mlir] Update CallInterfaceCallable to use the new casting infra.Nick Kreeger
This enables casting LLVM style for mlir::CallInterfaceCallable usage. Differential Revision: https://reviews.llvm.org/D135823
2020-10-16[mlir] Update SCCP and the Inliner to use SymbolTableCollection for symbol ↵River Riddle
lookups This transforms the symbol lookups to O(1) from O(NM), greatly speeding up both passes. For a large MLIR module this shaved seconds off of the compilation time. Differential Revision: https://reviews.llvm.org/D89522
2020-03-10[mlir][NFC] Move the operation interfaces out of Analysis/ and into a new ↵River Riddle
Interfaces/ directory. The interfaces themselves aren't really analyses, they may be used by analyses though. Having them in Analysis can also create cyclic dependencies if an analysis depends on a specific dialect, that also provides one of the interfaces. Differential Revision: https://reviews.llvm.org/D75867