llvm-project
a1a714b8 - [MLIR][Interfaces] Make `getMutableSuccessorOperands` overridable on `ReturnLike` ops (#186832)

Commit
37 days ago
[MLIR][Interfaces] Make `getMutableSuccessorOperands` overridable on `ReturnLike` ops (#186832) Move the `getMutableSuccessorOperands` implementation from `ReturnLike` trait to the `RegionBranchTerminatorOpInterface` to allow overriding of the implementation. This allows to have the trait on operations that are not a return of all of their operands. This can be used, for example, to implement custom `ReturnLike` terminator that consumes non-returned operands in combination with `func.func`. The `RegionBranchTerminatorOpInterface` now provides a default implementation for the `getMutableSuccessorOperands` method that returns all of the operands.
Author
Parents
Loading