Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir][interfaces][NFC] Move DestinationStyleOpInterface to mlir/Inte…
…rfaces This is the second (and final) step of making "destination style" usable without depending on the Linalg dialect. (The first step was D135129.) This change allows us to provide default bufferization implementations for all destination-style ops. It also allows us to simplify `TilingInterface`. (E.g., `getDestinationOperands` can be removed.) Differential Revision: https://reviews.llvm.org/D136179
- Loading branch information
1 parent
44027f3
commit cfc9dda
Showing
17 changed files
with
467 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
mlir/include/mlir/Interfaces/DestinationStyleOpInterface.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//===- DestinationStyleOpInterface.h ----------------------------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef MLIR_INTERFACES_DESTINATIONSTYLEOPINTERFACE_H_ | ||
#define MLIR_INTERFACES_DESTINATIONSTYLEOPINTERFACE_H_ | ||
|
||
#include "mlir/IR/BlockAndValueMapping.h" | ||
#include "mlir/IR/Builders.h" | ||
#include "mlir/IR/BuiltinTypes.h" | ||
#include "mlir/IR/OpDefinition.h" | ||
#include "mlir/IR/Value.h" | ||
#include "llvm/ADT/SmallVector.h" | ||
|
||
namespace mlir { | ||
/// OpOperand vector that implicitly converts to a Value vector. | ||
struct OpOperandVector : public llvm::SmallVector<OpOperand *> { | ||
operator SmallVector<Value>(); | ||
}; | ||
|
||
namespace detail { | ||
/// Verify that `op` conforms to the invariants of DestinationStyleOpInterface | ||
LogicalResult verifyDestinationStyleOpInterface(Operation *op); | ||
} // namespace detail | ||
} // namespace mlir | ||
|
||
/// Include the generated interface declarations. | ||
#include "mlir/Interfaces/DestinationStyleOpInterface.h.inc" | ||
|
||
#endif // MLIR_INTERFACES_DESTINATIONSTYLEOPINTERFACE_H_ |
Oops, something went wrong.