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

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 25 07:56:17 PDT 2020


bondhugula created this revision.
bondhugula added reviewers: ftynse, mehdi_amini, andydavis1, nicolasvasilache.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, jpienaar, rriddle.
Herald added a reviewer: rriddle.
Herald added a reviewer: antiagainst.
Herald added a project: LLVM.
bondhugula updated this revision to Diff 260097.
bondhugula added a comment.
bondhugula updated this revision to Diff 260098.

Add trait documentation


bondhugula added a comment.

Fix comment


Introduce op trait `PolyhedralScope` for ops to define a new scope for
polyhedral optimization / affine dialect purposes, thus generalizing
such scopes beyond FuncOp. Ops to which this trait is attached will
define a new scope for the consideration of SSA values as valid symbols
for the purposes of polyhedral analysis and optimization. Update methods
that check for dim/symbol validity to work based on this trait.

Note: This op trait could be moved to the affine dialect so that only
those who depend on it are able to use it. However, this would mean that
FuncOp will have to be treated specially in the symbol checks, i.e.,
(FuncOp || op with trait PolyhedralScope) would replace (op with trait
PolyhedralScope) for all purposes. Keeping this trait in the core IR
allows FuncOp to be marked `PolyhedralScope`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78863

Files:
  mlir/docs/Dialects/Affine.md
  mlir/docs/Traits.md
  mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
  mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
  mlir/include/mlir/IR/Function.h
  mlir/include/mlir/IR/OpBase.td
  mlir/include/mlir/IR/OpDefinition.h
  mlir/lib/Dialect/Affine/IR/AffineOps.cpp
  mlir/test/Dialect/Affine/invalid.mlir
  mlir/test/Dialect/Affine/ops.mlir
  mlir/test/lib/Dialect/Test/TestDialect.cpp
  mlir/test/lib/Dialect/Test/TestOps.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78863.260098.patch
Type: text/x-patch
Size: 28296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200425/69972410/attachment.bin>


More information about the llvm-commits mailing list