Commit 7ce1e7ab authored by River Riddle's avatar River Riddle
Browse files

[mlir][NFC] Move the operation interfaces out of Analysis/ and into a new 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
parent c8f0d27e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -291,5 +291,5 @@ function, the reference implementation of the operation will be used to derive
the shape function. The reference implementation is general and can support the
arbitrary computations needed to specify output shapes.

[InferTypeOpInterface]: https://github.com/llvm/llvm-project/tree/master/mlir/include/mlir/Analysis/InferTypeOpInterface.td
[InferTypeOpInterface]: https://github.com/llvm/llvm-project/tree/master/mlir/include/mlir/Interfaces/InferTypeOpInterface.td
[ShapedType]: https://github.com/llvm/llvm-project/tree/master/mlir/include/mlir/IR/StandardTypes.h
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ To add this interface we just need to include the definition into our operation
specification file (`Ops.td`):

```tablegen
include "mlir/Analysis/CallInterfaces.td"
include "mlir/Interfaces/CallInterfaces.td"
```

and add it to the traits list of `GenericCallOp`:
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ add_toy_chapter(toyc-ch4
  ToyCh4OpsIncGen
  ToyCh4ShapeInferenceInterfaceIncGen
  ToyCh4CombineIncGen
  MLIRCallOpInterfacesIncGen
  )

include_directories(include/)
@@ -29,6 +28,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
target_link_libraries(toyc-ch4
  PRIVATE
    MLIRAnalysis
    MLIRCallInterfaces
    MLIRIR
    MLIRParser
    MLIRPass
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
#ifndef TOY_OPS
#define TOY_OPS

include "mlir/Analysis/CallInterfaces.td"
include "mlir/Interfaces/CallInterfaces.td"
include "toy/ShapeInferenceInterface.td"

// Provide a definition of the 'toy' dialect in the ODS framework so that we
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ add_toy_chapter(toyc-ch5
  ToyCh5ShapeInferenceInterfaceIncGen
  ToyCh5OpsIncGen
  ToyCh5CombineIncGen
  MLIRCallOpInterfacesIncGen
  )

include_directories(include/)
@@ -32,6 +31,7 @@ target_link_libraries(toyc-ch5
  PRIVATE
    ${dialect_libs}
    MLIRAnalysis
    MLIRCallInterfaces
    MLIRIR
    MLIRParser
    MLIRPass
Loading