llvm-project/mlir/test
River Riddle 29807ff5e4 Add support for providing a default implementation for an interface method.
This enables providing a default implementation of an interface method. This method is defined on the Trait that is attached to the operation, and thus has all of the same constraints and properties as any other interface method. This allows for interface authors to provide a conservative default implementation for certain methods, without requiring that all users explicitly define it. The default implementation can be specified via the argument directly after the interface method body:

  StaticInterfaceMethod<
    /*desc=*/"Returns whether two array of types are compatible result types for an op.",
    /*retTy=*/"bool",
    /*methodName=*/"isCompatibleReturnTypes",
    /*args=*/(ins "ArrayRef<Type>":$lhs, "ArrayRef<Type>":$rhs),
    /*methodBody=*/[{
      return ConcreteOp::isCompatibleReturnTypes(lhs, rhs);
    }],
    /*defaultImplementation=*/[{
      /// Returns whether two arrays are equal as strongest check for
      /// compatibility by default.
      return lhs == rhs;
    }]

PiperOrigin-RevId: 286226054
2019-12-18 11:09:11 -08:00
..
AffineOps Introduce prefetch op: affine -> std -> llvm intrinsic 2019-12-18 10:00:04 -08:00
Analysis Roll-forward initial liveness analysis including test cases. 2019-12-11 08:13:43 -08:00
Conversion Introduce prefetch op: affine -> std -> llvm intrinsic 2019-12-18 10:00:04 -08:00
Dialect Harden the requirements to memory attribution types in gpu.func 2019-12-18 03:38:55 -08:00
EDSC Add edsc::ops for pointwise, conv and dilated_conv 2019-12-16 13:42:38 -08:00
Examples Fixed typo in Toy tutorial (second var e -> var f) 2019-11-27 11:58:45 -08:00
IR Introduce prefetch op: affine -> std -> llvm intrinsic 2019-12-18 10:00:04 -08:00
Pass Add a flag to the IRPrinter instrumentation to only print after a pass if there is a change to the IR. 2019-12-06 17:05:05 -08:00
Quantizer Convert the Canonicalize and CSE passes to generic Operation Passes. 2019-10-24 15:01:09 -07:00
SDBM Fix minor spelling tweaks (NFC) 2019-10-20 09:44:36 -07:00
Target Introduce prefetch op: affine -> std -> llvm intrinsic 2019-12-18 10:00:04 -08:00
Transforms Introduce prefetch op: affine -> std -> llvm intrinsic 2019-12-18 10:00:04 -08:00
Unit Add build files and update README. 2019-03-30 11:23:22 -07:00
lib Add support for providing a default implementation for an interface method. 2019-12-18 11:09:11 -08:00
mlir-cpu-runner Move cpu runner utils templates to .h 2019-12-12 07:33:09 -08:00
mlir-cuda-runner Add UnrankedMemRef Type 2019-12-05 13:13:20 -08:00
mlir-tblgen Introduce prefetch op: affine -> std -> llvm intrinsic 2019-12-18 10:00:04 -08:00
APITest.h Fix minor spelling tweaks (NFC) 2019-10-20 09:44:36 -07:00
CMakeLists.txt Automated rollback of commit d60133f89b 2019-11-26 08:47:48 -08:00
lit.cfg.py Automated rollback of commit d60133f89b 2019-11-26 08:47:48 -08:00
lit.site.cfg.py.in Automated rollback of commit d60133f89b 2019-11-26 08:47:48 -08:00