llvm-project/mlir/test/Dialect/LLVMIR
River Riddle 7ceffae18c [mlir] Convert OpTrait::FunctionLike to FunctionOpInterface
This commit refactors the FunctionLike trait into an interface (FunctionOpInterface).
FunctionLike as it is today is already a pseudo-interface, with many users checking the
presence of the trait and then manually into functionality implemented in the
function_like_impl namespace. By transitioning to an interface, these accesses are much
cleaner (ideally with no direct calls to the impl namespace outside of the implementation
of the derived function operations, e.g. for parsing/printing utilities).

I've tried to maintain as much compatability with the current state as possible, while
also trying to clean up as much of the cruft as possible. The general migration plan for
current users of FunctionLike is as follows:

* function_like_impl -> function_interface_impl
Realistically most user calls should remove references to functions within this namespace
outside of a vary narrow set (e.g. parsing/printing utilities). Calls to the attribute name
accessors should be migrated to the `FunctionOpInterface::` equivalent, most everything
else should be updated to be driven through an instance of the interface.

* OpTrait::FunctionLike -> FunctionOpInterface
`hasTrait` checks will need to be moved to isa, along with the other various Trait vs
Interface API differences.

* populateFunctionLikeTypeConversionPattern -> populateFunctionOpInterfaceTypeConversionPattern

Fixes #52917

Differential Revision: https://reviews.llvm.org/D117272
2022-01-18 20:56:53 -08:00
..
canonicalize.mlir [MLIR][LLVM] Add memoryeffect for alloca 2022-01-12 01:53:24 -05:00
func.mlir [mlir] Convert OpTrait::FunctionLike to FunctionOpInterface 2022-01-18 20:56:53 -08:00
global.mlir [MLIR][LLVM] Add llvm.mlir.global_ctors/dtors and translation support 2021-10-28 18:09:34 +05:30
invalid.mlir [mlir] Replace StrEnumAttr -> EnumAttr in core dialects 2022-01-18 17:15:00 +00:00
layout.mlir [mlir] Implement `DataLayoutTypeInterface` for `LLVMArrayType` 2021-12-14 09:35:45 +01:00
legalize-for-export.mlir [mlir] handle nested regions in llvm-legalize-for-export 2022-01-18 17:09:14 +01:00
nvvm.mlir [mlir] Replace StrEnumAttr -> EnumAttr in core dialects 2022-01-18 17:15:00 +00:00
rocdl.mlir [mlir] add verifiers for NVVM and ROCDL kernel attributes 2021-02-16 18:06:54 +01:00
roundtrip.mlir [mlir] Make it possible to directly supply constant values to LLVM GEPOp 2022-01-07 09:56:01 +01:00
terminator.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
types-invalid.mlir [mlir] Drop deprecated syntax for LLVM dialect types 2021-02-08 19:26:21 +01:00
types.mlir [mlir] Align LLVM_Type ODS constraint on type verifiers 2022-01-05 19:00:56 +01:00