[PATCH] D79829: [mlir][Affine] Introduce affine memory interfaces

Diego Caballero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 10:55:47 PDT 2020


dcaballe added a comment.

Thank you so much for such a detailed explanation! It's really good! I think we should move this to somewhere in the documentation because it's really elucidating!

>   Interfaces are extension of Op and are therefore wrappers around Operation * which can be stored or passed around;

Got it! I was missing this key detail.

> Interface methods are not visible because there is no inheritance from interface. Trait methods (referred to as default implementations) _are_ visible.
>  An interface is like OOP interface in e.g. Java, it expects all classes that implement it to define the interface methods themselves. We have the possibility of providing a default implementation for them.

I think the only remaining question for my understanding is why we need both `methodBody` and `defaultImplementation`. Wouldn't the latter suffice? I'm trying to think of a use case for the former that can't be implemented with the latter (other than having a default implementation without visibility in the concrete op).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79829/new/

https://reviews.llvm.org/D79829





More information about the llvm-commits mailing list