Add constant folding for the shape.rank operation of the shape dialect.
Depends On D82028
Paths
| Differential D82076
[MLIR][Shape] Add constant folding to `shape.rank` ClosedPublic Authored by frgossen on Jun 18 2020, 2:48 AM.
Details
Diff Detail
Event Timelinefrgossen added a child revision: D82077: [MLIR][Shape] Add canonicalization pattern for `shape.rank`.Jun 18 2020, 2:52 AM Comment Actions LGTM modulo renaming of op (discussed in the dependent patch)
frgossen marked 4 inline comments as done. Comment ActionsRename, address comments
frgossen retitled this revision from [MLIR][Shape] Add constant folding to `shape.get_shape` to [MLIR][Shape] Add constant folding to `shape.rank` .Jun 19 2020, 6:42 AM frgossen retitled this revision from [MLIR][Shape] Add constant folding to `shape.rank` to [MLIR][Shape] Add constant folding to `shape.rank`.Jun 19 2020, 7:09 AM This revision is now accepted and ready to land.Jun 23 2020, 2:08 PM Closed by commit rG81469527ec99: [MLIR][Shape] Add constant folding to `shape.rank` (authored by frgossen). · Explain WhyJun 25 2020, 1:35 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 273248 mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
mlir/lib/Dialect/Shape/IR/Shape.cpp
mlir/test/Dialect/Shape/canonicalize.mlir
|
nit: I think llvm::size from STLHelpers.h could make this a bit shorter.