[PATCH] D78863: [MLIR] Introduce op trait PolyhedralScope

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 13:32:13 PDT 2020


rriddle added inline comments.


================
Comment at: mlir/include/mlir/IR/OpDefinition.h:1056
+/// operation. For more details, see `Traits.md#PolyhedralScope`.
+template <typename ConcreteType>
+class PolyhedralScope : public TraitBase<ConcreteType, PolyhedralScope> {
----------------
bondhugula wrote:
> rriddle wrote:
> > Is this trait applicable to anything outside of the affine dialect? If not I don't really see why it should be here and not in the affine dialect instead.
> I was in two minds on this. Could you see the second para of the commit summary? We'd like to mark FuncOp with PolyhedralScope. 
Ah, sorry I missed that. A lot of times I skip the commit message and jump right in. 

Yes, marking FuncOp makes things a bit difficult. This has come up before w.r.t interfaces as well. I'd like to avoid adding special dialect traits here if they aren't general(especially because I'd like to trim this file a bit). I would expect that you could also use FunctionLike(instead of FuncOp) as an indicator of a polyhedral scope. I'm leaning more towards moving the trait to Affine unless you can foresee uses outside of that dialect.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78863





More information about the llvm-commits mailing list